bbs的数据结构和存储过程(一)

VC_字体编码格式_ASCII、Unicode、UTF-8、UTF-16、UCS、BOM、Endian 今天为了搞定字库的map在我们的系统定义里,结果发现里面的概念还挺多,上网学习下。看了好长时间 针对中文编码的表,连接,数据太大 http://www.ansell-uebersetzungen.com/gbindex.html 再附上unicode表,连接 http://www.tamasoft.co.jp/en/general-info/unicode.html 下面就是我的笔记,主 阅读详情
/****************************************************************************/
/* */
/* FileName: bbs.sql */
/* */
/* Description: bbs数据结构 */
/* */
/* Table: */
/* */
/* Procedure: */
/* */
/* Author: bigeagle http://bigeagle.yeah.net */
/* */
/* Date: 2001/1/29 */
/* */
/* History: */
/* */
/****************************************************************************/

/*数据结构*/

/*bbs用户表*/
if exists(select * from sysobjects where id = object_id('BBSUser'))
drop table BBSUser
go

create table BBSUser
(
id int identity primary key ,
UserName varchar(20) default '' not null ,
Password varchar(10) default '' not null ,
Email varchar(100) default '' not null ,
Homepage varchar(150) default '' not null ,
Signature varchar(255) default '' not null ,
SignDate datetime default getdate() not null ,
Point int default 0 not null
)

go

create index ix_bbsuser on bbsuser (id , username , password)

/*bbs表情表*/
if exists(select * from sysobjects where id = object_id('Face'))
drop table Face
go

create table Face
(
id tinyint identity primary key ,
Face varchar(30) default '' not null
)
go

/*bbs表*/
if exists(select * from sysobjects where id = object_id('BBS'))
drop table BBS
go

create table BBS
(
id int identity primary key ,
RootID int default 0 not null , --根ID
FatherID int default 0 not null , --父ID
Layer tinyint default 0 not null , --层
OrderNum float(53) default 0 not null , --排序基数
UserID int default 0 not null , --发言人ID
ForumID tinyint default 1 not null , --版面ID
Subject varchar(255) default '' not null , --主题
Content text default '' not null , --内容
FaceID tinyint default 1 not null , --表情
Hits int default 0 not null , --点击数
IP varchar(20) default '' not null , --发贴IP
Time datetime default getdate() not null , --发表时间
Posted bit default 0 not null --是否精华贴子
)
go

create index ix_bbs on bbs(id , rootid ,layer , fatherid , subject,posted) with DROP_EXISTING
create index ix_bbs1 on bbs(fatherid , forumid) with DROP_EXISTING
create index ix_bbs2 on bbs(forumid , rootid , ordernum) with drop_existing

/*精华区*/
if exists(select * from sysobjects where id = object_id('PostedTopic'))
drop table PostedTopic
go

create table PostedTopic
(
id int identity primary key ,
UserID int default 0 not null , --发言人ID
ForumID tinyint default 1 not null , --版面ID
Subject varchar(255) default '' not null , --主题
Content text default '' not null , --内容
FaceID tinyint default 1 not null , --表情
Hits int default 0 not null , --点击数
IP varchar(20) default '' not null , --发贴IP
Time datetime default getdate() not null --发表时间
)
go

/*forum版面表*/
if exists(select * from sysobjects where id = object_id('forum'))
drop table forum
go

create table Forum
(
ID tinyint identity primary key ,
RootID tinyint default 0 not null , --根ID
FatherID tinyint default 0 not null , --父ID
Layer tinyint default 0 not null , --层
Title varchar(50) default '' not null , --版面名称
Description varchar(255) default '' not null , --版面描述
MasterID int default 1 not null , --版主ID
TopicCount int default 0 not null , --贴子总数
Time datetime default getdate() not null , --创建时间
IsOpen bit default 0 not null --是否开放
)
go

