← Back
ExamFull examExam paper onlyItalian

13 02 14S

Study material for Basi di Dati, shared by the Studwiz community and reviewed by moderators.

Basi di DatiFull exam

Document information

What's included in this study material

Study material for Basi di Dati, shared by the Studwiz community and reviewed by moderators.

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

11/26/14 1 Basi di dati: appello 13/02/14 Si consideri il seguente schema di base di dati che vuole tenere traccia delle attività di un consorzio di dentisti DENTISTA (CF, Nome, Cognome, Specializzazione, Telefono) STUDIO (Codice, Nome, Indirizzo, Città, Titolare) PAZIENTE (CF, Nome, Cognome, Indirizzo, CittàResidenza, Età) LAVORO (Dentista, Studio, Paziente, Data, Tipo_Intervento, Prezzo) Linguaggi Formali Esprimere in algebra relazionale e calcolo relazionale la seguente query: Trovare i pazienti che hanno avuto un solo intervento di Igiene Orale che è stato fatto in uno studio che si trova in una città diversa da quella in cui abitano.. - ΠPaziente LAVORO ρ D←data, σTipo_Intervento=“Igiene Orale” LAVORO σTipo_Intervento=“Igiene Orale” σData<>D LAVORO σTipo_Intervento=“Igiene Orale” Πpaziente, Studio STUDIO Πcodice, città Codice= Studio Πpaziente, città PAZIENTE ΠCF, cittàResidenza CF=paziente σCittaResidenza <> città ΠPaziente Πpaziente, Data Πpaziente, Data 11/26/14 2 Linguaggi Formali – Calcolo Relazionale {t| ∃ t1 ∈ PAZIENTE, ∃ t2 ∈ STUDIO, ∃ t3 ∈ LAVORO (t[Codice]=t3[Paziente] ∧ t2[Codice]=t3[Studio]∧ t3[TipoIntervento] = “Igiene orale” ∧ t1[CF]=t3[Paziente] ∧ t1[CiitàResidenza] <> t2[Città]) ∧ ¬ (∃ t4,t5 ∈ LAVORO (t3[Paziente]=t4[Paziente]∧ t4[TipoIntervento] = “Igiene orale”∧ t5[TipoIntervento] = “Igiene orale” ∧ t4[Paziente] = t5[Paziente] ∧ t4[Data] <> t5[Data])))} Linguaggi Formali - DataLog Risultato (Codice) – PAZIENTE(Codice, _, _, _, “Milano”, _) STUDIO (CodStudio, _, _, “Milano”, _) LAVORO (_, CodStudio, Codice, _, “Ortodonzia”, _) Risultato (Codice) – PAZIENTE(Codice, _, _, _, “Milano”, _) STUDIO (CodStudio, _, _, “Milano”, _) LAVORO (_, CodStudio, Codice, _, “Implantologia”, _) ? - Risultato(X) Trovare i pazienti residenti a Milano che hanno subito,…

Preview

First page of the document.

First page: 13 02 14S