Revision Questions for Week 3 and 4. The answers will be posted on WebCT later in the semester.

Which of the following is NOT an ER diagram connection trap?

  • Fan trap
  • Mousetrap
  • Chasm trap

    Fan traps

    A many-to-one relationship between Ingredients and Meals and a many-to-one relationship between Dishes and Meals constitutes a possible fan trap because the pathway between _ _ _ _ _ _ _ _ _ and _ _ _ _ _ _ _ _ _ is ambiguous.

    The fan trap can be resolved by changing the many-to-one relationship between _ _ _ _ _ _ _ _ _ and _ _ _ _ _ _ _ _ _ into a many-to-one relationship between _ _ _ _ _ _ _ _ _ and _ _ _ _ _ _ _ _ _ .

    A Chasm trap can occur if ... (choose one)

  • all relationships are mandatory
  • some relationships are optional

    Which of the following is NOT part of Enhanced ER Models (EER)?

  • generalisation
  • categorisation
  • normalisation
  • specialisation
  • aggregation

    Which of the following is a relationship, relationship type or relation?

  • Bus-Driver
  • Bus 14 - Driver John Smith
  • The database table that holds the data about buses and drivers.

    Which of the following is NOT true?

  • 1:1 relationships that are mandatory at both ends can be mapped into a relation by either combining or not combining the tables.
  • 1:1 relationships that are optional at one end are mapped into a relation by taking the primary key from the 'mandatory end' and adding it to the 'optional end' as a foreign key.
  • 1:1 relationships that are optional at both ends must be kept in 2 tables.
  • 1:m relationships are mapped by taking the primary key from the 'many end' and adding it to the 'one end' as a foreign key.
  • M:n relationships are mapped by creating a new relation that contains the keys from both sides.

    Which of the following may include rows that failed the JOIN condition because of NULL values?

  • Traditional JOIN
  • Modern JOIN
  • OUTER JOIN
  • Equijoin

    What are the two aliases in "SELECT name, address from student undergraduate, student postgraduate"?

    _ _ _ _ _ _ _ _ _ _ and _ _ _ _ _ _ _ _ _ _ .

    Which of the rows in the following table is not an equivalence (i.e. produces the same result if used in SQL)?

    SELECT * FROM department WHERE ...

    "depno BETWEEN 3 AND 5" "depno > 2 AND depno < 6"
    "depno IN (1,2,3)" "depno = 1 OR depno =2 OR depno =3"
    "depno > ANY (1,2,3)" "depno = 1 AND depno =2 AND depno =3"
    "depno > ANY (SELECT depno FROM department)" "depno > (SELECT MIN(depno) FROM department)"
    "depno >= ALL (SELECT depno FROM department)" "depno >= (SELECT MAX(depno) FROM department)"

    Which of the following is correct?

  • CREATE table student (name varchar(20), dob 22.1.05);
  • CREATE student table (name varchar(20), dob date);
  • CREATE table student (name, dob);