← Indietro
EsameEsame completoTesto d’esame

31 08 18ts

Esame completo di Data Bases 2 per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Data Bases 2Esame completo

Informazioni sul documento

Cosa trovi in questo materiale

Esame completo di Data Bases 2 per il corso di Computer Engineering presso Politecnico di Milano. Materiale proveniente dall’archivio storico Studwiz e classificato per la consultazione online.

Qualità dell’importazione: il testo è stato estratto direttamente dal documento originale.

Contenuti estratti dal documento

Passaggi rappresentativi riconosciuti nelle diverse parti del materiale. Il testo completo resta presente nella pagina per la ricerca, mentre l’anteprima compatta rende più semplice la lettura.

Pagina 1

DATA BASES 2 – AUGUST 31ST, 2018 – TIME: 2H 15M PROF. DANIELE M. BRAGA, PROF. STEFANO PARABOSCHI A. Active Databases (9 p.) PERSON (ID, BIRTHDATE, FATHERID, MOTHERID, NUMANCESTORS, NUMDESCENDANTS) The table describes the genealogy of people. FatherId and MotherId can be null when this information is not available. The BirthDate cannot be null. Write a set of triggers that react to insertions into the table and (i) reject tuples that have a birthdate smaller than that of any of the parents, and (ii) maintain the values of attributes NumAncestors and NumDescendants, which respectively represent the number of ancestors and descendants present in the database (we assume that the sets of ancestors and descendants do not include repetitions). Discuss the termination of the triggers. Also discuss how triggers could keep the structure consistent after the deletion of a tuple. B.1 Concurrency Control (4 p.) Classify this schedule w.r.t. VSR, CSR, 2PL, 2PL-strict, TS-mono, TS-multi, giving terse but precise justifications: r1(A) r2(A) w2(A) r1(B) w1(C) w2(C) r3(C) w3(A) w2(B) w3(B) B.2 Deadlocks (2 p.) Update lock (UL) was introduced so as to contrast deadlocks. Can we state that deadlocks are impossible in the presence of Update Locks? If so, concisely explain why; if not, provide a counter-example. C. XML (9 p.) <!ELEMENT Genealogy ( Person+ )> <!ELEMENT Person ( Name, Sex, BirthDate, BirthPlace, Children? )> <!ATTLIST Person id ID #REQUIRED father IDREF #IMPLIED> <!ELEMENT Name ( Given, Middle?, Last )> <!ELEMENT Children ( Person+ )> The DTD above describes the genealogy of a community. Please note the asymmetry in the schema : people are represented as sub-elements of their mothers (when the mother is known), while fathers are represented as references (when known).…

Anteprima

Prima pagina del documento.

Prima pagina: 31 08 18ts