Computer Science – Databases | e-Consult
Databases (1 questions)
Login to see all questions.
Click on a question to view the answer
A single-table database schema for this scenario would be a table named Members_Books. This table would contain the following fields:
- MemberID (Integer, Primary Key): A unique identifier for each member.
- Name (Text): The name of the member.
- Address (Text): The address of the member.
- Title (Text): The title of the book.
- Author (Text): The author of the book.
- ISBN (Text): The ISBN number of the book.
- BorrowDate (Date): The date the book was borrowed.
- ReturnDate (Date): The date the book was returned (can be NULL if not returned).
Each row in this table would represent a single book borrowed by a member. The primary key (MemberID) links the book record to the member record. This approach avoids the need for separate tables and joins, suitable for a small library with limited data.
Table Structure:
| MemberID | Name | Address | Title | Author | ISBN | BorrowDate | ReturnDate |