1NF 2NF Highlighted fields will form a Composite primary key. City
State and Zip were separated
And are now atomic
No duplicate data, each of the above tables has a Primary Key, and a key (foreign) that can refer to another table in the group.
3NF
No transitive dependency. New table has 2 of the PKs from the other tables as Foreign Keys.
Each table has a primary key which can refer to another one of the tables in this group.
1:M
One Customer can place many Orders
ER DIAGRAM Customer table has single pkORDER TABLE
DATE DATETIME
CUSTOMERID INT (fk)
DONUT_ORDER_ID INT (pk)
NOTES VARCHAR (255)QUANTITY TABLE
QUANTITY INT
DONUT_ORDER_ID INT (pk) (fk)
DONUT_ID INT (pk)(fk)DONUT TABLE
DONUT_ID INT (pk)
DONUT_NAME VARCHAR (100)
DONUT_DESCRIPTION VARCHAR (255)
UNIT_PRICE DECIMAL (10,2)DONUT ORDER ID
DONUT ID DATE
CUSTOMER ID
LAST NAME
FIRST NAME
STREET ADDRESS
CITY
STATE
ZIP CODE
HOME PHONE
MOBILE PHONE
OTHER PHONE
DESCRIPTION
QTY
UNIT PRICE
NOTES
DONUT NAMEDONUT ORDER ID(PK)
DATE
CUSTOMER ID
LAST NAME
FIRST NAME
STREET ADDRESS
APT
CITY
STATE
ZIP CODE
HOME PHONE
MOBILE PHONE
OTHER PHONE
NOTESDONUT ID (PK)
DONUT NAME
DONUT DESCRIPTION
UNIT PRICE
DONUT ORDER ID (PK)
(FK)
QUANTITY
DONUT ID (PK)(FK)
CUSTOMER ID (PK)
LAST NAME
FIRST NAME
STREET ADDRESS
APT
CITY
STATE
ZIP CODE
HOME PHONE
MOBILE PHONE
OTHER PHONEDATE
CUSTOMER ID (FK)
NOTES
DONUT ORDER ID (PK)
DONUT ID (PK)
DONUT NAME
DONUT DESCRIPTION
UNIT PRICEDONUT ORDER ID (PK)(FK)
QUANTITY
DONUT ID (PK)(FK)
WGU IT C170 PROJECT - Western Governors University One order can have many different quantities 1:M
One donut order can hold many different quantities of donut types of donut types
1:M
create table customers( customer_id INT,CUSTOMER TABLE
CUSTOMER_ID INT (pk)
LAST_NAME VARCHAR (30)
FIRST_NAME VARCHAR (30)
STREET_ADDRESS VARCHAR (100)
APT INT,
CITY VARCHAR (30)
STATE VARCHAR (30)
ZIP_CODE INT HOME_PHONE VARCHAR (20)
MOBILE_PHONE VARCHAR (20)
OTHER_PHONE VARCHAR (20)
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller Zendaya. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $9.99. You're not tied to anything after your purchase.