Qinglian
• Home Page
• Assignments Due • Progress Report
• Handouts
• Tutorials
• Homeworks
• Lab Projects
• Log Out
Help
Copyright © 2007-2021 Gradiance Corporation.
Gradiance Online Accelerated Learning
Spring-21 HW2
Number of questions: 5 Positive points per question: 20.0 Negative points per question: 0.0
1.
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) PianoType(type, height, length, width)
b) Electronic(processor, power)
c) Manf(name, addr, price)
d) Traditional(name, wood)
2.
If we translated the above diagram to relations, and used the NULLs approach to handle the ISA hierarchy, which of the following relations could appear in the database schema?
a) Flights(pilotSSN, techSSN, number, schedule, race#, destination)
b) Aircraft(pilotSSN, techSSN, number, type, passengers)
c) Serves(type, number, passengers, techSSN)
d) Novice(pilotSSN, hours)
3.
Translate the above E/R diagram to relations, using the “Object-oriented” approach to handling ISA hierarchies. Then, indicate which of the following relations is NOT in the resulting database schema.
a) H(g,h)
b) S(e,f,g,h) c) S(a,c,f,g) d) G(a,b,c,e)
4.
Convert this E/R diagram to relations, resolving the dual use of the attribute “name” in some reasonable way. Then, confirm your correct translation by indicating which of the database schemas below is the most reasonable translation from the E/R diagram above into relations?
a) Cities(cname, sname, mayor), States(sname, gov)
b) Cities(name, stateName, mayor), In(name, stateName), States(name, governor)
c) Cities(cityName, stateName, mayor), In(cityName, stateName), States(name, governor)
d) Cities(cityName, mayor), States(name, governor)
5.
Translate the above E/R diagram to relations using the “Object-oriented” approach, the “E/R” approach, and the “NULLS” approach. Then, identify which of the following sets of attributes is the schema for some relation in the “E/R” approach, but does not appear if we use either the “object-oriented” approach or the “NULL’s” approach.
a) C(d,e,g) b) C(d,g)
c) C(d,f,g) d) A(d,e,f,g)
Submit Homework