
















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!

















First Normal Form (1NF) BAGEL ORDER PK Bagel Order ID PK Bagel ID Order Date First Name Last Name Address 1 Address 2 City State Zip Mobile Phone Delivery Fee Bagel Name Bagel Description Bagel Price Bagel Quantity Special Notes
Third Normal Form (3NF) BAGEL ORDER BAGEL ORDER LINE ITEM BAGEL PK Bagel Order ID PK / FK Bagel Order ID PK Bagel ID FK Customer ID 1:M PK / FK Bagel ID M:1 Bagel Name Order Date Bagel Quantity Bagel Description Delivery fee Bagel Price Special Notes M: CUSTOMERS BAGEL PK Customer ID First Name Last Name Address 1 Address 2 City State Zip Mobile Number To move further into third normal form, I needed to look at the tables to make sure any of them could be broken down even more. Looking at the Bagel order table in second normal form, I notice that this table could be broken down further. I extracted all the attributes that had to do with customers information. I called the table “Costumers” and assigned Customer ID as the primary key, which would be the foreign key in the Bagel Order table. All the costumer information can be put into one table now. This is very helpful because now this information can be reused if the customer orders more bagels in the future and the costumer info is already saved in the bagel shops computer. The cardinality between bagel order and the new customer table will become many-to-one after its broken into two tables, because there can be many orders per customer but there cannot be many customers per order. The other two tables will keep all its same attributes listed and its cardinalities between each other.
Final Physical Database Model BEGAL ORDER BAGEL ORDER LINE ITEM BAGEL PK Bagel Order ID INT PK / FK bagel_order_id INT PK Bagel ID CHAR (2) FK Customer ID INT 1:M PK / FK bagel_id CHAR(2) M:1 Bagel Name VARCHAR(20) Order Date TIMESTAMP Bagel quantity INT Bagel Description VARCHAR(50) Delivery fee NUM (2,2) Bagel Price NUM(2,2) Special Notes VARCHAR (50) M: CUSTOMERS PK Customer ID INT First Name VARCHAR(20) Last Name VARCHAR(20) Address 1 VARCHAR(20) Address 2 VARCHAR(10) City VARCHAR(20) State CHAR(2) Zip CHAR(10) Mobile Number CHAR(10)