Homework Assignment Submitted Successfully.

You obtained a score of 100.0 points, out of a possible 100.0 points.
You have answered all the questions correctly.
Congratulations, you have achieved the maximum possible score.
Submission time: / 2010-10-19 03:19:39 PST (GMT - 8:00)
Number of questions: / 8
Positive points per question: / 12.5
Negative points per question: / 0.0
Your score: / 100
1. / 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 rectangle labeled Accounts.
b) / A diamond labeled Depositors.
c) / A diamond labeled Accounts.
d) / An oval labeled address with an underline.
Answer submitted: a)
You have answered the question correctly.
2. /
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) / G(a,c,e)
b) / F(c,d)
c) / E(a,b,c,e)
d) / S(a,c,f,g)
Answer submitted: c)
You have answered the question correctly.
3. /
Which of the following is necessarily true about the City and State entity sets and their relationship In?
a) / No person can be a mayor and a governor at the same time.
b) / Each City has at most one mayor.
c) / No two cities can have mayors with the same name.
d) / No person can be the mayor of two different cities.
Answer submitted: b)
You have answered the question correctly.
4. /
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) / By(name, price)
b) / Traditional(manfName, type, price, wood)
c) / Traditional(name, wood)
d) / Traditional(manfName, type, wood)
Answer submitted: d)
You have answered the question correctly.
5. / 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 both At and On; date is a key attribute.
b) / Bands is weak, supported by By.
c) / Tours is weak, supported by On and By.
d) / Stops is weak, supported by On.
Answer submitted: d)
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 Courses with attributes department and number not underlined and title underlined.
b) / Entity set Students with attribute ID not underlined and name underlined.
c) / Entity set Students with attribute ID underlined and name not underlined.
d) / Entity set Courses with attribute number underlined and attributes department and title not underlined.
Answer submitted: c)
You have answered the question correctly.
7. /
Based on the above ER diagram, which of the following entity set cardinalities is valid?
a) / |A| = 10; |B| = 1; |C| = 0
b) / |A| = 1; |B| = 10; |C| = 0
c) / |A| = 1; |B| = 0; |C| = 10
d) / |A| = 1; |B| = 1; |C| = 0
Answer submitted: c)
You have answered the question correctly.
8. /
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=5, c=0, t=5
b) / a=5, b=3, c=4, t=20
c) / a=1, b=2, c=3, t=3
d) / a=3, b=10, c=5, t=12
Answer submitted: d)
You have answered the question correctly.