《图书馆管理系统结构图》由会员分享,可在线阅读,更多相关《图书馆管理系统结构图(13页珍藏版)》请在金锄头文库上搜索。
1、图书馆管理系统结构图库存盘点系统通过验证退出系统清除历史信息选择续借书籍图书续借系统图书续借成功22图书统计系统借阅图书次现存图书数量再借图书数量丢图书数量超期图书数量第四小组数据库说明:数据库名(DateBook);主要有五张表:Book(book_id,isbn,title借,author,publisher,price,amount,total_amount,add_date)Borrowbook),reader(reader_id,book_id,borrpw_date,revertible_date丢失图书表Lossbook(book_id,reader_id,loss_date千里
2、 贝admin ( admin_id , admin_namecreate_date , phone, email , password). 具体ER图如下:(reader_id,student_id,reader_nameacademy,department,register.summary),管理人员表(admin):读者表(reader):图书表(book):丢失图书表(Lossbook)Book表查询lossbook 表中的信息。f可以通过Book表查询 borrowbook/ 可以通过Book表查询 borrowbook 表中的信Lossbook 表是主 键 ,reader 是借书表
3、(borrowbook):表间关系:创建数据库CREATEDATABASDateBookuseDateBookGo创建admin表CREATETABLEadmin(admin_idintIDENTITY。,1)NOTNuLl,admin_namevarchar(30)CONSTRAINPK_adminInfoPRIMARYKEYCLUSTEREDcreate_datedatetimeNOTNULL,phonevarchar(15)NOTNULL,emailvarchar(80)NOTNULL,passwordvarchar(30)NOTNULL)创建Book表CREATETABLEBook(b
4、ook_idintIDENTITY(1,1)CONSTRAINTK_BookPRIMARYKEYCLUSTEREDisbnvarchar(15)NOTNULL,titlevarchar(100)NOTNULL,authorvarchar(100)NOTNULL,publishervarchar(80)NOTNULL,pricefloatNOTNULL,amountintNOTNULL,total_amountintNOTNULL,adddatedatetimeNOTNULL)创建borrowbook表CREATETABLEborrowbook(reader_idintCONSTRAINFTK_
5、borrowbook_readerFOREIGNKEYREFERENCErSeader(reader_id),book_idintCONSTRAINFTK_borrowbook_BookFOREIGNKEYREFERENCEBSook(book_id),borrpw_datedatetimeNOTNULL,revertible_datedatetimeNOTNULL,CONSTRAINTPK_sno_CNOPRIMARYKEY(book_id,reader_id)创建reader表CREATETABLEreader(reader_idintIDENTITY(1,1)CONSTRAINTPK_r
6、eaderPRIMARYKEYCLUSTERED,student_idvarchar(50)NOTNULL,reader_namevarchar(50)NOTNULL,ageintNOTNULL,academyvarchar(30)NOTNULL,departmentvarchar(50)NOTNULL,registerdatetimeNOTNULL,summaryvarchar(300)NULL)创建Lossbook表CREATETABLELossbook(book_idintCONSTRAINFTK_Lossbook_BookFOREIGNKEYREFERENCEBSook(book_id),reader_idintCONSTRAINTFK_Lossbook_readerFOREIGNKEYREFERENCErSeader(reader_id),loss_datedatetimeNOTNULL)谢谢欣赏!