2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City,...

71
2/170 ( Premiere Products )

description

Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State, Zip, Date, (PartNum, Description, Price, NumShipped )

Transcript of 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City,...

Page 1: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

2/170 ( Premiere Products )

Page 2: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

(PartNum, Description,

Price,

NumShipped

)

)

2/170 ( Premiere Products )

Page 3: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

(PartNum, Description,

Price,

NumShipped

)

)

Page 4: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

(PartNum, Description,

Price,

NumShipped

)

)

Page 5: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

(PartNum, Description,

Price,

NumShipped

)

)

Page 6: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

(PartNum, Description,

Price,

NumShipped

)

)

Page 7: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

(PartNum, Description,

Price,

NumShipped

)

)

Page 8: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

(PartNum, Description,

Price,

NumShipped

)

)

Page 9: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

(PartNum, Description,

Price,

NumShipped

)

)

Let’s normalize (1NF).

Page 10: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

PartNum,

Description,

Price,

NumShipped

)

Page 11: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

PartNum,

Description,

Price,

NumShipped

)

Page 12: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

PartNum,

Description,

Price,

NumShipped

)

Page 13: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

PartNum,

Description,

Price,

NumShipped

)

Page 14: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

PartNum,

Description,

Price,

NumShipped

)

Page 15: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

PartNum,

Description,

Price,

NumShipped

)

Page 16: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

PartNum,

Description,

Price,

NumShipped

)

Page 17: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

PartNum,

Description,

Price,

NumShipped

)

Page 18: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

PartNum,

Description,

Price,

NumShipped

)

Page 19: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

PartNum,

Description,

Price,

NumShipped

)

Page 20: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

PartNum,

Description,

Price,

NumShipped

)Let’s eliminate partial dependencies (2NF)

Page 21: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

PartNum,

Description,

Price,

NumShipped

)

Page 22: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

PartNum,

Description,

Price,

NumShipped

)

Page 23: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date,

PartNum,

Description,

Price,

NumShipped

)

Page 24: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date)

InvoiceLine(

InvoiceNum,

PartNum,

Description,

Price,

NumShipped

)

Page 25: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date)

InvoiceLine(

InvoiceNum,

PartNum,

Description,

Price,

NumShipped

)

Page 26: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date)

InvoiceLine(

InvoiceNum,

PartNum,

Description,

Price,

NumShipped

)

Page 27: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date)

InvoiceLine(

InvoiceNum,

PartNum,

Description,

Price,

NumShipped

)

Now let’s make sure the only determinants are candidate keys (3NF).

Page 28: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip,

Date)

InvoiceLine(

InvoiceNum,

PartNum,

Description,

Price,

NumShipped

)

Now let’s make sure the only determinants are candidate keys (3NF).

Page 29: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, Date,

CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip)

InvoiceLine(

InvoiceNum,

PartNum,

Description,

Price,

NumShipped

)

Page 30: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, Date, CustomerNum)

Customer ( CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip)

InvoiceLine(

InvoiceNum,

PartNum,

Description,

Price,

NumShipped

)

Page 31: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, Date, CustomerNum)

Customer ( CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip)

InvoiceLine (InvoiceNum,

PartNum,

Description,

Price,

NumShipped

)

Page 32: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, Date, CustomerNum)

Customer (CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip)

InvoiceLine (InvoiceNum,

PartNum,

Description,

Price,

NumShipped

)

Page 33: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, Date, CustomerNum)

Customer (CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip)

InvoiceLine (InvoiceNum,

PartNum,

Description,

Price,

NumShipped

)

Page 34: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Invoice (InvoiceNum, Date, CustomerNum)

Customer (CustomerNum, LastName,

FirstName,

Street,

City,

State,

Zip)

InvoiceLine (InvoiceNum,

PartNum,

Description,

Price,

NumShipped

) End of story.

Page 35: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

3/170 ( Premiere Products )

Page 36: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

3/170 ( Premiere Products )

