(1) In the library borrowing management system, a record of borrowing, which we can call "borrowing history" or "loan record," would capture essential information such as the borrower's identification (借书证号), book details (书号、书名、作者、单价、出版社), borrowing date (借书日期), and return date (还书日期). This data can be represented in an Entity-Relationship (ER) model as follows[^1]:
- **Reader** (借书证号, 姓名, 性别, 单位)
- **Book** (书号, 书名, 作者, 单价, 出版社)
- **BorrowingHistory** (借书证号, 书号, 借书日期, 还书日期)
The relationship between these entities would typically be:
- Reader -> BorrowingHistory (借书证号, 外键)
- Book -> BorrowingHistory (书号, 外键)
(2) The ER model can be translated into a relational model with the following tables:
- **Reader** (ReaderID (主键), Name, Gender, Department)
- **Book** (BookID (主键), Title, Author, Price, Publisher)
- **BorrowingRecord** (BorrowingRecordID (主键), ReaderID (外键, references Reader.ReaderID), BookID (外键, references Book.BookID), BorrowDate, ReturnDate)