Reminder for on-campus students: Assignments are due at
5:00 PM on Wednesday. Late assignments received by 12:00 noon on
Friday will be penalized 33%. Assignments will not be accepted after
noon on Friday. Assignments should be turned in during class or at
the course secretary's office: Gates Building room 419. This late
policy will be strictly enforced.
Reminder for SITN students: Assignments due on Wednesday must be timestamped by the Thursday morning courier. Late assignments timestamped by the Friday morning courier will be penalized 33%. Assignments timestamped later than Friday will not be accepted. Assignments not sent by SITN courier are subject to the late policy for on-campus students specified above. This late policy will be strictly enforced.
Note that there is no single right answer to this question, although some answers may be better than others.
The attributes that form a key for a relationship set may be attributes of the relationship set itself, but the key also usually includes attributes of the entity sets over which the relationship set is defined. For example, suppose we have a many-many relationship set Took between a Students entity set and a Courses entity set, and Took has two attributes Quarter and Grade. Assuming that a student can take a course only once, then a key for the relationship set is {Student-ID, Course#}. If a student can take a course more than once, then a key for the relationship set is {Student-ID, Course#, Quarter}.
Let E1 and E2 be entity sets with key attributes K1 and K2, respectively. Let R be a relationship set from E1 to E2, and suppose for now that R has no attributes. For each of the following scenarios, specify a key for R. In each case your key should be minimal; that is, attributes that are not needed in the key should not be included.
Now suppose relationship set R does have at least one attribute. The second Students-Courses example above illustrates a many-many relationship set where an attribute of the relationship set (Quarter) is needed in the key.
As the course progresses you will be building up 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 scenario 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.
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.