Part (PartNum, Description, Class, Price,

(WarehouseNum, WarehouseName, OnHand),

(SupplierNum, SupplierName, LeadTime)

)

Page 37: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part (PartNum, Description, Class, Price,

(WarehouseNum, WarehouseName, OnHand),

(SupplierNum, SupplierName, LeadTime)

)

Page 38: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part (PartNum, Description, Class, Price,

(WarehouseNum, WarehouseName, OnHand),

(SupplierNum, SupplierName, LeadTime)

)

Page 39: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part (PartNum, Description, Class, Price,

(WarehouseNum, WarehouseName, OnHand)

)

Part (PartNum, Description, Class, Price,

(SupplierNum, SupplierName, LeadTime)

)

Page 40: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part_Wh (PartNum, Description, Class, Price,

(WarehouseNum, WarehouseName, OnHand)

)

Part_Sp (PartNum, Description, Class, Price,

(SupplierNum, SupplierName, LeadTime)

)

Page 41: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part_Wh (PartNum, Description, Class, Price,

WarehouseNum, WarehouseName, OnHand

)

Part_Sp (PartNum, Description, Class, Price,

SupplierNum, SupplierName, LeadTime

)

Page 42: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part_Wh (PartNum, Description, Class, Price,

WarehouseNum, WarehouseName, OnHand

)

Part_Sp (PartNum, Description, Class, Price,

SupplierNum, SupplierName, LeadTime

)

Page 43: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part_Wh (PartNum, Description, Class, Price,

WarehouseNum, WarehouseName, OnHand

)

Part_Sp (PartNum, Description, Class, Price,

SupplierNum, SupplierName, LeadTime

)

Page 44: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part_Wh (PartNum, Description, Class, Price,

WarehouseNum, WarehouseName, OnHand

)

Part_Sp (PartNum, Description, Class, Price,

SupplierNum, LeadTime

)

Supplier (SupplierNum, SupplierName)

Page 45: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part_Wh (PartNum, Description, Class, Price,

WarehouseNum, WarehouseName, OnHand

)

Part_Sp (PartNum,

SupplierNum, LeadTime

)

Supplier (SupplierNum, SupplierName)

Part (PartNum, Description, Class, Price)

Page 46: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part_Wh (PartNum, Description, Class, Price,

WarehouseNum, WarehouseName, OnHand

)

Part_Sp (PartNum,

SupplierNum, LeadTime

)

Supplier (SupplierNum, SupplierName)

Part (PartNum, Description, Class, Price)

Page 47: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part_Wh (PartNum,

WarehouseNum, WarehouseName, OnHand

)

Part_Sp (PartNum,

SupplierNum, LeadTime

)

Supplier (SupplierNum, SupplierName)

Part (PartNum, Description, Class, Price)

Page 48: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part_Wh (PartNum,

WarehouseNum, WarehouseName, OnHand

)

Part_Sp (PartNum,

SupplierNum, LeadTime

)

Supplier (SupplierNum, SupplierName)

Part (PartNum, Description, Class, Price)

Page 49: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part_Wh (PartNum,

WarehouseNum, WarehouseName, OnHand

)

Part_Sp (PartNum, SupplierNum, LeadTime)

Supplier (SupplierNum, SupplierName)

Part (PartNum, Description, Class, Price)

Page 50: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part_Wh (PartNum, WarehouseNum, WarehouseName, OnHand )

Part_Sp (PartNum, SupplierNum, LeadTime)

Supplier (SupplierNum, SupplierName)

Part (PartNum, Description, Class, Price)

Page 51: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part_Wh (PartNum, WarehouseNum, WarehouseName, OnHand )

Part_Sp (PartNum, SupplierNum, LeadTime)

Supplier (SupplierNum, SupplierName)

Part (PartNum, Description, Class, Price)

Page 52: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part_Wh (PartNum, WarehouseNum, WarehouseName, OnHand )

Part_Sp (PartNum, SupplierNum, LeadTime)

Supplier (SupplierNum, SupplierName)

