69
Problem 1, page 223

Problem 1, page 223

  • Upload
    bess

  • View
    39

  • Download
    0

Embed Size (px)

DESCRIPTION

Problem 1, page 223. Problem 1, page 223. Customer. Problem 1, page 223. Customer CustomerNum RepNum. Problem 1, page 223. Customer CustomerNum RepNum. Rep RepNum LastName. Problem 1, page 223. Customer CustomerNum RepNum. Rep RepNum LastName. - PowerPoint PPT Presentation

Citation preview

Page 1: Problem 1, page 223

Problem 1, page 223

Page 2: Problem 1, page 223

Problem 1, page 223

Customer

Page 3: Problem 1, page 223

Problem 1, page 223

Customer CustomerNum RepNum

Page 4: Problem 1, page 223

Problem 1, page 223

Customer CustomerNum RepNum

Rep RepNum LastName

Page 5: Problem 1, page 223

Problem 1, page 223

Customer CustomerNum RepNum

Rep RepNum LastName

Page 6: Problem 1, page 223

Problem 1, page 223

Customer CustomerNum RepNum

Rep RepNum LastName

This is an example of a one to many relationship as follows: one customer can be served by ONE rep and one rep can serve MANY customers.

Page 7: Problem 1, page 223

Problem 1, page 223

Customer CustomerNum

Rep RepNum LastName

Assignments CustomerNum RepNum

Page 8: Problem 1, page 223

Problem 1, page 223

Customer CustomerNum

Rep RepNum LastName

Assignments CustomerNum RepNum

This is a many to many relationship: one customer can be connected to MANY reps and one rep can be assigned to MANY customer.

Page 9: Problem 1, page 223

Problem 1, page 223

Customer CustomerNum

Rep RepNum LastName

Assignments CustomerNum RepNum

When a customer places an order the sales that gets the comissionshould be one of the collection of the sales reps that represents thecustomer.

Page 10: Problem 1, page 223

Problem 1, page 223

Customer CustomerNum

Rep RepNum LastName

Assignments CustomerNum RepNum Orders

OrderNum OrderDate CustomerNum RepNum

Page 11: Problem 1, page 223

Problem 1, page 223

Customer CustomerNum

Rep RepNum LastName

Assignments CustomerNum RepNum Orders

OrderNum OrderDate CustomerNum RepNum

Page 12: Problem 1, page 223

Problem 1, page 223

Customer CustomerNum

Rep RepNum LastName

Assignments CustomerNum RepNum Orders

OrderNum OrderDate CustomerNum RepNum

Page 13: Problem 1, page 223

Problem 1, page 223

Customer CustomerNum

Rep RepNum LastName

Assignments CustomerNum RepNum Orders

OrderNum OrderDate CustomerNum RepNum

PK

Page 14: Problem 1, page 223

Problem 1, page 223

Customer CustomerNum

Rep RepNum LastName

Assignments CustomerNum RepNum Orders

OrderNum OrderDate CustomerNum RepNum

PK

FK

Page 15: Problem 1, page 223

Problem 1, page 223

Customer CustomerNum

Rep RepNum LastName

Assignments CustomerNum RepNum Orders

OrderNum OrderDate CustomerNum RepNum

PK

FK

Page 16: Problem 1, page 223

Problem 2, page 223

Page 17: Problem 1, page 223

Problem 2, page 223

Customer CustomerNum

Page 18: Problem 1, page 223

Problem 2, page 223

Customer CustomerNum

Rep RepNum

Page 19: Problem 1, page 223

Problem 2, page 223

Customer CustomerNum

Rep RepNum

Orders CustomerNum RepNum

Page 20: Problem 1, page 223

Problem 2, page 223

Customer CustomerNum

Rep RepNum

Orders CustomerNum RepNum

Page 21: Problem 1, page 223

Problem 2, page 223

Customer CustomerNum

Rep RepNum

Orders CustomerNum RepNum

PK

FK

