图书馆管理系统数据表

  • 格式:docx
  • 大小:15.68 KB
  • 文档页数:3

表的初步设计:

表名 属性

Reader Name,ReaderID,Password,PhoneNumber

Librarian Name,LibID,Password

Book bookName,bookID,shelfID,

bookPublisher,bookAuthor,Version,

Circulation,bookState

Shelf ShelfID,ShelfName

BorrowRecord BR_recordID, BR_bookID, BR_ReaderID,

BR_borrowDate, BR_returnDate

FineRecord fr_ID,fr_Date,fr_Fine,ReaderID,BorrowRecordID

添加关键字:

表名 属性 关键字

Reader Name,ReaderID,Password,PhoneNumber, ReaderID

Librarian Name,LibID,Password LibID

Book bookName,bookID,shelfID,

bookPublisher,bookAuthor,Version,

Circulation,bookState bookID

Shelf ShelfID,ShelfName ShelfID

BorrowRecord BR_recordID, BR_bookID, BR_ReaderID,

BR_borrowDate, BR_returnDate BR_recordID

FineRecord fr_ID,fr_Date,fr_Fine,ReaderID,

BorrowRecordID fr_ID

添加外键: 表名 属性 关键字 外键

Reader Name,ReaderID,Password,PhoneNumber, ReaderID

Librarian Name,LibID,Password LibID

Book bookName,bookID,shelfID,

bookPublisher,bookAuthor,Version,

Circulation,bookState bookID shelfID

Shelf ShelfID,ShelfName ShelfID

BorrowRecord BR_recordID, BR_bookID, BR_ReaderID,

BR_borrowDate, BR_returnDate recordID ReaderID

FineRecord fr_ID,fr_Date,fr_Fine,ReaderID,

BorrowRecordID fr_ID ReaderID,

BorrowRecordID

第三范式规范化:

表名 属性 关键字 外键

Reader ReaderID,PhoneNumber ReaderID PhoneNumber

ReaderInfo Ri_PhoneNumber,Ri_Password,

Ri_Name Ri_PhoneNumber

Librarian Name,LibID,Password LibID

Book bookID,bookName,shelfID,

PublisherID, AuthorID,Version,

Circulation,bookState bookID shelfID,

PublisherID,

AuthorID

Publisher PublisherID,PublisherName PublisherID

Author AuthorID, AuthorName AuthorID

Shelf ShelfID,ShelfName ShelfID

BorrowRecord BR_recordID, BR_bookID,

BR_ReaderID, BR_recordID ReaderID BR_borrowDate, BR_returnDate

FineRecord fr_ID,fr_Date,fr_Fine,ReaderID,

BorrowRecordID fr_ID ReaderID,

BorrowRecordID