Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Normalization h/w

enter image description here

Was told to put that into UNF/1NF/2NF/3NF, is this correct?

Show the above data as a relation in UNF (unnormalised data).

Customer (CustomerID, FirstName, LastName, Address, City, Phone, State, Postcode,Qty, ProductNo, Description, Unit price, Total, Subtotal, Shipping, Tax Rate, Date, OrderNo.))

Show the data as a relation/s in 1NF. (Indicate any keys.)

Customer (CustomerID, FirstName, LastName, Address, City, state, Phone, State, Postcode) Product (ProductNo, Qty, Description, Unitprice, total, subtotal, shipping, Tax rate(s), CustomerID(FK).) Order (OrderNo, Date, ProductNo(FK).)

Show the data as a relation/s in 2NF. (Indicate any keys.)

Customer( CustomerID, FirstName, LastName, Address, City, Phone, State, Postcode) Product ( ProductNo, Qty, Description, UnitPrice, CustomerID(FK), Total(FK).) Order( OrderNo, Date, CustomerID(FK), ProductNo(FK).) Total(Total, subtotal, shipping, Tax Rates, ProductNo(FK),CustomerID(FK) )

Show the data as a relation/s in 3NF. (Indicate any keys.)

Customer (CustomerID, FirstName, LastName, Address, City, Phone, State, Postcode) Product (ProductNo, , Description, Unit Price. CustomerID(FK), Total(FK) ) Order (OrderNo, Date, CustomerID(FK).ProductNo(FK) ) Total(Total, subtotal, ProductNo(FK), CustomerID(FK) ) Shipping(Shipping, Tax Rates, Total(FK), OrderNo(FK) ) Qty( QtyID, Qty, ProductNo(FK), OrderNo(FK).)

like image 309
Herk Avatar asked Oct 04 '22 16:10

Herk


1 Answers

It looks good to me, but you are missing one crucial piece of the design. You haven't defined any Primary Keys on your tables, although you have identified the foreign keys (use the foreign keys you have to work out the primary keys on each of the tables :)).

like image 127
mattytommo Avatar answered Oct 21 '22 03:10

mattytommo