BBS数据库设计

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

 

posted on 2014-12-21 09:51  aicpcode  阅读(404)  评论(0编辑  收藏  举报

导航