图书出租管理系统介绍.docx

上传人:夺命阿水 文档编号:20040 上传时间:2022-07-05 格式:DOCX 页数:61 大小:1.01MB
返回 下载 相关 举报
图书出租管理系统介绍.docx_第1页
第1页 / 共61页
图书出租管理系统介绍.docx_第2页
第2页 / 共61页
图书出租管理系统介绍.docx_第3页
第3页 / 共61页
图书出租管理系统介绍.docx_第4页
第4页 / 共61页
图书出租管理系统介绍.docx_第5页
第5页 / 共61页
点击查看更多>>
资源描述

《图书出租管理系统介绍.docx》由会员分享,可在线阅读,更多相关《图书出租管理系统介绍.docx(61页珍藏版)》请在课桌文档上搜索。

1、一、需求分析 1.问题描述: 随着网络化时代的到来,图书出租信息的网络化可以大大节约人工和时间。为此可以开发出图书管理系统,广泛的应用于学校和工业、商业、企业、事业和行政等单位。实际上,该系统的实用性还是比拟强的。2.系统功能描述1系统功能描述一个图书出租管理系统应该提供包括客户信息管理、图书信息管理、出版社信息管理、用户信息管理、租还书、综合查询等功能。1) 客户、图书、用户信息的数据模块提供增加、删除、改变和查询、浏览等根本的数据维护功能。2) 综合查询模块可以通过用户选择的数据表和相应的查询条件来查询相关内容。3) 客户租还书模块是图书出租管理系统的核心功能,实现客户和图书出租的交互。2

2、功能模块划分图书出租管理系统的数据库功能主要表达在对各种信息的提供、保存、更新和查询操作上,包括图书信息、用户信息、客户信息和租借信息,各个局部的数据内容又有内在联系。针对该系统的数据特点,可以总结出如下的需求。A、用户和客户具有不同的身份。B、用户信息记录用户资料。C、客户信息记录客户的详细信息。D、图书信息记录图书的名称、出版社等信息。E、租借信息记录客户租借图书的信息。图书出租管理系统应该具有客户信息管理、图书信息管理、租还书和综合查询等功能。根据系统功能的需求分析,我们把该系统的功能划分为5个模块。A、客户信息维护模块B、图书信息维护模块C、用户信息管理模块D、客户租还书管理模块E、综

3、合查询模块图书出租管理系统的功能模块如下图系统管理员租书还书客户用户信息管理用户图书出租管理系统综合查询客户信息维护客户租还书信息管理图书信息维护其中,客户租还书管理模块包括以下3个子模块:A、租借图书B、归还图书C、查询租借信息客户信息维护模块包括以下5个子模块:A、增加客户信息B、删除客户信息C、修改客户信息D、查询客户信息E、遍历客户信息该模块图如下列图所示:客户信息维护模块查询客户信息遍历客户信息删除客户信息修改客户信息增加客户信息同理,如图书信息管理、用户信息管理模块也被类似的分为增加、删除、修改、查询和遍历5个模块。3系统流程分析图书出租管理系统的开发首先要设计一个登录系统,用户只

4、有输入了正确的用户名和密码方可进入系统内部。系统流程图如下列图所示图书出租管理系统判断用户类型系统管理员客户信息维护租书还书客户用户信息管理用户综合查询客户租还书信息管理图书信息维护4数据流程图5系统功能分析和需求总结后,设计如下的数据项和数据结构。A、图书信息,包括图书编号、图书名称、作者等数据项B、租书信息,包括客户编号、图书编号、租借日期等数据项。C、客户信息,包括客户编号、姓名、密码等数据项。D、用户信息,包括用户编号、密码、分类等数据项。3.系统使用权限方面该信息管理系统的角色可以分为3类:1普通用户:拥有客户信息维护、图书信息管理以及客户租还书管理、报表显示和综合查询的权限。2系统

5、管理员:拥有客户信息维护、图书信息管理、用户信息管理以及客户租还书管理和综合查询权限。但其主要功能还是用户信息管理。3客户:租书和还书。二、数据库概念结构设计得到上面的数据项和数据结构后,就可以设计满足需求的各种实体及相互关系,再用实体-关系图,及E-REntiry-Relationship图将这些内容表达出来,为后面的逻辑结构设计打下根底。在这个系统中,所存在的实体有:图书信息实体、租书信息实体、出版社信息实体、客户信息实体和用户信息实体,它们之间的关系如下图。BookIDBookRemainBookNameBookAmountBookBookSortBookWriterBookPriceB

