Back
ExamFull examExam paper only

25 01 18ts

Full exam for Data Bases 2 in the Computer Engineering degree programme at Politecnico di Milano. The document covers: DATA BASES 2 – JANUARY 25TH, 2018 – TIME: 2H 15M PROF. DANIELE M. BRAGA, PROF. STEFANO PARABOSCHI A. Active Databases (9 p.) TREENODE (NodeId, FatherId, NodeValue, MinChildrenValue, MinDescValue, MaxChildrenValue, MaxDescValue) The table describes nodes of a tree, where each

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 – JANUARY 25TH, 2018 – TIME: 2H 15M PROF. DANIELE M. BRAGA, PROF. STEFANO PARABOSCHI A. Active Databases (9 p.) TREENODE (NodeId, FatherId, NodeValue, MinChildrenValue, MinDescValue, MaxChildrenValue, MaxDescValue) The table describes nodes of a tree, where each

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 – JANUARY 25TH, 2018 – TIME: 2H 15M PROF. DANIELE M. BRAGA, PROF. STEFANO PARABOSCHI A. Active Databases (9 p.) TREENODE (NodeId, FatherId, NodeValue, MinChildrenValue, MinDescValue, MaxChildrenValue, MaxDescValue) The table describes nodes of a tree, where each node stores a single value; FatherId is null for the root of the tree. Each node of the tree also describes the minimum and maximum values among all the direct children of the node and the minimum and maximum values among all the descendants of the node; for leaves these values are null. Write a set of triggers that keep the tree content consistent after an insertion of leav es into the tree. Discuss the termination of the triggers. Discuss how triggers could keep the structure consistent after a deletion of a leaf from the tree. B. Concurrency Control (5 p.) Classify th e following schedule w.r.t. all the known serializability classes , giving terse but exhaustive and precise justifications. r1(A) r2(B) w3(C) w2(B) r2(C) r1(B) r3(C) r2(A) r4(B) w5(C) w4(B) C. XML (10 p.) <!ELEMENT booklist ( book+ )> <!ELEMENT book ( title, author+, section+ )> <!ELEMENT section ( title, ( paragraph | figure | section )* )> <!ATTLIST section id ID #IMPLIED difficulty CDATA #IMPLIED> <!ELEMENT figure ( title, image )> <!ATTLIST figure width CDATA #REQUIRED height CDATA #REQUIRED > <!ELEMENT image EMPTY> <!ATTLIST image source CDATA #REQUIRED > The DTD above (source: W3C) describes books with nested sections. Unspecified elements only contain PCData. Extract in XQuery: (3 p.) The most used image in the booklist (publishers notoriously tend to reuse the same images in book figures, if possible). (3 p.) For each author, the number of figures overall published in his books, and their average “resolution” (expressed in…

Preview

First page of the document.

First page: 25 01 18ts