CSE 444

University of Washington

Winter 2000

Homework 1

See the web page for some homework guidelines and policies.

DUE: at beginning of class, Friday January 14

  1. (30 points) Exercise 2.2, Parts 1, 2, and 5.


  2. (30 points) Someone heard you'd read Chapter 2 of the textbook and now they want to pay you $100 an hour to draw an E/R diagram for their enterprise: They run a hockey league that consists of teams, rinks, players, and coaches. A rink has a name (unique), address, capacity, and phone number, and it can be used by any number of teams. A team has a name, city, and uniform color. A team's name may not be unique, but no two teams in the same city will have the same name. A team uses exactly one rink and has at most one coach. A coach has a name (unique) and phone number and coaches at most one team. Players have a name, number, and position. A player's name is not unique. A player's number is unique within that player's team only. A team has at least 6 players and a player plays on exactly one team. Finally, players have other players with whom they prefer to be on the ice. A player can prefer to be with any number of other players.

    Draw an E/R diagram for this application. If there is something that cannot be modeled in your E/R diagram, describe it in writing below your diagram.

  3. (40 points) Consider the following E/R diagram, which is one possible solution to Exercise 2.8 from the book:

    Please refer to the hardcopy distributed in class.



    Translate this E/R diagram into a relational database schema. Be sure to include domains, primary and foreign keys, and any other necessary features to capture as completely as possible the E/R diagram. Use the complete, correct SQL syntax as described in Section 3.5 of the book and use the translation guidelines ("algorithm") given in class. If there is something that cannot be translated, describe it at the end of your translation.