6、ookPublishBookPublishDate图书信息实体E-R图BorrowBookFactReturnDateReaderIDReturnDateBookIDBorrowDate租借书信息关系的属性E-RReaderReaderEmailReaderIDReaderPhoneNoReaderNameReaderBorrowBooksReaderPassword客户信息实体E-R图用户信息实体E-R图UserSortUserPasswordUserUserIDn管理查询与管理租借书书查询与管理用户客户1n实体及其联系的E-R图m1n1n三、逻辑结构设计1.模式设计: 1关系模式:Book

7、BookID、BookName、BookWriter、BookPublish、BookPublishDate、BookPrice、BookSort、BookAmount、BookRemain)BorrowBookReaderID、BookID、BorrowDate、ReturnDate、FactReturnDateReaderReaderID、ReaderName、ReaderPassword、ReaderPhoneNo、ReaderEmail、ReaderBorrowBooksUserUserID、UserPassword、UserSort2数字字典:图书表Book编号字段名称数据结构说明1

8、BookIDnvarchar50图书编号2BookNamenvarchar50图书名称3BookWriternvarchar20图书作者4BookPublishnvarchar50出版社5BookPublishDatedatetime出版日期6BookPricefloat图书定价7BookSortnvarchar50图书分类8BookAmountint图书库存数量9BookRemainint现在库存数量租借信息表BorrowBook编号字段名称数据结构说明1ReaderIDchar6客户编号2BookIDnvarchar50图书编号3BorrowDatedatetime租借日期4ReturnD

9、atedatetime应归还日期5FactReturnDatedatetime实际归还日期客户表Reader编号字段名称数据结构说明1ReaderIDchar6客户编号2ReaderNamevarchar20客户姓名3ReaderPasswordvarchar10客户密码4ReaderPhoneNovarchar15 号码5ReaderEmailvarchar50电子邮箱6ReaderBorrowedBooksint借书数量用户表User编号字段名称数据结构说明1UserIDchar10用户编号2UserPasswordchar10用户密码3UserSortvarchar10用户分类在建立完所

10、有数据表后,要根据数据表之间的关系在属性页中添加关系。为Book表和BorrowBook表之间添加FK_BorrowBook_Book关系,为Book表和PublishCompany之间添加FK_Book_PublishCompany关系,为Reader表和BorrowBook表之间添加FK_BorrowBook_Reader关系。同时在两关系中实现表间的级联更新和级联删除。2子模式设计:1视图在图书出租管理系统中,为便于浏览目前客户租借图书的信息,创立了一个Borrow视图来显示租借记录中客户和所租借图书的一些详细信息以便以后综合浏览。该视图涉及到Book表、BorrowBook表和Read

11、er表,三表间的联系及其各自想要显示的字段,如下列图所示。a三表间的联系b数据字典2)存储过程在图书出租管理系统中,创立实现在客户租还书时对客户表中的客户所借书目和图书表中图书库存量的改变的存储过程和客户借书之前查询客户租借图书数目和图书库存量的存储过程。 图书出租管理系统中,需要创立6个存储过程,分别为:a) ReaderBorrowedNumber 存储过程 该存储过程负责获取客户已经租借的图书数目。其目的是为了在客户租借图书之前判断此客户是否到达借书数目的上限。b) BookNumber 存储过程 此存储过程的功能是根据输入的图书编号得到该图书现在的库存数量。c) BorrowReade

12、r 存储过程 当客户租借某种图书后,该存储过程向客户表的客户的目前所借图书一项添加1。d) BorrowBook 存储过程 当客户租借某种图书后,该存储过程向图书表的相应的图书库现存量中减去1。e) ReturnReader存储过程 当客户归还所借的图书时,该存储过程在客户表中把客户所借的图书数量减1。f) ReturnBook存储过程 当客户归还所借的图书时,该存储过程在图书表中相应的图书现存量中增加1。四、数据库的物理设计为了提高在表中搜索元组的速度,于是在各表中分别建立关于主键升序的索引,如下:1.User表的PK_User索引以UserID的升序建立的2.Reader表的PK_Read

13、er索引以ReaderID的升序建立的3.BorrowBook表的PK_BorrowBook索引以ReaderID、BookID的升序建立的4.Book表的PK_Book索引以BookID的升序建立的五、数据库设计实现及运行由同组同学完成六、界面与数据库的连接由同组同学完成七、界面的实现模块中的功能实现【开发工具:Visual Studio 2000用户登录界面由同组同学完成系统主控界面由同组同学完成用户信息管理界面由同组同学完成由主控界面点击客户信息进入客户信息管理界面点击“添加,可添加记录,截图如下:点击“修改,可对记录进行修改,截图如下:点击“删除,可对记录进行删除,截图如下:代码:na

