Quiz 2 Notes

  1. Relational Algebra Queries - I generally gave full credit if the answer would have turned out right. Many people added projections here and there to shrink intermediate answers, but this is not necessary. Also, many people used all sorts of crazy joins, but all that was needed was a natural join (*), because the attributes which are not foreign keys are uniquely named.

    Some people drew a query tree. Try to use sentences next time.

  2. QBE - Some people used some sort of relational calculus to solve this, and no points were awarded, because this question is specifically about QBE and its syntax.

    People should NOT use RESULT tables in either answer! Result tables are used when information is taken from multiple tables. No penalty was given for the use of them this time, but, in the future, there will probably be a small penalty.

    Conditions are not necessary here. Some people tried to use conditions where either a constant, or a negation belongs.

    Some people added extra tables to their answers, e.g., a CUSTOMER table in part 1. No penalty was given for this this time, but a small one will probably be exacted in the future.

    Variable were overused. Variables allow references from other attributes/tables. If no references are made to a certain attribute, do not bother adding a variable. No penalty was exacted for this.

    With regard to the negation in part 2, the proper answer is to use a joining variable for customer number, and negate it ("there does not exist") in the order table.

  3. ER-to-Relations - Many people had difficulty with the AUTHORS multivalued attribute. It should be map into a relation AUTHORS, with AUTHOR and ISBN# (from BOOK) as its key attributes.

    There were also many problems with the LOANED_TO relation, which should consist of all the relationship's attributes, and the keys of its participating relations.


Wai Gen Yee
Last modified: Mon Sep 27 02:46:08 IST 1999