云题海 - 专业文章范例文档资料分享平台

当前位置:首页 > 数据库课程设计——图书管理系统

数据库课程设计——图书管理系统

  • 62 次阅读
  • 3 次下载
  • 2025/12/12 5:28:27

表中列名 姓名 书籍编号 书籍名称 借书证号 借阅时间 应还时间 表4-2-5 还书记录信息表

表中列名 姓名 书籍编号 书籍名称 借书证号 借阅时间 归还时间

表4-2-6 罚款信息表

表中列名 书籍编号 借书证号 姓名 书籍名称 超期时间 罚款金额 数据种类及长度 Varchar(10) Varchar(20) Varchar(30) Int Datetime datetime 可否为空 Not null Not null Not null Not null Not null Not null 数据种类及长度 Varchar(10) Varchar(20) Varchar(30) Int Datetime datetime 可否为空 Not null Not null Not null Not null Not null Not null 数据种类及长度 Varchar(20) Int Varchar(10) Varchar(30) Int Money 可否为空 Not null Not null Not null Not null Not null Not null

5.物理结构设计阶段

物理设计阶段的目标和任务

数据库的物理设计就是为逻辑数据模型选取一个最合适应用要求的物理结构的过程,在 这个阶段中要完成两大任务:

1) 确定数据库的物理结构,在关系数据库中主要是存取方法和存储结构; 2) 对物理结构进行评价,评价的重点是时间和空间效率。

数据存储方面

为数据库中各基本表建立的索引如下:

1) 由于基本表readers_table,books_table的主码借书证号,书籍编号经常在查询

条件和连接操作的连接条件中出现,且它们的值唯一,在两个属性上建立唯一性索引;

2) 借阅信息基本表borrow_record_table的一属性借书证号,书籍编号,经常在查询

条件中出现,考虑在其之上建立聚簇索引;

3) 还书信息基本表return_record_table的一属性借书证号,书籍编号,经常在查询

条件中出现,考虑在其之上建立聚簇索引;

6.数据库实施与维护

创建数据库,数据表

创建libarysystem数据库 create database libarysystem on primary (

name=libarysystem_data, size=10, maxsize=50,

filename=\ filegrowth=10% ) log on (

name=libarysystem_log, size=10MB, maxsize=50MB,

filename=\ filegrowth=10MB )

创建books_stytle_table表 create table books_stytle_table (

种类编号 int primary key, 种类名称 varchar(30) not null )

创建readers_table表 Create table readers_table (

借书证号 int primary key, 姓名 varchar(10) not null, 性别 char(2) default'男', 读者类别 varchar(20) null, 注册日期 Datetime not null

)

创建books_table表 Create table books_table (

书籍编号 varchar(20) primary key, 书籍名称 varchar(30) not null, 作者 char(30) not null, 出版社 varchar(30) null, 出版日期 Datetime null, 单价 Money not null, 借阅情况 varchar(20) not null )

创建borrow_record_table表

create table borrow_record_table (

姓名 varchar(10) not null, 书籍编号 varchar(20) not null, 书籍名称 varchar(30) not null, 借书证号 int not null, 借阅时间 Datetime not null, 应还时间 Datetime not null,

foreign key(书籍编号) references books_table(书籍编号), foreign key(借书证号) references readers_table(借书证号) )

搜索更多关于: 数据库课程设计——图书管理系统 的文档
  • 收藏
  • 违规举报
  • 版权认领
下载文档10.00 元 加入VIP免费下载
推荐下载
本文作者:...

共分享92篇相关文档

文档简介:

表中列名 姓名 书籍编号 书籍名称 借书证号 借阅时间 应还时间 表4-2-5 还书记录信息表 表中列名 姓名 书籍编号 书籍名称 借书证号 借阅时间 归还时间 表4-2-6 罚款信息表 表中列名 书籍编号 借书证号 姓名 书籍名称 超期时间 罚款金额 数据种类及长度 Varchar(10) Varchar(20) Varchar(30) Int Datetime datetime 可否为空 Not null Not null Not null Not null Not null Not null 数据种类及长度 Varchar(10) Varchar(20) Varchar(30) Int Datetime datetime 可否为空 Not null Not null Not null Not null Not null Not nu

× 游客快捷下载通道(下载后可以自由复制和排版)
单篇付费下载
限时特价:10 元/份 原价:20元
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
VIP包月下载
特价:29 元/月 原价:99元
低至 0.3 元/份 每月下载150
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信:fanwen365 QQ:370150219
Copyright © 云题海 All Rights Reserved. 苏ICP备16052595号-3 网站地图 客服QQ:370150219 邮箱:370150219@qq.com