230 Assignment
230 Assignment
COMP 230
Vrinda Sharma
300216393
2. Members:
3. Borrowing:
Assumptions:
4. ReturnDate can be NULL, as a book may not have been returned yet.
1. Patients
3. Tests
Unnormalized table
For a table to be in First Normal Form (1NF), it must meet two conditions:
atomicity, where each cell contains a single, indivisible value, and
uniqueness of rows, ensuring that each row has a distinct identifier—both of
which are satisfied in this case. However, to qualify for Second Normal Form
(2NF), the table must first be in 1NF and must not have any partial
dependencies, meaning no non-key attribute should depend on only a part of
a composite primary key. Given that the primary key in this table is (p_ID,
t_ID), we need to check if any non-key attribute is dependent on just one of
these columns rather than the entire composite key. If no such dependency
exists, the table already conforms to 2NF.
3NF
Question 4: Online Restaurant Reservation System
Entities and Their Attributes
1. Customer
2. Reservation
3. Table
4. Manager
Attributes: ManagerId (PK), Name, Contact
5. Waiter
6. Order
7. Item
8. Bill
Relationships
Each order has exactly one bill, and each bill belongs to only one order.
A waiter can serve multiple orders, but each order is served by one
waiter.