Part (PartNum, Description, Class, Price)

Page 53: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Part_Wh (PartNum, WarehouseNum, WarehouseName, OnHand )

Part_Sp (PartNum, SupplierNum, LeadTime)

Supplier (SupplierNum, SupplierName)

Part (PartNum, Description, Class, Price)

Page 54: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

2-3/171 ( Henry Books Case )

Page 55: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

2-3/171 ( Henry Books Case )

Course ( CourseNum, Description, NumCredits,

(Textbook),

(InstructorNum, InstructorName) )

Page 56: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Course ( CourseNum, Description, NumCredits,

(Textbook),

(InstructorNum, InstructorName) )

Page 57: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Course ( CourseNum, Description, NumCredits,

(Textbook))

Course ( CourseNum, Description, NumCredits,

(InstructorNum, InstructorName) )

Page 58: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Crs-Txt (CourseNum, Description, NumCredits,

(Textbook))

Crs-Ins ( CourseNum, Description, NumCredits,

(InstructorNum, InstructorName) )

Page 59: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Crs-Txt (CourseNum, Description, NumCredits,

(Textbook))

Crs-Ins ( CourseNum, Description, NumCredits,

(InstructorNum, InstructorName) )

Page 60: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Crs-Txt (CourseNum, Description, NumCredits,

Textbook)

Crs-Ins ( CourseNum, Description, NumCredits,

InstructorNum, InstructorName )

Page 61: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Crs-Txt (CourseNum,

Textbook)

Crs-Ins ( CourseNum, Description, NumCredits,

InstructorNum, InstructorName )

Course(CourseNum, Description, NumCredits)

Page 62: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Crs-Txt (CourseNum,

Textbook)

Crs-Ins ( CourseNum,

InstructorNum, InstructorName )

Course(CourseNum, Description, NumCredits)

Page 63: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Crs-Txt (CourseNum,

Textbook)

Crs-Ins ( CourseNum,

InstructorNum )

Course(CourseNum, Description, NumCredits)

Instructors ( InstructorNum, InstructorName )

Page 64: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Crs-Txt (CourseNum, Textbook)

Crs-Ins ( CourseNum,

InstructorNum )

Course(CourseNum, Description, NumCredits)

Instructors ( InstructorNum, InstructorName )

Page 65: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Crs-Txt (CourseNum, Textbook)

Crs-Ins ( CourseNum, InstructorNum )

Course(CourseNum, Description, NumCredits)

Instructors ( InstructorNum, InstructorName )

Page 66: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Crs-Txt (CourseNum, Textbook)

Crs-Ins ( CourseNum, InstructorNum )

Course(CourseNum, Description, NumCredits)

Instructors ( InstructorNum, InstructorName )

Page 67: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Crs-Txt (CourseNum, Textbook)

Crs-Ins ( CourseNum, InstructorNum )

Course(CourseNum, Description, NumCredits)

Instructors ( InstructorNum, InstructorName )

Page 68: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Crs-Txt (CourseNum, Textbook)

Crs-Ins ( CourseNum, InstructorNum )

Course(CourseNum, Description, NumCredits)

Instructors ( InstructorNum, InstructorName )

Page 69: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

Crs-Txt (CourseNum, Textbook)

Crs-Ins ( CourseNum, InstructorNum )

Course(CourseNum, Description, NumCredits)

Instructors ( InstructorNum, InstructorName )

Page 70: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

CourseText ( CourseNum, Textbook)

CourseInstructor ( CourseNum, InstructorNum )

Course(CourseNum, Description, NumCredits)

Instructors ( InstructorNum, InstructorName )

Page 71: 2/170 ( Premiere Products ). Invoice (InvoiceNum, CustomerNum, LastName, FirstName, Street, City, State,…

CourseText ( CourseNum, Textbook)

CourseInstructor ( CourseNum, InstructorNum )

Course(CourseNum, Description, NumCredits)

Instructors ( InstructorNum, InstructorName ) End of story.