Page 22: Problem 1, page 223

Problem 2, page 223

Customer CustomerNum

Rep RepNum

Orders CustomerNum RepNum

PK

FK

Page 23: Problem 1, page 223

Problem 2, page 223

Customer CustomerNum

Rep RepNum

Orders CustomerNum RepNum

PK

FK

PK

FK

Page 24: Problem 1, page 223

Problem 3, page 223

Page 25: Problem 1, page 223

Problem 3, page 223

Part PartNum Description Class Price

Page 26: Problem 1, page 223

Problem 3, page 223

Part PartNum Description Class Price

Warehouse WarehouseNum WarehouseDescription

Page 27: Problem 1, page 223

Problem 3, page 223

Part PartNum Description Class Price WarehouseNum

Warehouse WarehouseNum WarehouseDescription

Page 28: Problem 1, page 223

Problem 3, page 223

Part PartNum Description Class Price WarehouseNum

Warehouse WarehouseNum WarehouseDescription

Page 29: Problem 1, page 223

Problem 3, page 223

Part PartNum Description Class Price WarehouseNum

Warehouse WarehouseNum WarehouseDescription

FK

PK

Page 30: Problem 1, page 223

Problem 3, page 223

Part PartNum Description Class Price WarehouseNum

Warehouse WarehouseNum WarehouseDescription

But this would allow us to store each part in just one location.

Page 31: Problem 1, page 223

Problem 3, page 223

Part PartNum Description Class Price

Warehouse WarehouseNum WarehouseDescription

Page 32: Problem 1, page 223

Problem 3, page 223

Part PartNum Description Class Price

Warehouse WarehouseNum WarehouseDescription

Storage PartNum WarehouseNum NumberOfUnits

Page 33: Problem 1, page 223

Problem 3, page 223

Part PartNum Description Class Price

Warehouse WarehouseNum WarehouseDescription

Storage PartNum WarehouseNum NumberOfUnits

Page 34: Problem 1, page 223

Problem 3, page 223

Part PartNum Description Class Price

Warehouse WarehouseNum WarehouseDescription

Storage PartNum WarehouseNum NumberOfUnits

Page 35: Problem 1, page 223

Problem 4, page 223

Page 36: Problem 1, page 223

Problem 4, page 223

Territory TerritoryNum TerritoryName

Page 37: Problem 1, page 223

Problem 4, page 223

Territory TerritoryNum TerritoryName

Customer CustomerNum TerritoryNum

Page 38: Problem 1, page 223

Problem 4, page 223

Territory TerritoryNum TerritoryName

Customer CustomerNum TerritoryNum

Rep RepNum TerritoryNum

Page 39: Problem 1, page 223

Problem 4, page 223

Territory TerritoryNum TerritoryName

Customer CustomerNum TerritoryNum

Rep RepNum TerritoryNum

But we need a tighter connection.

Page 40: Problem 1, page 223

Problem 4, page 223

Territory TerritoryNum TerritoryName

Customer CustomerNum

Rep RepNum

Assignments RepNum CustomerNum TerritoryNum

Page 41: Problem 1, page 223

Problem 4, page 223

Territory TerritoryNum TerritoryName

Customer CustomerNum

Rep RepNum

Assignments RepNum CustomerNum TerritoryNum

Page 42: Problem 1, page 223

Problem 4, page 223

Territory TerritoryNum TerritoryName

Customer CustomerNum

Rep RepNum

Assignments RepNum CustomerNum TerritoryNum

PK

PK

PK

FK

FKFK

Page 43: Problem 1, page 223

Problem 5, page 223

Page 44: Problem 1, page 223

Problem 5, page 223

Territory TerritoryNum TerritoryName

Page 45: Problem 1, page 223

Problem 5, page 223

Territory TerritoryNum TerritoryName

Customer CustomerNum TerritoryNum

Page 46: Problem 1, page 223

Problem 5, page 223

Territory TerritoryNum TerritoryName

