Homework 1

Due January 20 at beginning of class

The goal of this assignment is to ensure that you've understood enough of the principles of data modeling to be able to be able to really understand the rest of the papers that we're reading.

To do so, the goal is to design a schema in ER diagrams, translate it into relational databases, populate it with tuples, and then write some queries on it. To make this more real, the goal is to use some data that you have. This assignment is to be done individually - afterall, you all have different data. You may discuss problems that you have with one another, but you should not have the same schemas, queries, or data. Please state any assumptions that you make.

The assignment must be turned in on paper at the beginning of class on the 20th.

  1. Create an ER diagram for some data that you have. The diagram should contain at least 2 relationships and three entities. Make sure you have keys for each entity. (30%)
  2. Create a relational schema based on the ER diagram above. If you can't figure out how to do something based on what was covered in class, that's okay, just write an explanation as to what you did and why.(25%)
  3. Populate each table with at least 3 tuples (10%)
  4. Create 3 queries over your schema. You must use selection, projection, and joins at least twice each (e.g., one query with selection, one query with projection and a join, and one query with selection, projection, and join would be fine). Write the queries in SQL, Datalog, and English. (30%)
  5. Answer the following questions (5%):
    1. If you were designing a relational schema, would you bother going for an ER diagram, or would you just go straight for relational? Why?
    2. How long did it take you to complete this assignment?
    3. What did you like the best about this assignment?
    4. What did you like the least about this assignment?
    5. What helped you learn the best in this assignment?
    6. What distracted from your learning in this assignment?


[534A home] [grading] [schedule][project]

Rachel Pottinger
E-mail Address: rap [at] cs [dot] ubc [dot] ca
Office Location: CICSR 393
Phone: (604)822-0436
Fax:(604)822-5485
Postal/Courier address:
The Department of Computer Science
University of British Columbia
201-2366 Main Mall
Vancouver, B.C. V6T 1Z4
Canada