Database SQL Select and Join Query

profilenorritt
UXTTask1-Donuts-R-Us-Database.docx

Running head: Donuts-r-us database app 1

Donuts-r-us database app 7

Donuts-R-Us Database App

Jose W. Martinez

Western Governors University

Donuts-R-Us Database App

First Normal Form (1NF)

1 NF

PK

DonutOrderID

 

OrderDate

 

CustomerID

 

CustomerLastName

 

CustomerFirstName

 

CustomerAddress

 

AptNum

 

City

 

State

 

ZipCode

 

HomePhone

 

MobilePhone

 

OtherPhone

 

Notes

 

DonutID

 

DonutName

 

Qty

 

Description

 

UnitPrice

1NF – Description

2 NF

PK

DonutOrderID

 

OrderDate

 

CustomerID

 

CustomerLastName

 

CustomerFirstName

 

CustomerAddress

 

AptNum

 

City

 

State

 

ZipCode

 

HomePhone

 

MobilePhone

 

OtherPhone

 

Notes

PK

DonutOrderID

PK

DonutID

 

Qty

PK

DonutID

 

DonutName

 

Description

 

UnitPrice

2NF – Description

3NF

PK

DonutOrderID

 

OrderDate

FK

CustomerID

 

Notes

PK

CustomerID

 

CustomerLastName

 

CustomerFirstName

 

CustomerAddress

 

AptNum

 

City

 

State

 

ZipCode

 

HomePhone

 

MobilePhone

 

OtherPhone

PK

DonutOrderID

FK

DonutID

 

Qty

PK

DonutID

 

DonutName

 

Description

 

UnitPrice

3NF – Description

References Poe's Short Stories. (n.d.). Retrieved August 04, 2017, from https://www.cliffsnotes.com/literature/p/poes-short-stories/edgar-allan-poe-biography MindEdge, Inc. (2014). Introduction to the humanities. Waltham, MA: MindEdge. Edgar Allan Poe, “The Fall of the House of Usher” (reprint), The Works of the Late Edgar Allan Poe (1850), 1:291-309

OrdersCustomerOrder QtyDonutsDonutOrderID INTPKOrderDate DATETIMECustomerID INTFKCustomerID INTPKCustomerLastName VARCHAR (50)CustomerLastName VARCHAR (50)DonutOrderID INTFKDonutID INTFKQty INTDonutID INTPKDonutName VARCHAR (100)Description VARCHAR (100)CutomerAddress VARCHAR (100)AptNum VARCHAR (20)State VARCHAR (3)City VARCHAR (50)ZipCode VARCHAR (9)HomePhone VARCHAR (15)MobilePhone VARCHAR (15)OtherPhone VARCHAR (15)Notes VARCHAR (250)UnitPrice DECIMAL (10,2)

Orders Customer Order Qty Donuts DonutOrderID INT int FK PK OrderDate DATETIME int FK PK CustomerID INT int FK PK CustomerID INT int FK PK CustomerLastName VARCHAR (50) int FK PK CustomerLastName VARCHAR (50) int FK PK DonutOrderID INT int FK PK DonutID INT int FK PK Qty INT int FK PK DonutID INT int FK PK DonutName VARCHAR (100) int FK PK Description VARCHAR (100) int FK PK CutomerAddress VARCHAR (100) int FK PK AptNum VARCHAR (20) int FK PK State VARCHAR (3) int FK PK City VARCHAR (50) int FK PK ZipCode VARCHAR (9) int FK PK HomePhone VARCHAR (15) int FK PK MobilePhone VARCHAR (15) int FK PK OtherPhone VARCHAR (15) int FK PK Notes VARCHAR (250) int FK PK UnitPrice DECIMAL (10,2) int FK PK M1 M2 M3 M4 M1 M2 M3 M4 M1 M2 M3 M4