Back
ExamFull examExam paper only

06 09 11

Full exam for Data Bases 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: DATA BASES 2 – PROFF . S. COMAI , S. PARABOSCHI SEPTEMBER 06 2011 – TIME : 2 h E 30 m A. Concurrency Control (6 points) Consider the following schedule: r1(x), r2(x), r1(y), r2(z), r3(y), w1(y), w2(x), w3(z) 1) Classify it with respect to VSR, CSR, 2PL, TS mono, and TS multi and

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 – PROFF . S. COMAI , S. PARABOSCHI SEPTEMBER 06 2011 – TIME : 2 h E 30 m A. Concurrency Control (6 points) Consider the following schedule: r1(x), r2(x), r1(y), r2(z), r3(y), w1(y), w2(x), w3(z) 1) Classify it with respect to VSR, CSR, 2PL, TS mono, and TS multi and

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 – PROFF . S. COMAI , S. PARABOSCHI SEPTEMBER 06 2011 – TIME : 2 h E 30 m A. Concurrency Control (6 points) Consider the following schedule: r1(x), r2(x), r1(y), r2(z), r3(y), w1(y), w2(x), w3(z) 1) Classify it with respect to VSR, CSR, 2PL, TS mono, and TS multi and motivate all the answers. If it is VSR, provide all the possible serializations. (4 points) 2) Considering the 2PL protocol, does the execution of the operations in the order specified by the schedule generate a deadlock or the transactions can indeed complete their execution (possibly with a different order)? (2 points) B. XML and OODB (10 points) The following DTD describes a diet <!ELEMENT Diet ( Meal+ )> <!ELEMENT Meal ( Date, Time, Course+ )> <!ELEMENT Course ( Name, Ingredient+, Calories, gCarbohydrater, gLipids, gProteins )> Suppose that all the non-specified elements are of type #PCDATA. Express in XQuery the following queries: 1) For each ingredient retrieve the list of all the courses containing it. (2 points) 2) Retrieve all the dates where, according to the diet, you can take less than 1500 calories even if the diet prescribes courses with a total of 10 or more ingredients. (4 points) 3) Design an appropriate O-O schema to represent the same information and express Query 2 in OQL. (4 points) C. Active databases (7 points) Build a system for the management of the exams, where the professors suggest a date for their course; the system has at its disposal the number of students registered to the exam and a set of classrooms with their capacities. The system assigns to the exam one of the three daily slots in one of the classrooms, provided that the capacity is sufficient. The system also checks that for the same course no other slots have been assigned in the 15 days preceding the…

Preview

First page of the document.

First page: 06 09 11