Download ER-NFL

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
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!
Sal
name
city
NFL
E/R
Problem
empl.
Manager
(1,3)
Team
(24,99)
Home
Visit
(0,*)
(0,*)
contr
(0,1)
Player
played-in.
score
(1,1)
Scoring:
1. Play relationship a Set: 3
2. Person/Player/Manager: 3 Game
3. Weak Game Entity: 3
4. Played-in: 2
5. Can Only Play once on a day: 1
6. Contract: 3
7. Salary, score, min attribute: 3

Person

(0,*) weight
Sal
play
ssn name
(0,4)
min
(22,*)
Date
birthd
height
pos
Team(name, city)
Problem2
Player(ssn, birthd, pos,…)
Person(ssn, name)
Game(home, visit, day, score)
Played_in(home,visit, day, ssn, min)
Sal
name
city
empl.
Manager isa
(1,3)
Team
isa
(24,99)
Home
Visit
(0,*)
(0,*)
contr
(0,1)
play
(0,*)
Date
Player
(0,*) weight
Sal
Day
ssn name
(0,4)
Person
birthd
height
pos
played-in.
score
(1,1)
(22,*)
Game
Another different Solution!
min
Scoring:
1. Play relationship a Set: 3
2. Person/Player/Manager: 3
3. Weak Game Entity: 3
4. Played-in: 2
5. Can Only Play once on a day: 1
6. Contract: 3
7. Salary, score, min attribute: 3