create database tsg;
use tsg;
create table ts_Book(
bnumber varchar(15) not null primary key comment'图书编号',
name varchar(15) not null comment'书名',
author varchar(20) not null comment'作者',
price numeric(5,2) not null comment'价格',
press varchar(45) not null comment'出版社',
quabtity int(30) not null comment'库存量',
ISBN varchar(50) not null comment'ISBN'
);
create table ts_Reader(
rnumber varchar(15) not null primary key comment'借书证号',
name varchar (12) not null comment'读者姓名',
sex enum('男','女') not null comment'读者性别',
major varchar (12) not null unique comment'专业',
count int(30) not null comment'借书量'
);
归还
create table ts_hlend(
bnumber varchar(15) not null primary key comment'编号',
rnumber varchar(15) not null comment'借书证号',
ISBN varchar(50) not null comment'ISBN',
bookid char(10) not null comment'图书ID',
borrowtime datetime not null comment'借书时间',
returntime datetime not null comment'归还时间'
);
借书
create table ts_tlend(
rnumber varchar(15) not null comment'借书证号',
ISBN varchar(50) not null comment'ISBN',
bookid char(10) not null primary key comment'图书ID',
borrowtime datetime not null comment'借书时间',
returntime datetime not null comment'归还时间'
);
借还情况
create table ts_tblend(
ISBN varchar(50) not null comment'ISBN',
bookid char(10) not null primary key comment'图书ID',
borrow enum('是','否') not null comment'是否借出'
);
create table ts_worker(
wname char(20) not null primary key comment'姓名',
password varchar(20) not null comment'密码'
);
load data local infile 'C:\\Users\\zhaog\\Desktop\\ts_book.txt' into table ts_book;
select * from ts_book;
insert into ts_tlend(rnumber,ISBN,bookid,borrowtime,returntime) values('1006','赵敏','女','物联网','67');
alter table ts_hlend add foreign key (rnumber)
references ts_reader(rnumber);
alter table ts_hlend add foreign key (bnumber)
references ts_book(bnumber);
alter table ts_tlend add foreign key (rnumber)
references ts_reader(rnumber);
alter table ts_tlend add foreign key (rnumber)
references ts_reader(rnumber);
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
摘要 1 1.概述 1 1.1国内外研究背景 1 1.2报告组织形式 2 2.需求分析 2 3.数据库设计 4 3.1概念模型设计 4 3.2关系模型设计 6 4.数据库开发 6 4.1表结构设计 7 4.2表数据编写 9 4.3表结构创建与修改 12 4.4表数据插入与修改 14 5.数据库应用 18 5.1查询 18 5.2视图 22 5.3事务 26 5.4用户与权限 28 6.结论 28 参考文献 29 图书馆人员结构复杂,人员数量有限,涉及方面很广,如果还使用手工操作处理图书借阅问题,工作将非常繁琐,需要大量的人力、物理、财力,极大的浪费了资源,本次设计任务是基于Mysql的一款设计,数据库的建立和应用,对于图书管理人员来说,图书馆管理包括图书信息管理、图书类别管理、借阅信息管理、管理员信息管理等等。而这些项目在过去靠手工操作,需要手工记录这些事情,不但麻烦,还经常出错,给广大用户带来很多不便,因此,开发这样一套图书馆管理系统软件。让管理员方便的管理图书及用户信息,方便用户查找图书。 关键字:Mysql、数据库、图书管理系统
资源推荐
资源详情
资源评论
收起资源包目录
建表.zip (32个子文件)
建表
2.c 5KB
2.dsw 510B
2.dsp 3KB
ts_worker.txt 109B
worker文档.PNG 9KB
hlend文档.PNG 17KB
ts_tblend.txt 129B
book文档.PNG 33KB
ts_tlend.txt 303B
tlend文档.PNG 14KB
2.opt 48KB
worker.PNG 8KB
2.plg 723B
hlend.PNG 15KB
reader文档.PNG 22KB
建表.txt 2KB
ts_book.txt 410B
2.ncb 33KB
ts_hlend.txt 179B
tblend.PNG 10KB
reader.PNG 13KB
ts_reader.txt 281B
book.PNG 17KB
Debug
vc60.pdb 60KB
2.exe 188KB
2.pdb 361KB
2.pch 2.79MB
2.ilk 182KB
2.obj 21KB
vc60.idb 41KB
tlend.PNG 13KB
tblend文档.PNG 10KB
共 32 条
- 1
资源评论
十三衙
- 粉丝: 558
- 资源: 10
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功