Back
ExamFull examExam paper only

05 02 2025 E T

Full exam for Data Bases 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: Check if 30% reduction: ◻ Last name: First name: Pers. code: Signature: Databases 2 - exam - February 5, 2025 - Dur. 2h S. Comai, P. Fraternali, D. Martinenghi Students with 30% reduction can omit: Exercise A: point 2 Exercise B: point 3 - Exercise C: code of JPA entity for

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: Check if 30% reduction: ◻ Last name: First name: Pers. code: Signature: Databases 2 - exam - February 5, 2025 - Dur. 2h S. Comai, P. Fraternali, D. Martinenghi Students with 30% reduction can omit: Exercise A: point 2 Exercise B: point 3 - Exercise C: code of JPA entity for

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

Check if 30% reduction: ◻ Last name: First name: Pers. code: Signature: Databases 2 - exam - February 5, 2025 - Dur. 2h S. Comai, P. Fraternali, D. Martinenghi Students with 30% reduction can omit: Exercise A: point 2 Exercise B: point 3 - Exercise C: code of JPA entity for Brand. A. Concurrency control (11 points) Consider a distributed system with three nodes (A, B, C) with the following wait-for conditions: NODE A: EB → t4; t4 → t7; t7 → t5; t5 → EC NODE B: EC → t1; t1 → t3; t3 → t2; t3 → t4; t4 → EA NODE C: EA → t5; t5 → t6; t6 → t8; t6 → t1; t1 → EB Apply the Obermarck algorithm and determine if a deadlock is detected, under the two following conventions: (1) A node X transmits to a downstream node Y the arc tj → ti if j > i. (4 points) (2) A node X transmits to a downstream node Y the arc tj → ti if j < i. (4 points) (3) Consider schedules comprising abort requests and explain why long duration write locks (i.e., strict 2PL locks for write operations) are required. (3 points) If more space is needed, use the extra space (last page) B. Ranking (12 points) Dataset D is vertically distributed over three data sources ( A, B, C, shown below), with values in [0,1]. Your task is to find the two items with the highest score according to function f (t)= 4t.A+ 2t.B+ t.C. A B C 1: 1.00 2: 0.80 2: 0.60 7: 0.80 1: 0.65 7: 0.60 2: 0.70 3: 0.55 3: 0.50 3: 0.20 4: 0.50 1: 0.15 6: 0.15 5: 0.30 5: 0.10 4: 0.10 6: 0.30 4: 0.00 5: 0.10 7: 0.30 6: 0.00 1. Do this by applying FA. [4 points] 2. Do this by applying NRA. Show the buffer after each round. [5 points] 3. Could NRA ever make fewer sorted accesses than FA? Explain. [3 points] You should indicate the depth, the number of accesses, the results, and succinctly show enough details so as to allow understanding each round of…

Preview

First page of the document.

First page: 05 02 2025 E T