Back
ExamFull examExam paper only

21 06 19

Full exam for Data Bases 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: DATA BASES 2 – JUNE 21ST, 2019 – DURATION: 2H PROF. SARA COMAI, PROF. DANIELE M. BRAGA A. Active Databases (9 p.) CITY (Name, Description) POINTOFINTEREST (POI, Name, City, Description) DIRECTCONNECTION (FromPOI1, ToPOI2, Distance) The above relational schema stores graphs of

Data Bases 2Full exam

Document information

What's included in this study material

Full exam for Data Bases 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: DATA BASES 2 – JUNE 21ST, 2019 – DURATION: 2H PROF. SARA COMAI, PROF. DANIELE M. BRAGA A. Active Databases (9 p.) CITY (Name, Description) POINTOFINTEREST (POI, Name, City, Description) DIRECTCONNECTION (FromPOI1, ToPOI2, Distance) The above relational schema stores graphs of

Import quality: text was extracted directly from the original document.

Extracted content from the document

Representative passages recognised in different parts of the material. The full extracted text remains available to search, while this compact preview makes the page easier to read.

Page 1

DATA BASES 2 – JUNE 21ST, 2019 – DURATION: 2H PROF. SARA COMAI, PROF. DANIELE M. BRAGA A. Active Databases (9 p.) CITY (Name, Description) POINTOFINTEREST (POI, Name, City, Description) DIRECTCONNECTION (FromPOI1, ToPOI2, Distance) The above relational schema stores graphs of Points of Interest (POI) of several cities. Connections are directed: if it is possible to move from POI1 to POI2 and viceversa, then two tuples independently represent the two connections (and of course the distance may not be the same) . Write a set of triggers to implement the following behaviors: (a) upon deletion of a POI the incoming/outgoing connections to/from that POI must be deleted; (b) whenever a city is deleted, all the data related to that city are also deleted; (c) it is forbidden to insert a new DirectConnection from POI1 to POI2 if the distance of such connection is more than 3 times the distance from POI1 to POI2 passing through another POI; (d) if the last POI of a city is deleted, then the city is also deleted. Finally, build the triggering graph and discuss termination of the designed rule set. B. Distributed Deadlock Detection (6 p.) The nodes A, B C of a distributed transactional system are aware of the following remote and local waiting conditions: A: EBt3 ECt2 t1EC t3t5 t5t1 t5t2 B: ECt2 t3EA t2t3 C: t2EA t2EB t1t4 t4t2 Execute the Obermarck’s algorithm twice, with different conventions: • once sending messages of the form EXtitjEY forward (toward node Y) and only if i > j and • once with the “opposite” conventions, i.e., backward (toward node X) and only if i < j. Discuss the outcome, and explain it, taking into account the properties of the algorithm and the initial conditions. C. XML… and a bit of Concurrency Control (9 p.) <!ELEMENT Collection (…

Preview

First page of the document.

First page: 21 06 19