您的位置:首页 > 博客中心 > 数据库 >

BBS数据库设计

时间:2022-03-14 04:06

BBS数据库设计

在这个论坛中有三张表:1用户表(user)2管理员表(manager)3帖子表(post).

1用户表user:

字段的名字 含义 类型 约束
userId 自增列 int 主键
userName 用户名 varchar not null
userPassword 密码 varchar not null
userEmail 邮箱 varchar not null
userNickname 昵称 varchar not null
userBirthday 生日 timestamp not null
sex 性别 int not null
userPoints 积分 int not null
userRemark 备注 varchar

2管理员表(manager)

字段名称 含义 类型 约束
managerId 自增列 int 主键
managerName 用户名 varchar not null
managerPassword 密码 varchar not null

3帖子表(post)

字段名称 含义 类型 约束
postId 自增列 int 主键
userId 作者ID int not null
topic 帖子的标题 varchar not null
matter 帖子的内容 varchar not null
postTime 发帖的时间 timestamp not null

 

本类排行

今日推荐

热门手游