Document Sample

```					 Your score:        100

1.

Translate the above E/R diagram to relations, using the "E/R" approach to handling ISA hierarchies.
Then, identify which of the following relations is NOT in the resulting database schema.

a)      F(c,d)

b)      H(g,h)

c)      E(a,b,c)

d)      E(a,b,c,e)

You have answered the question correctly.

2.

Based on the above ER diagram, which of the following entity set cardinalities is valid?

a)      |A| = 0; |B| = 10; |C| = 0

b)      |A| = 1; |B| = 0; |C| = 10

c)      |A| = 10; |B| = 10; |C| = 0

d)      |A| = 1; |B| = 1; |C| = 0

You have answered the question correctly.

3.

Let a, b, and c be the numbers of entities in entity sets A, B, and C, respectively. Let t be the number of
triples in the relationship set for R. Which of the following is a possible combination of values for a, b, c,
and t?

a)       a=10, b=10, c=10, t=1000

b)       a=1, b=2, c=3, t=3

c)       a=10, b=5, c=0, t=5

d)       a=3, b=10, c=5, t=12

You have answered the question correctly.

4.       The following diagram:

describes a database about bands and their tours. A tour consists of a sequence of cities visited by a
band. We assume that no city is visited twice on a single tour, and on one date, a band can visit only one
city. Some of the entity sets are weak, and some of the relationships are supporting many-one
relationships, but all double rectangles and double diamonds are not shown.
Your task is to decide which of the entity sets are weak, and which relationships support them. If there is
a choice, prefer to use the attributes of the entity set itself in the key, and minimize the number of
supporting relationships. There may be more than one reasonable answer, especially since "tour#" can
have several reasonable interpretations. You should pick from the list below the one that is most
reasonable.

a)      Stops is weak, supported by At.

b)      Tours is weak, supported by By; tour# is unique only for a given band.

c)       Stops is weak, and its key is the date, the name of the associated city, and the
associated tour#.

d)      Cities is not weak.

You have answered the question correctly.

5.

The above diagrams describes pianos for sale. The terms should be obvious, except perhaps for a "piano
type," which is something like "Baby Grand" or "Upright." Translate the above diagram to relations,
using the "E/R" approach to handle the ISA hierarchy. Then, identify which of the following relations
appears in the database schema.

a)      PianoModel(manfName, type, price, processor, power, wood)

b)      PianoModel(manfName, type, price)

d)      PianoModel(manfName, type)

You have answered the question correctly.

6.        Suppose we are to design a registrar's database to store information about students, courses,
the courses students have taken, and the grades students have gotten in these courses. Courses have a
number, a department, and a title, for example, "CS101: Introduction to computing" has department =
CS, number = 101, and title = "Introduction to Computing." Numbers are assigned by departments, and
different departments may use the same number. Students are represented by their (unique) student ID
and their name. "Enrollments" each consist of a course, a student who took that course, and the grade
the student got in the course. You should draw one or more E/R diagrams that represent this database
structure correctly. Then, indicate which of the following might you find in a correct E/R diagram.

a)      Entity set Students with attribute ID underlined and name not underlined.

b)      Ternary relationship Enrollments connecting entity sets Courses, Students, and Grades,
with an arrow to Courses.

c)      Entity set Students with attributes ID and name underlined.

d)     Entity set Courses with attribute department underlined and attributes number and
title not underlined.

You have answered the question correctly.
7.

Which of the following is necessarily true about the City and State entity sets and their relationship In?

a)      No two cities can have the same name.

b)      No person can be the governor of two different states.

c)      No two States can have the same name.

d)      No two States can have governors with the same name.

You have answered the question correctly.

8.        A bank has a database with accounts. For each account it records the (unique) account number
and the current balance. The database also has information about depositors --- their name, (unique)
social-security number, and their address. Finally, the bank also stores, for each account, the depositor
or depositors (in the case of joint accounts), that own the account. There is only one reasonable E/R
diagram for this database structure. Draw this E/R diagram, and then tell which of the following appears
in the E/R diagram for this bank's database.

a)      A diamond labeled Owns.

b)      A diamond labeled Accounts.

c)      An oval labeled Owns.

d)      A rectangle labeled Owns.