14、mespace Library/ / Reader 的摘要说明。/ public class Reader : System.Windows.Forms.Formprivate System.Windows.Forms.GroupBox groupBox1;private System.Windows.Forms.Label label1;private System.Windows.Forms.Label label2;private System.Windows.Forms.Label label3;private System.Windows.Forms.Label label4;pri

15、vate System.Windows.Forms.Label label5;private System.Data.SqlClient.SqlConnection sqlConnection1;private System.Data.SqlClient.SqlDataAdapter sqlDataAdapter1;private System.Windows.Forms.Button btnFirst;private System.Windows.Forms.Button btnLast;private System.Windows.Forms.Button btnNext;private

16、System.Windows.Forms.Button btnPrevious;private System.Windows.Forms.Button btnExit;private System.Windows.Forms.Button btnAdd;private System.Windows.Forms.Button btnModify;private System.Windows.Forms.Button btnDelete;private System.Windows.Forms.GroupBox groupBox3;private System.Windows.Forms.Labe

17、l label7;private System.Windows.Forms.TextBox textPassword;private System.Windows.Forms.Button btnCancel;private System.Windows.Forms.Button btnApply;private System.Windows.Forms.TextBox textBorrowBooks;private System.Windows.Forms.TextBox textEmail;private System.Windows.Forms.TextBox textTelNo;pri

18、vate System.Windows.Forms.TextBox textName;private System.Windows.Forms.TextBox textId;private System.Windows.Forms.Label lblDatasetPosition;private System.Data.SqlClient.SqlCommand sqlSelectCommand1;private System.Data.SqlClient.SqlCommand sqlInsertCommand1;private System.Data.SqlClient.SqlCommand

19、sqlUpdateCommand1;private System.Data.SqlClient.SqlCommand sqlDeleteCommand1;private Library.DataSetReader objDataSetReader;/ / 必需的设计器变量。/ private System ponentModel.Container components = null;public Reader()/ Windows 窗体设计器支持所必需的/InitializeComponent();/ TODO: 在InitializeComponent 调用后添加任何构造函数代码/ / 清

20、理所有正在使用的资源。/ protected override void Dispose( bool disposing )if( disposing )if(components != null)components.Dispose();base.Dispose( disposing );#region Windows 窗体设计器生成的代码/ / 设计器支持所需的方法- 不要使用代码编辑器修改/ 此方法的内容。/ private void InitializeComponent() System ponentModel ponentResourceManager resources = ne

