用sql做一个图书管理系统(图书管理系统java源码免费)
大家好,用sql做一个图书管理系统相信很多的网友都不是很明白,包括图书管理系统java源码免费也是一样,不过没有关系,接下来就来为大家分享关于用sql做一个图书管理系统和图书管理系统java源码免费的一些知识点,大家可以关注收藏,免得下次来找不到哦,下面我们开始吧!
用sql设计一个图书馆数据库
create database library
on primary
(name='library_1',
filename='C:\data\library_1.mdf',
size=5MB,
maxsize=30MB,
filegrowth=15%)
log on
(name='library_2',
filename='C:\data\library_1.ldf',
size=3MB,
maxsize=20MB,
filegrowth=15%)
use library
create table readernote
(readerno char(5) not null primary key,
unit varchar(20) not null,
name varchar(8) not null,
sex char(2) not null,
job varchar(8),
address varchar(20) not null)
insert into readernote values('00001','学校','张3','男','主任')
insert into readernote values('00002','学校','李四','男','学生',')
insert into readernote values('00003','学校','王5','女','主任')
insert into readernote values('00004','学校','赵6','男','教师')
insert into readernote values('00005','学校','徐7','女','教师')
create table book
(bookno char(8) not null primary key,
classno char(5) not null,
bookname varchar(20) not null,
author varchar(8) not null,
cbunit varchar(20) not null,
price int not null)
insert into book values('00000001','00001','计算机网络','张平','清华大学出版社',38)
insert into book values('00000002','00002','计算机组成原理','章江','清华大学出版社',35)
insert into book values('00000003','00003','计算机语言','李明','清华大学出版社',50)
insert into book values('00000004','00004','数据库设计','刘阳','清华大学出版社',32)
insert into book values('00000005','00005','专业英语','李冬','清华大学出版社',22)
create table borrow
(readerno char(5) not null,
bookno char(8) not null,
borrowdatetime datetime not null,
returndatetime datetime not null,
primary key(readerno,bookno),
foreign key(readerno)references readernote(readerno),
foreign key(bookno)references book(bookno))
insert into borrow values('00001','00000001','2011-01-02','2011-02-01')
insert into borrow values('00002','00000002','2011-02-02','2011-03-01')
insert into borrow values('00003','00000003','2011-03-02','2011-04-01')
insert into borrow values('00004','00000004','2011-04-02','2011-05-01')
insert into borrow values('00005','00000005','2011-05-02','2011-06-01')
create table librarymanager
(jobno char(3) not null primary key,
name varchar(8) not null,
sex char(2) not null,
borndatetime datetime not null,
jobname varchar(10) not null,
salary int not null)
insert into librarymanager values('001','姜某','男','1963-09-11','主任',2000)
insert into librarymanager values('002','王某','女','1964-09-11','副主任',1800)
insert into librarymanager values('003','陈某','男','1980-09-11','管理员',1500)
create login mylogin2
with password='password',
check_policy=off
create user sysadmin for login mylogin2
exec sp_addrolemember'db_owner','sysadmin'
grant all privileges on dbo.readernote to sysadmin
with grant option
grant all privileges on dbo.borrow to sysadmin
with grant option
grant all privileges on dbo.book to sysadmin
with grant option
grant all privileges on dbo.librarymanager to sysadmin
with grant option
create login mylogin3
with password='password',
check_policy=off
create user admin1 for login mylogin3
exec sp_addrolemember'db_owner','admin1'
create login mylogin4
with password='password',
check_policy=off
create user admin2 for login mylogin4
exec sp_addrolemember'db_datareader','admin2'grant all privileges on dbo.readernote to admin1
grant all privileges on dbo.borrow to admin1
grant all privileges on dbo.book to admin1
revoke alter on librarymanager from admin1
grant select on borrow to admin2
create procedure st
@jobno int
As select* from librarymanager
Where jobno=@jobno
Create procedure st1
@readerno int
As select* from borrow
Where readerno=@readerno
Grant exec on st to admin1
Grant exec on st1 to admin2
exec st@jobno=01
exec st1@readerno=00001
select* from book
应该比较接近了。你自己再改改
求用SQL和VB做的图书馆管理系统的设计!
摘要
图书馆管理系统是一些单位不可缺少的部分,书籍是人类不可缺少的精神食粮,尤其对一些学校来说,尤其重要。所以图书馆管理系统应该能够为用户提供充足的信息和快捷的查询手段。但一直以来人们使用传统人工的方式管理图书、期刊、试卷合订本等,这种管理方式存在着许多缺点,如:效率低、保密性差,另外时间一长,将产生大量的文件和数据,这对于查找、更新和维护都带来了不少的困难。
随着科学技术的不断提高,计算机科学日渐成熟,其强大的功能已为人们深刻认识,它已进入人类社会的各个领域并发挥着越来越重要的作用。作为计算机应用的一部分,使用计算机对图书资源信息进行管理,具有着手工管理所无法比拟的优点.例如:检索迅速、查找方便、可靠性高、存储量大、保密性好、寿命长、成本低等。这些优点能够极大地提高图书馆管理的效率,也是企业、学校的科学化、正规化管理,与世界接轨的重要条件。
因此,开发这样一套管理软件成为很有必要的事情,在下面的各章中我们将以开发一套图书馆管理系统为例,谈谈其开发过程和所涉及到的问题及解决方法。
关键字:图书馆,借书,还书,VB,sqlserver2000
Abstract
The library management system is some unit essential part, the books is humanity's essential spiritual food, especially to some schools, especially important.Therefore the library management system should be able to provide the sufficient information and the quick inquiry method for the user.But the people have since always used the traditional artificial way management books, the periodical, the examination paper one-volume edition and so on, this management way has many shortcomings, for example: The efficiency low, the secrecy is bad, moreover time one long, will produce the massive documents and the data, this regarding the search, the renewal and the maintenance has all brought many difficulties.
Along with the science and technology unceasing enhancement, the computer science is mature day after day, its formidable function had known profoundly for the people, it entered the human society each domain and is playing the more and more vital role.As a computer application part, uses the computer to carry on the management for the books resources information, is having the merit which the manual administration center is unable to compare. For example: Retrieves, the search rapidly convenient, the reliability high, the reserves big, the secrecy good, the life long, the cost low status.These merits can enhance the library management enormously the efficiency, also is the enterprise, the school scientific style, the standardized management, with world trail connection important condition.
Therefore, develops this kind of set of management software to become has the necessity matter very much, in following each chapter of we take will develop a set of library management system as the example, chats question and solution which its performance history and will involve.
Key words: Library, taking advantage of book, but also book, VB,sqlserver2000
目录
摘要 2
Abstract 3
第一章前言 5
1.1课题背景及意义 6
1.2课题的来源 6
1.3国内外发展概况 7
1.4研究内容 7
1.5开发工具 7
第二章系统开发环境介绍 8
2.1 Visual Basic的简介 8
2.2 SQL Server 2000简介 9
第三章需求分析 11
3.1系统功能分析 11
3.2系统功能模块 12
3.2.1“借阅管理”模块: 12
3.2.2“书籍管理”模块: 12
3.2.3“读者管理”模块: 12
3.2.4“系统管理”模块: 13
3.3系统结构图 13
3.4数据库关系图 14
3.5系统E-R图 14
3.6数据库设计 19
第四章系统总体设计 22
4.1界面设计 22
4.2系统登陆模块 22
4.3图书添加信息 25
4.4读者信息模块 29
4.5借阅图书模块 31
4.6还书信息模块 36
第五章系统测试 39
5.1测试项目 39
5.2测试方法 40
第六章小结 42
参考文献 43
sql题目,关于图书信息管理系统
在此图书馆管理系统中,使用到了一个重要的连接,即与数据库Accesss相连。数据库中存有图书馆中所信息,包括读者信息、管理员资料、借阅与退还记录。所有与管理有关的数据皆在其中,是保证系统能够正常实现各种功能的一架桥。
1、数据库需求分析
⒈Admi表,即管理员表,记录了用户名和密码。
⒉Admirz表,即管理日志表,记录了书号、书名、图书证号、借/还、操作日期、已付款额。
⒊book表,即图书表,记录了书号、书名、作者、出版社、入库时间、是否借出、价格。
⒋borrowbook表,即借阅表,记录了图书证号、书号、借阅日期、应还日期。
⒌person表,即读者表,记录了图书证号、姓名、性别、系别、班级。
2、数据库表的设计
⒈Admi表
表中记录了可以使管理员进入该系统的用户名及密码,如表1所示。
表1管理员信息表
⒉Admirz表
表中记录借还书日志,用于存下所有对图书操作的记录,以便以后可以翻阅和查找,如表2所示。
表2管理日志表
⒊book表
表中记录了库内所有图书的所有资料,如表3-3。
表3图书表
⒋person表
表中记录库中所有读者的相关信息,如表4所示。
表4读者表
⒌borrowbook表
表内记录了此时图书的借阅情况,如表5所示。
表5借阅表
好了,文章到此结束,希望可以帮助到大家。