Assignment 1 Comp 230
Assignment 1 Comp 230
COMP 230
The Library Management System is built around three main entities: Books, Members, and
Borrowing, each with specific attributes and constraints to ensure data integrity and
efficient management.
1. Books
• Attributes:
2. Members
• Attributes:
3. Borrowing
• Attributes:
o Borrow Date – Required field that records when the book was borrowed.
o Return Date – Can be left empty if the book has not yet been returned.
Assumptions:
1. Patient:
o Name
o Insurance
o Admitted Date
o Check-out Date
2. Doctor
o Name
o Specialization
3. Test
o ID (Test ID)
o Name of Test
o Result
o Date
o Time
QUESTION 3:
To satisfy First Normal Form (1NF), a table must meet two criteria: each cell must hold a
single, indivisible value (atomicity), and each row must have a unique identifier. The table
shown in the diagram meets these conditions. However, for the table to comply with
Second Normal Form (2NF), it must first be in 1NF and must not have partial
dependencies. This means that no non-key attribute should depend only on part of a
composite primary key. Since the composite primary key for this table is (SS#, Test ID), we
need to ensure that all non-key attributes are dependent on the entire composite key and
not just one part of it. If this condition is met, the table adheres to 2NF.
QUESTION 4: Restaurant Management System
1. Customer
2. Restaurant
3. Manager
4. Waiter
6. Items
7. Table
8. Chef
9. Bill
10. Cashier