• Non ci sono risultati.

Databases Queries in relational algebra

N/A
N/A
Protected

Academic year: 2021

Condividi "Databases Queries in relational algebra"

Copied!
2
0
0

Testo completo

(1)

Databases Queries in relational algebra

Tania Cerquitelli

©2014 Politecnico di Torino 1

D B M G

Ottimizzatore

Esercizi Esercizi

Tania

Tania Cerquitelli Cerquitelli

D B M G

Esercizio 3 - Seminari

Sono date le relazioni seguenti (le chiavi primarie sono sottolineate):

o SEMINARIO (IdS, Titolo, Max#Partecipanti, Argomento)

o PARTECIPANTE (CodFiscP, Nome, Cognome, Società, Ruolo, Data Nascita)

o REGISTRAZIONE (CodFiscP, Data, IdS, Città)

2

(2)

Databases Queries in relational algebra

Tania Cerquitelli

©2014 Politecnico di Torino 2

D B M G

Statistiche

o card(SEMINARIO) ≈ 10

3

tuple o Valori distinti di argomento 100 o card(PARTECIPANTE) ≈ 10

5

tuple

o Valori distinti di ruolo 20

o card(REGISTRAZIONE) ≈ 10

8

tuple o Valori distinti di città 100

o MIN (Data)=1-1-2013 o MAX (Data)=31-12-2013

3

D B M G

Query 1

SELECT P.Nome, P.Cognome FROM PARTECIPANTE P

WHERE (P.Ruolo = ‘Manager’ or P.Ruolo = ‘Direttore’ ) and P.CodFiscP NOT IN (SELECT CodFiscP

FROM REGISTRAZIONE R. SEMINARIO S WHERE R.IdS=S.IdS and

Argomento=‘Ingegneria civile’)

4

Riferimenti

Documenti correlati

The second problem is related to the very same inscriptions: from the concise examples provided in the previous paragraphs it is possible to understand how the document

D101 Green Computer Engeneering 123456 D102 White Telecommunications 636363 D321 Black Computer Engeneering 414243.

ProfID PName Dipartimento D102 Green Computer engineering D105 Black Computer engineering D104 White Department of electronics.

(a) Find the codes and the names of the pilots who are qualified to fly on an aircraft that can cover distances greater than 5,000 km (MaximumRange ≥ 5,000). (b) Find the codes and

(a) Find the codes and the names of the pilots who are qualified to fly on an aircraft that can cover distances greater than 5,000 km (MaximumRange ≥ 5,000). (b) Find the codes and

CUSTOMER (CustCode, CustName, Gender, AgeRange, CustCountry) VACATION-RESORT (ResCode, ResName, ResType, Location, ResCountry). RESERVATION(CustCode, StartDate,

TOUR-GUIDE (GuideCode, Name, Surname, Nationality) TYPE-OF-TOUR (TourTypeCode, Monument, Duration, City) GROUP (GroupCode, NumberOfParticipants, Language)..

TOUR-GUIDE (GuideCode, Name, Surname, Nationality) TYPE-OF-TOUR (TourTypeCode, Monument, Duration, City) GROUP (GroupCode, NumberOfParticipants, Language)..