CS101b - Assignment 5

The Entity-Relationship Model

Please keep track of the total time you spend on this assignment, and make a note of that on what you turn in. This way we can tune the assignments for future classes.

This week's assignment involves visual representations of database schemas using the Entity-Relationship model. For questions that involve drawing diagrams, you can use a program such as Visio, Powerpoint, xfig, dia, etc. Or, you can turn in hand-drawn diagrams. However you must follow these guidelines:

Some of the problems include translating diagrams into SQL DDL commands; in those cases, feel free to type the SQL into a text file (or some other file), as a separate document.

Suggested Reading

This week's assignment draws from the majority of Chapter 6. The reading sections for Lectures 14 through 18 indicate the most relevant sections: 6 - 6.7.5, 6.8.1, and 6.9. Of course, reading the entire chapter is recommended.

Book Problems

Do these problems from the "Exercises" section of Chapter 6.

General Hints:

When you are designing these database schemas, you should think hard about what constraints should be specified. Always try to design schemas so that it is not possible to represent invalid states.

Also, think about what types to use for the various columns when translating relation schemas into SQL DDL:

You will lose points if your designs specify bad column types or size/precision limits. If you provide rationale for your choices in SQL comments then you will be less likely to lose points. Also, you will lose points for leaving out constraints; these are essential in any good database design.


Copyright (c) 2007, California Institute of Technology.
Last updated February 13, 2007.