Lab 9. Database Design Using ER Diagram
CS122, Fall 2011

For Exercise 1, please draw the ER diagram on a piece of paper and turn it in to the instructor. For Exercise 2 and 3, please put your answers in a file lab9.txt and upload it to CSNS at the end of the lab. Note that file uploading will be disabled automatically after 4:00pm, and late submission will not be accepted.

1. (10pt) Analyze the the sample email below and design a database to store emails.

From: John Smith <jm@spammer.net>
Reply-to: nobody <nobody@spammer.net>
To: John Doe <jd@hotmail.com>
Doe, Jane <janedoe@hotmail.com>
CC: jm@yahoo.com
Date: 09:01PM 7/24/2011
Subject: CONGRATULATIONS

Dear Winner:
You have won the International Lottery. Please send us your name, birthday,
credit card number, and other personal information you want to share.

Draw an ER diagram for this database. Please show your diagram to the instructor before you proceed to the next exercise.

2. (10pt) Convert your ER diagram for Exercise 1 to tables. For each table, simply give the table name and the column names.

3. (10pt) Convert the ER diagram in the Sample Final to tables. Again, for each table just give the table name and the column names.