insert into forum(rootid , fatherid , layer , title , description , masterid) values(1 , 0 , 0 , "谈天说地" , "在不违犯国家法律的情况下,你可以发表你自己的言论。" , 1)
insert into forum(rootid , fatherid , layer , title , description , masterid) values(2 , 0 , 0 , "体育" , "在不违犯国家法律的情况下,你可以对体育发表你自己的评论。" , 1)
insert into forum(rootid , fatherid , layer , title , description , masterid) values(1 , 1 , 1 , "笑话站" , "笑话,让你在工作间隙轻松一下。" , 1)
insert into forum(rootid , fatherid , layer , title , description , masterid) values(2,2 , 1 , "体育沙龙" , "体育总和评论。" , 1)
insert into forum(rootid , fatherid , layer , title , description , masterid) values(2,2 , 1 , "足球" , "足球评论。" , 1)
insert into forum(rootid , fatherid , layer , title , description , masterid) values(2,2 , 1 , "海牛俱乐部" , "海牛球迷的讨论园地。" , 1)

select * from forum

/*论坛通告表*/
if exists(select * from sysobjects where id = object_id('Notify'))
drop table Notify
go

create table Notify
(
ID int identity primary key ,
TopicID int default 0 not null ,
Closed bit default 0 not null ,
)
go
select * from notify
delete from notify where id=5

/***********以下为存储过程************************************************************/

/*************************************************************************/
/* */
/* procedure : up_GetBBSInfo */
/* */
/* Description: 取得整个论坛的相关信息 */
/* */
/* Parameters: none */
/* */
/* Use table: forum , bbs , bbsuser */
/* */
/* Author: bigeagle@163.net */
/* */
/* Date: 2000/2/3 */
/* */
/* History: */
/* */
/*************************************************************************/

if exists(select * from sysobjects where id = object_id('up_GetBBSInfo'))
drop proc up_GetBBSInfo
go

create proc up_GetBBSInfo
as
declare @ForumCount int
declare @TopicCount int
declare @UserCount int

set nocount on
select @ForumCount = count(*) from Forum where layer <> 0
select @TopicCount = count(*) from BBS
select @UserCount = count(*) from BBSUser

/*取得论坛本身信息*/
select 'ForumCount' = @ForumCount , 'TopicCount' = @TopicCount , 'UserCount' = @UserCount

go
up_getbbsinfo
/*************************************************************************/
/* */
/* procedure : up_GetForumInfo */
/* */
/* Description: 取得指定版面的相关信息 */
/* */
/* Parameters: @a_intForumID */
/* */
/* Use table: forum , bbs , bbsuser */
/* */
/* Author: bigeagle@163.net */
/* */
/* Date: 2000/2/3 */
/* */
/* History: */
/* */
/*************************************************************************/

if exists(select * from sysobjects where id = object_id('up_GetForumInfo'))
drop proc up_GetForumInfo
go

create proc up_GetForumInfo @a_intForumID int
as
declare @intTopicCount int
declare @intRootTopicCount int
set nocount on
if not exists(select * from Forum where id=@a_intForumID) return 0
select @intTopicCount = count(*) from bbs where forumid = @a_intForumID
select @intRootTopicCount = count(*) from bbs where forumID=@a_intForumID and fatherid=0
select * , 'TopicCount'=@intTopicCount , 'RootTopicCount' = @intRootTopicCount
from Forum where id = @a_intForumID
set nocount off
go
select id , rootid , title , fatherid from forum
/*************************************************************************/
/* */
/* procedure : up_GetPostedForumInfo */
/* */
/* Description: 取得指定版面精华区的相关信息 */
/* */
/* Parameters: @a_intForumID */
/* */
/* Use table: forum , bbs , bbsuser */
/* */
/* Author: bigeagle@163.net */
/* */
/* Date: 2000/4/17 */
/* */
/* History: */
/* */
/*************************************************************************/

if exists(select * from sysobjects where id = object_id('up_GetPostedForumInfo'))
drop proc up_GetPostedForumInfo
go

create proc up_GetPostedForumInfo @a_intForumID int
as
declare @intTopicCount int
declare @intRootTopicCount int
set nocount on
if not exists(select * from Forum where id=@a_intForumID) return 0
select @intTopicCount = count(*) from bbs where forumid = @a_intForumID and posted=1
select * , 'TopicCount'=@intTopicCount , 'RootTopicCount' = @intTopicCount
from Forum where id = @a_intForumID
set nocount off
go

