Computer Science – 8.1 Database Concepts | e-Consult
8.1 Database Concepts (1 questions)
Login to see all questions.
Click on a question to view the answer
Entities: Book, Member, Borrowing Record
Table: Book
| Attribute | Data Type | Primary Key? |
| ISBN | VARCHAR (13) | Yes |
| Title | VARCHAR (255) | No |
| Author | VARCHAR (255) | No |
| PublicationYear | INT | No |
Table: Member
| Attribute | Data Type | Primary Key? |
| MemberID | INT | Yes |
| Name | VARCHAR (255) | No |
| Address | VARCHAR (255) | No |
| PhoneNumber | VARCHAR (20) | No |
Table: BorrowingRecord
| Attribute | Data Type | Primary Key? |
| MemberID | INT | Yes |
| ISBN | VARCHAR (13) | Yes |
| BorrowDate | DATE | No |
| ReturnDate | DATE | No |
Relationships:
- Book 1:N BorrowingRecord: A book can be borrowed multiple times.
- Member 1:N BorrowingRecord: A member can borrow multiple books.
Normalisation Levels:
- 1NF: All attributes are atomic (indivisible).
- 2NF: The tables are in 2NF because they are in 1NF and all non-key attributes are fully functionally dependent on the primary key.
- 3NF: The tables are in 3NF because there are no transitive dependencies. For example, in the
BorrowingRecordtable,ReturnDateis only dependent onMemberIDandISBN, not onMemberorBookattributes.