BD2 Text and Sol Draft
BD2 Text and Sol Draft
C. XML (9 p.)
<!ELEMENT Club ( Member*, Model* )>
<!ELEMENT Member ( Name, City, Country, Motorbike+, … )>
<!ATTLIST Member Identifier ID #REQUIRED>
<!ELEMENT Motorbike ( PlateNo, ModelName, ProductionYear )>
<!ELEMENT Model ( Name, TechnicalSpecs, History, … )>
The DTD above describes an international Club of Moto Guzzi™ enthusiast owners and collectors of vintage models.
Unspecified elements only contain PCData or are immaterial to the assignment. Extract in XQuery:
(4 p.) 1. The city hosting the largest number of exemplars of the “Falcone” model.
(5 p.) 2. For every bike model, the percentage of exemplars hosted in each distinct country, listed in descending order.
A. TRIGGER
Scenario a)
Scenario b)
Transaction T1 restarts: if it starts before T2/T3 commit it waits unit they commit, otherwise it can be
immediately executed. In any case, it is executed after T2 and T3 end.
C. XML
1. The city hosting the largest number of exemplars of the “Falcone” model.
2. For every bike model, the percentage of exemplars present in each distinct country, listed in descending order.
D. PHYSICAL DB
a)
b)
B+ using “Milan” to find 160K/8K=20 members in Milan, 20 pointers and 20 lookups onto the B+ for Motorbike