Upload
geraldine-underwood
View
215
Download
1
Embed Size (px)
Citation preview
NFL E/R Design Problem
Design an Entity-Relationship Diagram that models the following objects and relationships in the world of football (NFL): teams, players, games, managers and contracts. Each (NFL-) team has a unique team name, and a city it plays in. Each person being part of the NFL-world has a unique ssn and a name. Additionally, for players their weight, height, position and birth dates are of importance. Players have a contract with at most one team and receive a salary for their services, and teams have at least 24 and at most 99 players under contract. Each team has one to three managers; managers can work for at most 4 teams and receive a salary for each of their employments. Players cannot be managers. A game involves a home-team and visiting-team; additionally, the day of the game, and the score of the game are of importance; teams play each other several times in a season (not on the same day!). Moreover, for each game played we like to know which players participated in the game and how many minutes they played.
Indicate the cardinalities for each relationship type; assign roles (role names) to
each relationship if there are ambiguities! Use sub-types, if helpful to express constraints!
Team
empl.
contr
name
city
Manager
Player
Person
namessn
weight pos
birthd
height
Game
play played-in.
Date
minscore
Home Visit
Sal
Sal
(1,3)
(0,4)
(1,1)
(24,99) (0,1)
(22,*)
(0,*)(0,*)NFLE/RProblem
(0,*)
Scoring: 1. Play relationship a Set: 32. Person/Player/Manager: 33. Weak Game Entity: 34. Played-in: 25. Can Only Play once on a day: 16. Contract: 37. Salary, score, min attribute: 3
Problem2
Game(home, visit, day, score)
Played_in(home,visit, day, ssn, min)
Player(ssn, birthd, pos,…)
Team(name, city)
Person(ssn, name)
Team
empl.
contr
name
city
Manager
Player
Person
namessn
weight pos
birthd
height
played-in.Day
Date minscore
Home Visit
Sal
Sal
(1,3)
(0,4)
(1,1)
(24,99) (0,1)
(22,*)
(0,*)(0,*)
(0,*)
(0,*)
isa
isa
Scoring: 1. Play relationship a Set: 32. Person/Player/Manager: 33. Weak Game Entity: 34. Played-in: 25. Can Only Play once on a day: 16. Contract: 37. Salary, score, min attribute: 3
Another different Solution!
play
Game