论坛表结构

       为了演示继承与关系,我们创建一个论坛数据库,在数据库中创建三个表:

1、 论坛版块分类表 dbo.Categories

字段名

字段类型

可空

备注

CategoryID

int

not null

identity/主键

CategoryName

varchar(50)

not null

 

2、 论坛版块表 dbo.Boards

字段名

字段类型

可空

备注

BoardID

int

not null

identity/主键

BoardName

varchar(50)

not null

 

BoardCategory

int

not null

对应论坛版块分类表的CategoryID

3、 论坛主题表 dbo.Topics

字段名

字段类型

可空

备注

TopicID

int

not null

identity/主键

TopicTitle

varchar(50)

not null

 

TopicContent

varchar(max)

not null

 

ParentTopic

int

null

如果帖子是主题贴这个字段为null,否则就是所属主题id

TopicType

tinyint

not null

0 – 主题贴

1 – 回复帖

相关文章:

  • 2021-06-08
  • 2021-12-20
  • 2021-06-04
  • 2021-11-17
  • 2021-06-30
  • 2021-11-21
  • 2021-08-02
猜你喜欢
  • 2022-01-04
  • 2021-11-03
  • 2021-07-22
  • 2021-06-10
  • 2021-12-09
  • 2021-10-14
相关资源
相似解决方案