Section 1
First Normal Form
I gathered all the data from the sales invoice and created an
unnormalized dataset. I determined the primary key that provided
me with a unique value for all my records in this table. I used
composite primary keys because both keys would be able to
uniquely identify all the data in the table. Finally, I removed all the
repeating groups and made the address atomic by creating
separate fields for each one.
Donut ID (PK)
Donut Order ID
(PK)
Customer ID
Order Date
First Name
Last Name
Street Address
Apt #
City
State
Zip Code
Home Phone
Mobile Phone
Other Phone
Quantity
Name
Description
Unit Price
Notes
, Second Normal Form
There is a multivalued key, so I looked for partial dependencies
on part of this key. I had a partial dependency on Donut Order ID.
I appropriated everything that was dependent on the Donut Order
ID and generated a second table with them. I did the same for
Donut ID and separated the rest into the Quantity table to provide
a link between the two.
Donut Order Quantity Donut
Donut Order (PK) Donut Order Donut ID (PK)
Customer ID (PK)(FK) Name
Last Name Donut ID (PK)(FK) Description
First Name Quantity Unit Price
Street Address
Apt #
City
State
Zip Code
Home Phone
Mobile Phone
Other Phone
Notes
Order Date
First Normal Form
I gathered all the data from the sales invoice and created an
unnormalized dataset. I determined the primary key that provided
me with a unique value for all my records in this table. I used
composite primary keys because both keys would be able to
uniquely identify all the data in the table. Finally, I removed all the
repeating groups and made the address atomic by creating
separate fields for each one.
Donut ID (PK)
Donut Order ID
(PK)
Customer ID
Order Date
First Name
Last Name
Street Address
Apt #
City
State
Zip Code
Home Phone
Mobile Phone
Other Phone
Quantity
Name
Description
Unit Price
Notes
, Second Normal Form
There is a multivalued key, so I looked for partial dependencies
on part of this key. I had a partial dependency on Donut Order ID.
I appropriated everything that was dependent on the Donut Order
ID and generated a second table with them. I did the same for
Donut ID and separated the rest into the Quantity table to provide
a link between the two.
Donut Order Quantity Donut
Donut Order (PK) Donut Order Donut ID (PK)
Customer ID (PK)(FK) Name
Last Name Donut ID (PK)(FK) Description
First Name Quantity Unit Price
Street Address
Apt #
City
State
Zip Code
Home Phone
Mobile Phone
Other Phone
Notes
Order Date