CS145 Assignment #1

Due Tuesday, April 15, 1997

Reminder for on-campus students: Assignments are due at 5:00 PM on Tuesday. You are allowed one lateness of up to 48 hours; use that privilege carefully. Assignments should be turned in during class or at the course secretary's office: Gates Building room 495.

Reminder for SITN students: Assignments due on Tuesday must be timestamped by the Wednesday morning courier to be considered on-time. Like the on-campus students, you have one free 48-hour exception.

Step 1 of Your PDA (Personal Database Application)

As the course progresses you will be building a substantial database application for a real-world scenario of your choosing. You will design schemas for the database, and you will create an actual database using a relational database management system. You will populate the database with sample data, write interactive queries and modifications on the database, and develop user-friendly tools for manipulating the database.

Your first step is to identify the domain you would like to manage with your database, and to construct ODL and entity-relationship schema designs for the data. We suggest that you pick an application that you will enjoy working with, since you'll be stuck with it for the whole quarter! In previous years, students who built a database about something they were interested in--a hobby, material from another course, a research project, etc.--got the most out of this part of CS145.

Try to pick an application that is relatively substantial, but not too enormous. For example, when expressed in the entity-relationship model, you might want your design to have in the range of five or so entity sets, and a similar number of relationships. Note that this is a ballpark figure only! You should certainly include different kinds of relationships (e.g., many-one, many-many) and different kinds of data (strings, integers, etc.), but your application need not necessarily require advanced features such as subclassing in ODL, or weak entity sets or roles in E/R.

(a)
(10 pts.) Write a short (approximately one paragraph) description of the database application you propose to work with throughout the course. Your description should be brief and relatively informal. If there are any unique or particularly difficult aspects of your proposed application, please point them out. Your description will be graded only on suitability and conciseness.

(b)
(20 pts.) Specify an ODL schema for your proposed database. As always, don't forget to include keys and inverse relationships.

(c)
(20 pts.) Specify an entity-relationship diagram for your proposed database. As always, don't forget to underline key attributes and include arrowheads indicating the arity of relationships.
Please put your PDA description at the front of your assignment. We shall look at these quickly to catch major problems before you have to hand in Assignment 2.

Don't forget to save a copy of your PDA for reference as you do Step 2 of the PDA.

If you are having trouble thinking of an application, or if you are unsure whether your proposed application is appropriate, please feel free to consult with one of the course staff.

Problem Set

  1. (10 pts.) Exercise 2.1.2. This exercise depends on a Exercise 2.1.1, whose on-line solution is at URL http://www-db.stanford.edu/~ullman/fcdbsols/sol2.html#sol21. You should explain the changes necessary for each of the four parts; you do not have to redo the complete ODL specification for each part.

  2. (10 pts.) Exercise 2.2.2. This exercise depends on Exercise 2.2.1, whose solution is at URL http://www-db.stanford.edu/~ullman/fcdbsols/sol2.html#sol22. Again, explain the changes necessary for each of the four parts; you do not have to redo the complete E/R diagram for each part.

  3. (15 pts.) Exercise 2.4.4. This exercise uses Exercise 2.1.5, whose solution is at URL http://www-db.stanford.edu/~ullman/fcdbsols/sol2.html#sol21.

  4. (15 pts.) We would like to design a database to maintain information about the World-Wide Web. The information we need includes:

    (a)
    Specify an ODL schema for this database. In addition to class definitions with attributes and relationships, don't forget to include keys and inverse relationships.

    (b)
    Specify an entity-relationship diagram for this database. Don't forget to underline key attributes and include arrowheads indicating the multiplicity of relationships.

    Note that there is no single right answer to this question, although some answers may be better than others.