DOC PREVIEW
UT Dallas CS 6385 - homework2key

This preview shows page 1 out of 4 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 4 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

Database Systems: Homework 2 KeyDue 7 October, 2013Team: Key1. (8 points) Consider the ER diagram in Figure 7.22. Assume that an employee maywork in up to two departments or may not be assigned to any department. Assume thateach department must have one and may have up to three phone numbers. Supply(min, max) constraints on this diagram. State clearly any additional assump-tions you make. Under what conditions would the relationship HAS PHONE beredundant in this example?Assume the following additional system requirements:• Each department can have anywhere between 1 and 30 employees.• Each phone is used by one, and only one, department.• Each phone is assigned to at least one, and may be assigned to up to 30 employees.• Each employee is assigned at least one, but no more than 5 phones.The relationship HAS PHONE would be redundant when employees have all the phones of theirdepartment(s) and none of any other department.2. (8 points) Consider the ER schema for the MOVIES database in Figure 7.24. Assumethat MOVIES is a populated database. ACTOR is used as a generic term and includesactresses. Given the constraints shown in the ER schema, respond to the followingstatements with True, False, or Maybe. Assign a response of Maybe to statementsthat, while not explicitly shown to be True, cannot be proven False based on theschema as shown. Briefly justify each answer.1(a) There are no actors in this database that have been in no movies.T—Actor has full participation in Performs In.(b) There are some actors who have acted in more than ten movies.M—The max cardinality on Actor-Performs In-Movie is N , so this is neither required norruled out.(c) A movie can have only a maximum of two lead actors.T—The max cardinality on Movie-Has Lead Role-Actor (reading the relationship back-wards) is 2.(d) Every director has been an actor in some movie.M—This can’t be false because the relationship Also A Director exists, but it can’t be truebecause Director doesn’t have total participation in it.(e) No producer has ever been an actor.M—The same reasoning as the previous question applies here, looking at the Actor Producerrelationship.(f) There are movies with more than a dozen actors.M—The max cardinality on Movie-Is Performed In By-Actor (reading backwards) is M ,so this is possible but not required.(g) Most movies have one director and one producer.M—The min and max cardinality bounds are just that, min/max bounds. They can saynothing about average, typical, or “most” cases. Not that they aren’t important for examiningthe performance of a design!(h) No movie has a director who also acted in that movie.M—Like before, nothing about these constraints either mandates or prohibits this.23. (16 points) A database is being constructed to keep track of the teams and games ofa sports league. A team has a number of players, not all of whom participate in eachgame. It is desired to keep track of the players participating in each game for eachteam, the positions they played in that game, and the result of the game. Design anER schema diagram for this application, stating any assumptions you make. Chooseyour favorite team sport (e.g., baseball, curling, kabbadi, ...). Be sure your design isdescribed in a way understandable by someone not familiar with that sport.Here’s one example solution as provided by the textbook authors...3The following design may be used for a baseball league. Here, we assumed that each gamein the schedule is identified by a unique Game#, and a game is also identified uniquely bythe combination of Date, starting Time, and Field where it is played. The Performanceattribute of PARTICIPATE is used to store information on the individual performance ofeach player in a game. This attribute can be designed to keep the information needed forstatistics, and may be quite complex. One possible design for the Performance attributemay be the following (using the notation of Figure 7.8):Performance( {Hitting(AtBat#, Inning#, HitType, Runs, RunsBattedIn,StolenBases)}, {Pitching(Inning#, Hits, Runs, EarnedRuns, StrikeOuts, Walks,Outs, Balks, WildPitches)}, {Defense(Inning#, {FieldingRecord(Position,PutOuts, Assists, Errors)})} )Here, performance is a composite attribute made up of three multivalued components: Hit-ting, Pitching, and Defense. Hitting has a value for each AtBat of a player, and recordsthe HitType (suitable coded; for example, 1 for single, 2 for double, 3 for triple, 4 for homerun, 0 for walk, −1 for strikeout, −2 for fly out, ...) and other information concerning theAtBat. Pitching has a value for each inning during which the player pitched. Defense hasa value for each inning a player played a fielding position. We can have a less detailed or amore detailed design for the performance of a player in each game, depending on how muchinformation we need to keep in the database. Suitable variations of the ER diagram shownbelow can be used for other


View Full Document

UT Dallas CS 6385 - homework2key

Documents in this Course
assn1

assn1

2 pages

38rel2

38rel2

5 pages

Report

Report

3 pages

networks

networks

18 pages

lp2

lp2

44 pages

lp2 (2)

lp2 (2)

27 pages

lp1(1)

lp1(1)

21 pages

integer1

integer1

50 pages

FrankR2

FrankR2

3 pages

duality

duality

28 pages

CMST

CMST

44 pages

hw4

hw4

3 pages

for 1

for 1

11 pages

ENCh02

ENCh02

33 pages

pree

pree

2 pages

new  3

new 3

2 pages

new  2

new 2

2 pages

hw4a

hw4a

2 pages

T2_Sol

T2_Sol

4 pages

ISM3

ISM3

8 pages

hw4_sol

hw4_sol

6 pages

Elm04_06

Elm04_06

11 pages

atn proj2

atn proj2

20 pages

12CUT1

12CUT1

8 pages

09Ford

09Ford

23 pages

08FLOW

08FLOW

6 pages

03LP_su

03LP_su

6 pages

40REL40

40REL40

5 pages

39rel3

39rel3

5 pages

38arel2

38arel2

5 pages

37REL1

37REL1

3 pages

24TABU

24TABU

3 pages

22DYNPR

22DYNPR

3 pages

21B&C

21B&C

2 pages

20BBEX0

20BBEX0

3 pages

19BB

19BB

5 pages

14CAPBUD0

14CAPBUD0

11 pages

35BRXCH

35BRXCH

2 pages

34COMB

34COMB

4 pages

32CAPAS

32CAPAS

4 pages

31QUEUE

31QUEUE

3 pages

Load more
Download homework2key
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view homework2key and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view homework2key 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?