1.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) Tours is weak, supported by On and By. b) Cities is weak, and its key is the city name and the name of the state it is In. c) Stops is weak, and its key is the date and the name of the band making the tour the stop represents. d) Stops is weak, supported by both At and On; date is not a key attribute. Answer submitted: b) You have answered the question correctly. 2. 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) Electronic(manfName, type, price, processor, power) b) Traditional(manfName, type, price, wood) c) By(name, price) d) PianoType(type, height, length, width) Answer submitted: d) 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=5, c=0, t=5 b) a=1000, b=10, c=50, t=10000 c) a=10, b=10, c=10, t=1000 d) a=1, b=2, c=3, t=3 Answer submitted: b) You have answered the question correctly. 4. 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 underlined and title not underlined. b) Entity set Students with attributes ID and name underlined. c) Entity set Students with attribute ID not underlined and name underlined. d) One-one relationship Enrollments connecting Courses and Students, with attribute grade. Answer submitted: a) You have answered the question correctly. 5. 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) S(a,c,f,g) b) G(a,c,e) c) E(a,b,c) d) E(a,b,c,e) Answer submitted: d) You have answered the question correctly. 6. 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) No person can be the mayor of two different cities. c) No person can be the mayor of Cities In two different States. d) Each City has at most one mayor. Answer submitted: d) You have answered the question correctly. 7. Based on the above ER diagram, which of the following entity set cardinalities is valid? a) |A| = 1; |B| = 1; |C| = 0 b) |A| = 1; |B| = 10; |C| = 0 c) |A| = 0; |B| = 1; |C| = 0 d) |A| = 0; |B| = 0; |C| = 0 Answer submitted: d) 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) An oval labeled depositor-name with an underline. b) A rectangle labeled address. c) A diamond labeled depositor-name. d) An oval labeled account-number with an underline. Answer submitted: d)