混元3.0提示词工程:从失效到高可用的底层设计逻辑 大模型提示词不是通用咒语,而是人机协同的接口协议。随着混元3.0在长上下文(128K)、多轮状态保持、中文语义颗粒度结构化输出稳定性上的代际升级,传统模糊指令(如‘请友好回答’)极易引发幻觉放大、格式失守或法规误引。其核心原理在于模型对指令位置敏感性增强、强化学习中多维反馈权重重构,以及对可验证结构(如‘因为…所以…’逻辑链、JSON字段小写规范)的强响应机制。技术价值体现在业务合规率跃升(如客服场景幻觉率从17.6%降至0.1%)、API集成鲁棒性提升,广泛应用于智能客服、金融投顾、医疗导诊等需高确定性 阅读详情

相关推荐

从Windows系统提取12点阵繁体字库,实现嵌入式HMI简繁无缝切换

在嵌入式人机界面(HMI)开发中,点阵字库是显示汉字的基础技术。其原理是将每个汉字字形转换为二进制位图数据,供屏幕驱动直接绘制。这项技术的核心价值在于,它能以极小的存储空间计算开销,在资源受限的MCU上实现清晰、高效的文本显示,尤其适合小尺寸、低分辨率的单色或OLED屏幕。应用场景广泛覆盖工业控制、智能家居、便携设备等领域的用户界面。针对繁体中文显示需求,传统方案往往受限于现成字库的稀缺。本文介绍种创新方法:利用Windows系统的GDI字体渲染引擎,通过编码转换(GB2312到Big5)屏幕取模技术

weixin_30698297的博客 387

bbs论坛

主要介绍论坛中包含不同内容,提供源代码,方便大家使用

表格票据识别-助力各行业单据录入

、表格票据识别产品简介 表格票据自动识别开发包(SDK)是款通用的数据批量采集组件产品,适用于具有表格特征的表单、问卷、单证、发票,通过扫描、图像处理、自动分类、OCR(光学字符识别)技术,将表格图像中的数据信息准确、快速、真实地提取并保存,数据结果可转化为标准的数据格式,如XML、Excel等,与企事业单位的ERP、CRM等系统实现无缝结合。产品支持中英文、数字、符号等多类型字符的手写体、...

ocr92的博客 2971

BBS论坛

目录<br>绪论 1<br>第章系统的定义 2<br>1.1系统概要 2<br>1.1.1设计的目的 2<br>1.1.2设计的思想 2<br>1.2需求分析 3<br> 1.2.1系统综合需求 3<br>1.2.2系统数据需求 3<br>1.2.3系统逻辑需求 6<br>第二章 数据库设计 7<br>2.1 数据库的概念及理念基础 7<br>2.2 数据结构设计 8<br>2.3数据库操作 11<br>第三章 系统的详细设计 16<br>3.1功能模块的设计 16<br>3.2 功能模块的实现 17<br>3.3实现超文本信息输入显示 20<br>结论 29<br>参考文献 29<br>

BBS】网络论坛(Bulletin Board System, BBS)的简介、特点举例

网络论坛(Bulletin Board System)指的是网络技术有关的网上交流场所。

weixin_43031313的博客 1万+

中国BBS社区前10名

注:最新排名请参考:http://hot.icxo.com/bbs/BBS社区10强 名次社区BBS所属类别1天涯社区综合社区BBS2网易论坛综合社区BBS3西祠胡同综合社区BBS4西陆社区综合社区BBS5搜狐社区综合社区BBS6凯迪社区综合社区BBS7新

§为艺术而技术§ 9225

BBS(電子佈告欄系統)

關於与「」標題相近或相同的条目,請見「(英語:,缩写作 ,或稱)是種網站系統,是的前身,它允许用户使用终端程序通过拨接或者来进行连接,BBS站台提供佈告欄、分類討論區、新闻阅读、軟體下载與上传、遊戲、与其它用户線上對話等功能。

weixin_40191861的博客 858

推荐几个很不错的bbs、站点!

各类专业论坛及站点IT类1、http://bbs.chinajavaworld.com   中文世界论坛:主要针对JAVA及其周边技术的论坛,板块很多很专业。  2、http://www.sciencenet.cn/bbs/   科学网论坛:综合很全面的科学论坛,有不少牛人在争论已定/未定的问题。3、http://emuch.net/bbs/index.php   小木

cityvulture的专栏 7038

bbs数据结构存储过程

