设计一个关于图书管理系统的Mysql数据库表
时间: 2023-05-27 15:06:33 浏览: 86
1. 书籍表(book)
- 编号(id):自增主键,整型
- 书名(title):字符串,不可为空
- 作者(author):字符串,不可为空
- 出版社(publisher):字符串,不可为空
- 出版日期(publish_date):日期类型,不可为空
- 定价(price):浮点型,不可为空
- 图书类型(book_type):字符串,不可为空
- ISBN号(isbn):字符串,不可为空
- 库存(stock):整型,不可为空
2. 借阅记录表(borrow_record)
- 记录编号(id):自增主键,整型
- 书籍编号(book_id):外键,整型,关联书籍表的编号
- 借阅人(borrower):字符串,不可为空
- 借阅日期(borrow_date):日期类型,不可为空
- 还书日期(return_date):日期类型,可为空
- 是否归还(is_returned):布尔类型,不可为空
3. 用户表(user)
- 编号(id):自增主键,整型
- 用户名(username):字符串,不可为空
- 密码(password):字符串,不可为空
- 姓名(name):字符串,不可为空
- 性别(gender):字符串,可为空
- 手机号码(phone_number):字符串,可为空
- 邮箱(email):字符串,可为空
4. 管理员表(admin)
- 编号(id):自增主键,整型
- 用户名(username):字符串,不可为空
- 密码(password):字符串,不可为空
- 姓名(name):字符串,不可为空
- 性别(gender):字符串,可为空
- 手机号码(phone_number):字符串,可为空
- 邮箱(email):字符串,可为空
5. 借阅规则表(borrow_rule)
- 规则编号(id):自增主键,整型
- 借阅时长(borrow_duration):整型,不可为空
- 最大借阅数量(max_borrow_num):整型,不可为空
- 最大预约数量(max_reserve_num):整型,不可为空