日期:2014-05-16 浏览次数:20425 次
create database News
--新闻类别表: CId,类别名:CategoryName
create table T_Category(CId int identity primary key,CategoryName nvarchar(50))
--新闻表:Nid,标题:Title,作者:Author,新闻内容:Content,创建时间:CreatTime,查看次数:Num,类别id:CId
create table T_News(NId int identity primary key,Title nvarchar(100),Author nvarchar(50),Content text,CreatTime datetime,CKNum int,Cid int)
--用户表:Uid,账号:AccountNum,密码:Password,邮箱:Email,个人简介:Grjl,性别:Sex,年龄:Age,角色:Role
create table T_Users(Uid int identity primary key,AccountNum nvarchar(50),Password varchar(50),Email varchar(50),Grjj nvarchar(200),Sex nvarchar(10),Age int,Role int)
--新闻评论表:CommentId,新闻表Id(所属新闻id):Nid,发表时间:FbTime,评论内容:CommentContent,评论作者:CommentAuthor
create table T_Comment(CommentId int identity primary key,Nid int,FbTime datetime,CommentContent nvarchar(500),CommentAuthor nvarchar(50))