21、w System ponentModel ponentResourceManager(typeof(Reader); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.textPassword = new System.Windows.Forms.TextBox(); this.objDataSetReader = new Library.DataSetReader(); this.label7 = new System.Windows.Forms.Label(); this.textEmail = new System.Wi

22、ndows.Forms.TextBox(); this.textName = new System.Windows.Forms.TextBox(); this.textId = new System.Windows.Forms.TextBox(); this.label4 = new System.Windows.Forms.Label(); this.label2 = new System.Windows.Forms.Label(); this.label1 = new System.Windows.Forms.Label(); this.label3 = new System.Window

23、s.Forms.Label(); this.textTelNo = new System.Windows.Forms.TextBox(); this.label5 = new System.Windows.Forms.Label(); this.textBorrowBooks = new System.Windows.Forms.TextBox(); this.btnFirst = new System.Windows.Forms.Button(); this.btnLast = new System.Windows.Forms.Button(); this.btnNext = new Sys

24、tem.Windows.Forms.Button(); this.btnPrevious = new System.Windows.Forms.Button(); this.lblDatasetPosition = new System.Windows.Forms.Label(); this.btnCancel = new System.Windows.Forms.Button(); this.btnApply = new System.Windows.Forms.Button(); this.sqlConnection1 = new System.Data.SqlClient.SqlConn

25、ection(); this.sqlDataAdapter1 = new System.Data.SqlClient.SqlDataAdapter(); this.sqlDeleteCommand1 = new System.Data.SqlClient.SqlCommand(); this.sqlInsertCommand1 = new System.Data.SqlClient.SqlCommand(); this.sqlSelectCommand1 = new System.Data.SqlClient.SqlCommand(); this.sqlUpdateCommand1 = new

26、 System.Data.SqlClient.SqlCommand(); this.btnExit = new System.Windows.Forms.Button(); this.btnAdd = new System.Windows.Forms.Button(); this.btnModify = new System.Windows.Forms.Button(); this.btnDelete = new System.Windows.Forms.Button(); this.groupBox3 = new System.Windows.Forms.GroupBox(); this.g

27、roupBox1.SuspendLayout(); (System ponentModel.ISupportInitialize)(this.objDataSetReader).BeginInit(); this.groupBox3.SuspendLayout(); this.SuspendLayout(); / / groupBox1 / this.groupBox1.BackColor = System.Drawing.Color.Transparent; this.groupBox1.Controls.Add(this.textPassword); this.groupBox1.Cont

28、rols.Add(this.label7); this.groupBox1.Controls.Add(this.textEmail); this.groupBox1.Controls.Add(this.textName); this.groupBox1.Controls.Add(this.textId); this.groupBox1.Controls.Add(this.label4); this.groupBox1.Controls.Add(this.label2); this.groupBox1.Controls.Add(this.label1); this.groupBox1.Contr

29、ols.Add(this.label3); this.groupBox1.Controls.Add(this.textTelNo); this.groupBox1.Controls.Add(this.label5); this.groupBox1.Controls.Add(this.textBorrowBooks); this.groupBox1.Font = new System.Drawing.Font(宋体, 10.5F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, (byte)(134); t

30、his.groupBox1.Location = new System.Drawing.Point(16, 16); this.groupBox1.Name = groupBox1; this.groupBox1.Size = new System.Drawing.Size(408, 160); this.groupBox1.TabIndex = 0; this.groupBox1.TabStop = false; this.groupBox1.Text = 客户信息维护; this.groupBox1.Enter += new System.EventHandler(this.groupBo

31、x1_Enter); / / textPassword / this.textPassword.DataBindings.Add(new System.Windows.Forms.Binding(Text, this.objDataSetReader, Reader.ReaderPassword, true); this.textPassword.Location = new System.Drawing.Point(88, 80); this.textPassword.Name = textPassword; this.textPassword.Size = new System.Drawi

32、ng.Size(100, 23); this.textPassword.TabIndex = 13; / / objDataSetReader / this.objDataSetReader.DataSetName = DataSetReader; this.objDataSetReader.Locale = new System.Globalization.CultureInfo(zh-CN); / / label7 / this.label7.Location = new System.Drawing.Point(16, 88); this.label7.Name = label7; th

33、is.label7.Size = new System.Drawing.Size(72, 23); this.label7.TabIndex = 12; this.label7.Text = 客户口令; / / textEmail / this.textEmail.DataBindings.Add(new System.Windows.Forms.Binding(Text, this.objDataSetReader, Reader.ReaderEmail, true); this.textEmail.Location = new System.Drawing.Point(288, 16);

34、this.textEmail.Name = textEmail; this.textEmail.Size = new System.Drawing.Size(100, 23); this.textEmail.TabIndex = 10; / / textName / this.textName.DataBindings.Add(new System.Windows.Forms.Binding(Text, this.objDataSetReader, Reader.ReaderName, true); this.textName.Location = new System.Drawing.Poi

35、nt(88, 48); this.textName.Name = textName; this.textName.Size = new System.Drawing.Size(100, 23); this.textName.TabIndex = 8; / / textId / this.textId.DataBindings.Add(new System.Windows.Forms.Binding(Text, this.objDataSetReader, Reader.ReaderID, true); this.textId.Location = new System.Drawing.Poin

36、t(88, 16); this.textId.Name = textId; this.textId.Size = new System.Drawing.Size(100, 23); this.textId.TabIndex = 7; / / label4 / this.label4.Location = new System.Drawing.Point(216, 24); this.label4.Name = label4; this.label4.Size = new System.Drawing.Size(72, 23); this.label4.TabIndex = 3; this.la

37、bel4.Text = 电子邮件; / / label2 / this.label2.Location = new System.Drawing.Point(16, 56); this.label2.Name = label2; this.label2.Size = new System.Drawing.Size(72, 23); this.label2.TabIndex = 1; this.label2.Text = 客户姓名; / / label1 / this.label1.Location = new System.Drawing.Point(16, 24); this.label1.

38、Name = label1; this.label1.Size = new System.Drawing.Size(72, 23); this.label1.TabIndex = 0; this.label1.Text = 客户编号; / / label3 / this.label3.Location = new System.Drawing.Point(216, 56); this.label3.Name = label3; this.label3.Size = new System.Drawing.Size(64, 23); this.label3.TabIndex = 2; this.label3.Text = 联系 ; / / textTelNo / this.textTelNo.DataBindings.Add(new System.Windows.Forms.Binding(Text, this.objDataSetReader, Reader.ReaderPhoneNo, true); this.textTelNo.Location = new Syste

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 在线阅读 > 生活休闲


备案号:宁ICP备20000045号-1

经营许可证:宁B2-20210002

宁公网安备 64010402000986号