/****************************************************************************//* *//* FileName: bbs.sql *//* *//* Description: bbs数据结构 *//* *//* Table: *//* *//* Procedure: *//* *//* Author: bigeagle

农民田园 1171

【转载】VC IME 通信

文本输入框作为个最基本的UI控件,被众多UI框架默认支持。Windows下最简单的就是CEdit(WTL封装),也有更为复杂的CRichEdit(WTL封装)。文本输入框是基本控件中最难实现的控件之,估计这也是Chrome浏览器(For Windows)直使用原生文本输入框封装,而不是自行实现的原因。很多情况下,默认的输入框足够使用,对于些简单的限制(例如只能输入数字)也可以通过对原生控件...

weixin_34384681的博客 365

c语言int 转bool_初入C语言江湖,才发现无法自拔

昨日开篇发表了篇文章,(扒开门缝看真相,从C语言带你入门),收到了不少粉丝的关注咨询,这给创立此号不久的作者本人定的信心鼓励,也激励了我继续为大家提供更加优质原创内容的决心,也希望在能够提供广大读者精神食粮的同时,大家块学习,块进步。继前篇,今日就正式开始步入了C语言学习的入门咯,其实C语言可也是乐趣满满哦!那今天给大家分享简单的两个主题。、如何创建打开C语言编程文件。找到电脑上上...

weixin_39788740的博客 321

中山大学程序设计与实验_实验 VC6(VS2022)使用与cout输出程序设计

在执行cout语句时,先把插入的数据顺序存放在输出缓冲区中,直到输出缓冲区满或遇到cout语句中的endl(或'\n',ends,flush)为止,此时将缓冲区中已有的数据起输出,并清空缓冲区。2.C++的输出是用“流”(stream)的方式实现的,使用cout流运算符,就必须使用预处理命令把头文件stream包含到本文件中,即<iostream>库,该库定义的名字都在命名空间 std 中,所以 cout 全称是 std::cout。由图中可知,也许在我的电脑中个tab在运行界面占用的是七个空格。

m0_72522227的博客 519

ANSI、Ascii的编码及VC编程

字符编码简介:ASCII,Unicode,UTF-8,GB2312 1. ASCII码 我们知道,在计算机内部,所有的信息最终都表示为个二进制的字符串。每个二进制位(bit)有01两种状态,因此八个二进制位就可以组合出256种状态,这被称为个字节(byte)。也就是说,个字节共可以用来表示256种不同的状态,每个状态对应个符号,就是256个符号,从0000000到111

liuhuiyi的专栏 1262

BBS论坛网址大集合

BBS论坛网址大全,是网络浏览的必备利器。BBS论坛网址大全,是网络浏览的必备利器。BBS论坛网址大全,是网络浏览的必备利器。

bbs论坛数据库设计

挺好的东西,希望大家分享,努力的学好数据库知识。

1.2、第个 C 语言程序

下面的代码会让屏幕显示出 “C 语言”:

融码一生:专注 Python、C/C++、Linux、机器学习 & 深度学习、NLP、算法领域分享 489

c语言sqrt没有被开方怎么回事_初入C语言江湖,才发现无法自拔

昨日开篇发表了篇文章,(扒开门缝看真相,从C语言带你入门),收到了不少粉丝的关注咨询,这给创立此号不久的作者本人定的信心鼓励,也激励了我继续为大家提供更加优质原创内容的决心,也希望在能够提供广大读者精神食粮的同时,大家块学习,块进步。继前篇,今日就正式开始步入了C语言学习的入门咯,其实C语言可也是乐趣满满哦!那今天给大家分享简单的两个主题。、如何创建打开C语言编程文件。找到电脑上上...

weixin_42113552的博客 258

GB2312、UTF-8、UCS-2编码对照:原理、转换与乱码排查实战

字符编码是计算机存储处理文本的基础,它定义了字符与二进制数据之间的映射规则。其核心原理在于为每个字符分配唯的数字标识(码点),并通过特定算法转换为字节序列。理解编码原理对于确保数据在不同系统间正确交换至关重要,尤其在处理中文等多语言文本时。GB2312、UTF-8UCS-2是三种关键编码方案,分别代表了不同时期场景下的技术标准。掌握它们之间的对应关系与转换方法,能有效解决文件乱码、数据库字符集设置错误(如 `error while setting value '.-default-character

weixin_34007886的博客 451
上一篇: ASP编写完整的一个IP所在地搜索类
下一篇: 关于错误信息的显示
netyfhome
博客等级 码龄25年 2粉丝 50原创
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值