DOC PREVIEW
UW CSE 444 - Database Systems

This preview shows page 1 out of 2 pages.

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

Unformatted text preview:

CSE444 Introduction to Database Systems Fall 1998Homework 2 – Due Monday, Nov. 21. Convert the E/R diagram below to a relational database schema.Author BookPublisherDistributorWritesssn nameisbntitlenameaddrPublishesDistributesnameaddrstate2. For the following two schemas and sets of functional dependencies,a.) What are all the completely nontrivial FDs that follow from the given dependencies?b.) What are all the keys of the relation?c.) What are all the superkeys for the relation that are not keys?i.) R(A, B, C, D) with FDs A -> B, A -> C, D -> A.ii.) S(A, B, C, D) with FDs AB -> C, AC -> D, A -> BC, B -> C.3. Consider two sets of FDs for a relation T(A, B, C, D, E):i.) A-> B, AB -> C, D -> AC, D -> Eii.) A -> BC, D -> AEAre they equivalent? (Can you derive the same set of completely nontrivial FDs from each?)4. For the following schemas and FDs,a.) Indicate all the BCNF violations. Do not forget to consider dependencies that are not in the given set, but follow from them. However, it is not necessary to give violations that have more than one attribute on the right side.b.) Decompose the relations, as necessary, into collections of relations that are in BCNF.i.) R(A, B, C, D, E) with FDs E -> CD, BCD -> E.ii.) S(A, B, C, D) with FDs A -> B, BC -> D, D -> A.iii.) T(A, B, C, D) with FDs AB -> D, BD -> C, CD -> A, AC -> B.iv.) U(A, B, C, D, E) with FDs AB -> E, CD -> E, A-> D, D-> A.5. Consider a database with the following relations:Player (name, team, hometown)Team (name, captain, city)Game (number, team, player, minutes, touchdowns)MVP (game-number, team, player)[Assume each game has exactly 2 MVPs, one from each team.] Write the following 2 queries in relational algebra (do it in parts, using and naming intermediate relations):i.) What are the names of players who played in games in which their team captain did not play?ii.) What are the names of captains who have scored more touchdowns than any other player from the same hometown? Write the following 5 queries in SQL:iii.) From which hometown did the highest-scoring player of game # 4 come from?iv.) What was the average number of minutes played in the first 7 games?v.) How many touchdowns did the highest-scoring MVP of each game score?vi.) What are the names of co-MVPs who are from the same hometown?vii.) For any captains that were MVPs, what are their names, what hometown are they from and how many minutes did they play in those games in which they were


View Full Document

UW CSE 444 - Database Systems

Documents in this Course
XML

XML

48 pages

SQL

SQL

25 pages

SQL

SQL

42 pages

Recovery

Recovery

30 pages

SQL

SQL

36 pages

Indexes

Indexes

35 pages

Security

Security

36 pages

Wrap-up

Wrap-up

6 pages

SQL

SQL

37 pages

More SQL

More SQL

48 pages

SQL

SQL

35 pages

XML

XML

46 pages

Triggers

Triggers

26 pages

Load more
Download Database Systems
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 Database Systems 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 Database Systems 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?