Computer Science > EXAM > DATABASE C170_Performance_Assessment 2020 - Western Governors University | DATABASE C 170_Performanc (All)

DATABASE C170_Performance_Assessment 2020 - Western Governors University | DATABASE C 170_Performance_Assessment 2020

Document Content and Description Below

DATABASE C170_Performance_Assessment 2020 - Western Governors University SALES ORDER: Date, Donut Order ID, Customer ID, Customer, First Name, Last Name, Street Address, Apt #, City, St, Zip Code, H... ome Phone, Mobile Phone, Other Phone, Qty, Donut ID, Name, Description, Unit Price, Special Handling Notes There is only one customer for every sales order, so the customer data on the sales order is not a repeating group. Repeating customer data for a given customer is repeated, but that is addressed in third normal form. Since there is only one customer per invoice, this isn’t addressed in first normal form. To move to first normal form, I created a relation that uses a composite key then enter new sales order info for each customer in a new row. For the sales order, the Customer ID and the Donut Order ID attributes become the composite primary key. 1NF SALES ORDER: Customer ID (PK), Date, First Name, Last Name, Street Address, Apt #, City, State, Zip, Home Phone, Mobile Phone, Other Phone, Special Handling Notes, Donut Order ID (PK), Qty, Donut ID, Name, Description, Unit Price Looking at the Sales Order relation, the second normal form violations are that Description, Name, and Unit Price depend on the Donut Order ID instead of Customer ID and Donut Order ID. Date, Customer, First Name, Last Name, Street Address, Apt #, City, State, Home Phone, Mobile Phone, Other Phone, and Special Handling Notes all depend on Customer ID instead of Customer ID and Donut Order ID. I placed the attributes that are partially dependent into separate relations where they depend on the entire key and not part of the key. 2NF SALES ORDER: Customer ID (PK), Date, First Name, Last Name, Street Address, Apt #, City, State, Zip, Home Phone, Mobile Phone, Other Phone, Special Handling Notes SALES ORDER LINE Customer ID (PK)(FK), Donut Order ID (PK)(FK), Qty ITEM: DONUT: Donut Order ID (PK), Donut ID, Name, Description, Unit Price To translate this into 3rd normal form, I had to move all of the transitively dependent attributes to a relation where they depend only on the primary key. Customer is dependent on Customer ID as well as all of the customer attributes. I moved the transitively dependent attributes to a relation where they depend only on the primary key but left the attribute on which they depend in the original relation as a foreign key. 3NF SALES ORDER: Customer ID (PK), Date, Special Handling Notes, Donut Order ID (FK) SALES ORDER LINE Customer ID (PK)(FK), Donut Order ID (PK)(FK), Qty ITEM: DONUT: Donut Order ID (PK), Donut ID, Name, Description, Unit Price CUSTOMER: Customer ID (PK), First Name, Last Name, Street Address, Apt #, City, State, Zip, Home Phone, Mobile Phone, Other Phone1NF SALES ORDER Customer ID (PK) Donut Order ID (PK) Date First Name Last Name Street Address Apt City State Zip Home Phone Mobile Phone Other Phone Special Handling Notes Qty Donut ID Name Description Unit Price2NF - - - - - - - - - - - - - - - - - - - - - - - - - - - - - NSERT INTO DONUT (DONUT_ORDER_ID,DONUT_ID,DONUT_NAME,DONUT_DESCRIPTION,UNIT_PRI CE) VALUES(1,3,'Cinammon','Cinammon Donut','1.75'); INSERT INTO SALES_ORDER (CUSTOMER_ID,DATE,SPECIAL_HANDLING_NOTES,DONUT_ORDER_ID) VALUES(1,'2018­02­18','Plates and Napkins please',1); INSERT INTO SALES_ORDER_LINE_ITEM (CUSTOMER_ID,DONUT_ORDER_ID,QTY) VALUES(1,1,10); SELECT * FROM CUSTOMER_INFO; SELECT * FROM DONUT; SELECT * FROM SALES_ORDER; SELECT * FROM SALES_ORDER_LINE_ITEM;SELECT * FROM DONUT, CUSTOMER, SALES_ORDER, SALES_ORDER_LINE_ITEM WHERE CUSTOMER.CUSTOMER_ID = SALES_ORDER.CUSTOMER_ID AND SALES_ORDER.DONUT_ORDER_ID = SALES_ORDER_LINE_ITEM.DONUT_ORDER_ID AND SALES_ORDER_LINE_ITEM.DONUT_ORDER_ID = DONUT.DONUT_ORDER_ID; [Show More]

Last updated: 2 years ago

Preview 1 out of 11 pages

Buy Now

Instant download

We Accept:

We Accept
document-preview

Buy this document to get the full access instantly

Instant Download Access after purchase

Buy Now

Instant download

We Accept:

We Accept

Reviews( 0 )

$14.00

Buy Now

We Accept:

We Accept

Instant download

Can't find what you want? Try our AI powered Search

90
0

Document information


Connected school, study & course


About the document


Uploaded On

Nov 16, 2020

Number of pages

11

Written in

Seller


seller-icon
Martin Freeman

Member since 5 years

486 Documents Sold

Reviews Received
85
28
9
9
23
Additional information

This document has been written for:

Uploaded

Nov 16, 2020

Downloads

 0

Views

 90

Document Keyword Tags

More From Martin Freeman

View all Martin Freeman's documents »

Recommended For You

Get more on EXAM »

$14.00
What is Scholarfriends

In Scholarfriends, a student can earn by offering help to other student. Students can help other students with materials by upploading their notes and earn money.

We are here to help

We're available through e-mail, Twitter, Facebook, and live chat.
 FAQ
 Questions? Leave a message!

Follow us on
 Twitter

Copyright © Scholarfriends · High quality services·