Customer CustomerNum TerritoryNum

Rep RepNum TerritoryNum

Page 47: Problem 1, page 223

Problem 5, page 223

Territory TerritoryNum TerritoryName

Customer CustomerNum TerritoryNum

Rep RepNum TerritoryNum

Assignments RepNum CustomerNum

Page 48: Problem 1, page 223

Problem 5, page 223

Territory TerritoryNum TerritoryName

Customer CustomerNum TerritoryNum

Rep RepNum TerritoryNum

Assignments RepNum CustomerNum

Page 49: Problem 1, page 223

Problem 1, page 224

Page 50: Problem 1, page 223

Problem 1, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Page 51: Problem 1, page 223

Problem 1, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type

Page 52: Problem 1, page 223

Problem 1, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Page 53: Problem 1, page 223

Problem 1, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Page 54: Problem 1, page 223

Problem 1, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

Page 55: Problem 1, page 223

Problem 1, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Page 56: Problem 1, page 223

Problem 1, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Page 57: Problem 1, page 223

Problem 1, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Page 58: Problem 1, page 223

Problem 1, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Page 59: Problem 1, page 223

Problem 2, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Page 60: Problem 1, page 223

Problem 2, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Members MemberNum MemberName Address NumberOfRentals MemberSince BonusPoints

Page 61: Problem 1, page 223

Problem 2, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Members MemberNum MemberName Address NumberOfRentals MemberSince BonusPoints

Page 62: Problem 1, page 223

Problem 3, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Members MemberNum MemberName Address NumberOfRentals MemberSince BonusPoints

DVDs DVDNum MovieNum DatePurchased TimesRented CurrentMember BranchNum

Page 63: Problem 1, page 223

Problem 3, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Members MemberNum MemberName Address NumberOfRentals MemberSince BonusPoints

DVDs DVDNum MovieNum DatePurchased TimesRented CurrentMember BranchNum

Page 64: Problem 1, page 223

Problem 3, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Members MemberNum MemberName Address NumberOfRentals MemberSince BonusPoints

DVDs DVDNum MovieNum DatePurchased TimesRented CurrentMember BranchNum

Transactions MemberNum DVDNum DateOut DateReturned

Page 65: Problem 1, page 223

Problem 3, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Members MemberNum MemberName Address NumberOfRentals MemberSince BonusPoints

DVDs DVDNum MovieNum DatePurchased TimesRented CurrentMember BranchNum

Transactions MemberNum DVDNum DateOut DateReturned

Page 66: Problem 1, page 223

Problem 3, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Members MemberNum MemberName Address NumberOfRentals MemberSince BonusPoints

DVDs DVDNum MovieNum DatePurchased TimesRented CurrentMember BranchNum

Transactions MemberNum DVDNum DateOut DateReturned

Page 67: Problem 1, page 223

Problem 3, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Members MemberNum MemberName Address NumberOfRentals MemberSince BonusPoints

DVDs DVDNum MovieNum DatePurchased TimesRented CurrentMember BranchNum

Transactions MemberNum DVDNum DateOut DateReturned

Page 68: Problem 1, page 223

Problem 3, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Members MemberNum MemberName Address NumberOfRentals MemberSince BonusPoints

DVDs DVDNum MovieNum DatePurchased TimesRented CurrentMember BranchNum

Transactions MemberNum DVDNum DateOut DateReturned

Page 69: Problem 1, page 223

Problem 3, page 224

Director DirectorNum DirectorName YearBorn YearDeceased

Movie MovieNum MovieTitle Year Type DirectorNum CriticsRating MPAARating Nominations Awards

Actor ActorNum ActorName Birthplace YearBorn YearDeceased

PlaysIn MovieNum ActorNum

Members MemberNum MemberName Address NumberOfRentals MemberSince BonusPoints

DVDs DVDNum MovieNum DatePurchased TimesRented CurrentMember BranchNum

Transactions MemberNum DVDNum DateOut DateReturned