Sei sulla pagina 1di 44

Basi di Dati - IV

Corso di Laurea in Informatica


Anno Accademico 2021/2022

Alessandra Raffaetà
raffaeta@unive.it

4. Modello Relazionale Corso di Basi di Dati


Progettazione Logica
Progettazione Logica: Modello Relazionale 3

Il modello dei dati relazionale (Edgar F. Codd, 1970)

Trasformazione dal modello concettuale ad oggetti al modello logico


relazionale

Algebra relazionale

4. Modello Relazionale Corso di Basi di Dati


Il Modello Relazionale
Il Modello Relazionale: intuizione 5

Collezioni come relazioni (tabelle)

Studenti Esami
Nome: string Codice: string
Cognome: string Candidato: string
Matricola: string Materia: string
AnnoCorso: int Data: date
Voto: int
Lode: bool

Associazioni tramite chiavi

Studenti Esami
Nome: string Codice: string <<PK>
Cognome: string> Candidato Candidato: string <<FK(Studenti)>>
Matricola: string <<PK> Materia: string
AnnoCorso: int Data: date
Voto: int
Lode: bool

4. Modello Relazionale Corso di Basi di Dati


Modello Relazionale 6

I meccanismi per definire una base di dati con il modello relazionale sono
l’ennupla e la relazione.

Dal punto di vista matematico


relazione R ⊆ D1 × D2 x ... x Dn
- D1, ..., Dn domini
ennupla <d1, ...., dn> ∈ R
- d1 ∈ D1, ..., dn ∈ Dn

in Informatica si associa un’etichetta distinta a ciascun dominio D1, ..., Dn



(record!)

4. Modello Relazionale Corso di Basi di Dati


Modello Relazionale (cont.) 7

Tipo ennupla T: insieme finito di coppie (Attributo, Tipo primitivo):



(A1: T1, ..., An: Tn)

Tipo relazione o tipo insieme di ennuple: Se T è un tipo ennupla, allora {T} è


un tipo relazione.

Schema di relazione
R:{T} ( T tipo ennupla, {T} tipo relazione )

Spesso scriveremo R(T) invece di R:{T}.

Istanza di uno schema R:{T} o relazione: insieme finito di ennuple di tipo T.


- cardinalità: numero delle sue ennuple.

Schema relazionale di una BD:


insieme di schemi di relazione Ri:{Ti};
vincoli di integrità

4. Modello Relazionale Corso di Basi di Dati


Esempio: schema di relazione 8

Studenti (Nome: string, Cognome: string, Matricola: string, Anno:int)

Nome Cognome Matricola Anno


Paolo Verdi 71523 2005
Studenti
Anna Rossi 76366 2006

Giorgio Zeri 71347 2005

se non interessa evidenziare il tipo degli attributi scriviamo 



Studenti(Nome, Cognome, Matricola, Anno)


4. Modello Relazionale Corso di Basi di Dati


Modello Relazionale: Schema 9

Schema relazionale:
Studenti (Nome: string, Cognome: string, Matricola: string, Anno: int)
Esami (Codice: string ,Materia: string, Candidato: string, Data: string, Voto: int, Lode:char)

Studenti Nome Cognome Matricola Anno

Paolo Verdi 71523 2005


Anna Rossi 76366 2006

Giorgio Zeri 71347 2005

Esami Codice Materia Candidato Data Voto Lode


B112
ee BD 71523 08.07.06 27 N
F31 FIS 76366 08.07.07 26 N

B247 CN 71523 28.12.06 30 S

4. Modello Relazionale Corso di Basi di Dati


Vincoli di integrità 10

Considereremo

chiavi

chiavi esterne

valori non nulli

r è un’istanza valida di uno schema di relazione R se rispetta tutti i

vincoli definiti su R. 


4. Modello Relazionale Corso di Basi di Dati


Chiavi 11

Superchiave in R: sottoinsieme X di attributi di uno schema di relazione R tale


che il valore degli attributi in X determina univocamente una ennupla

Esempio: (Matricola) e (Cognome,Matricola) sono superchiavi in:



Studenti(Nome, Cognome, Matricola, Anno)

Chiave: superchiave minimale; gli attributi che appartengono ad una chiave sono
detti primi

Esempio: Matricola

Chiave primaria: una delle chiavi, in genere di lunghezza minima

Altre chiavi sono indicate con <<CK>>

4. Modello Relazionale Corso di Basi di Dati


Chiavi esterne ed Associazioni 12

Chiave esterna in R

insieme di attributi X= {A1, ..., An} di R che riferisce la chiave primaria 



Y={B1, ..., Bn} di S:

per ogni ennupla r in R esiste una ennupla s in S t.c. 



r.X = s.Y (r “riferisce” s). [integrità referenziale]

Associazioni

realizzate con il meccanismo di chiave

4. Modello Relazionale Corso di Basi di Dati


Esempio 13

Schema:
Studenti(Nome: string, Cognome: string, Matricola: string, Anno: int)
Esami(Codice: string, Materia: string, Candidato*: string, Data: string, Voto: int, Lode:char)

Associazione:
Studenti Nome Cognome Matricola Anno

Paolo Verdi 71523 2005


Anna Rossi 76366 2006

Studenti
Giorgio Zeri 71347 2005

Candidato Esami Codice Materia Candidato* Data Voto Lode


B112 BD1 71523 08.07.06 27 N
Esami
F31 FIS 76366 08.07.07 26 N

B247 BD2 71523 28.12.06 30 S

4. Modello Relazionale Corso di Basi di Dati


Esempio: altre soluzioni 14

Studenti(Nome, Cognome, Matricola, Anno, Esame*)



Esami(Codice, Materia, Data, Voto, Lode)

Studenti(Nome, Cognome, Matricola, Anno, Esame*)



Esami(Codice, Materia, Data, Voto, Lode)

Studenti(Nome, Cognome, Matricola, Anno)



Esami(Codice, Materia, Data, Voto, Lode)

StudentiEsami(Esame*, Candidato*)

Studenti(Nome, Cognome, Matricola, Anno)



Esami(Materia, Crediti)

ProvaEsame(Codice, Esame*, Candidato*, Data, Voto, Lode)

Quali sono sensate?

4. Modello Relazionale Corso di Basi di Dati


Valori non nulli 15

Un attributo può avere valore non specificato (proprietà parziali), per varie ragioni:

non applicabile

sconosciuto

si usa NULL

Es.: Per lo schema di relazione nella biblioteca



Utente(Nome, Cognome, CodiceFiscale, ...)

CodiceFiscale per un ospite potrebbe non aver valore perché nel paese di
provenienza il CF non si usa o perché il CF non è noto nel momento della
creazione dell’utente.

4. Modello Relazionale Corso di Basi di Dati


Valori non nulli e chiavi 16

Negli schemi relazionali si può imporre il vincolo NOT NULL per un attributo

Gli attributi della chiave primaria (e delle chiavi in generale) devono assumere
valori non nulli

Una chiave esterna può avere valore nullo se rappresenta una associazione
parziale.

4. Modello Relazionale Corso di Basi di Dati


Dal Modello a Oggetti
al Modello Relazionale
Schemi a oggetti -> Schemi relazionali 18

Trasformazione per passi:

1. associazioni molti a uno (e uno a uno)

2. associazioni molti a molti

3. gerarchie di inclusione

4. identificazione chiavi primarie

5. attributi multivalore

6. attributi composti

4. Modello Relazionale Corso di Basi di Dati


Schemi a oggetti -> Schemi relazionali 19

Associazioni N:1 (univoche e totali)

<latexit sha1_base64="0tT3UYaNdkmB7K8yzToBXb2InBo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JeuReNgAQv8RsK68ZcWiJFLoHRzJ5QrIov0VZzp8OuEFVGFUfLp+dcG4hTIXBVoNLRXVONFy/t3xFchwScyCEc8wlxqhRA2HzYVjap0pSJaRUBMOS7w0Lkt3sPNBmSBSkqkF6dnanUqCB4dvaqJBtFKrUsHqh2S7SyYZW8YrlErjBd4AhUnxWnA9XpsteB6nXZ7UB1u8JvX/VbddxXHV/x3Fc9X3HdV12v8p05SwVF5IwXs1HkXyosucJ4KcwZqS7vOMWbNQ9hS3Hor4x4cnoctkayNk07DJlDA1gaZs9uW0b2dLLVHO1G6WNV9tSxmINHCNblzXR3q1mgZ4aBuHUwf/V6tZey7r1CsLp4C7uP6kkFNhgE07v/u4WWPsXkXWyEYDKXDHHytrArcNvQhxhcrvDb434nEa2AJs8VCuNccIOY/sdDKt9ySo+SsXw1S+pnt7aM8tPX6sdXzYZx2Gh92dz69GH+LLZR26z9urZbM2p3a5/Wvqid1E5r9safNv6y8deNv23+efPvm//Y/GfG+uEHucwva8pv81//BkArsn0=</latexit>

R A R
A B B
Attributi
Attributi Attributi R ⌧FK(B) Attributi

A B A
R
Attributi Attributi Attributi B
R ⌧FK(B) Attributi
R RAttributi

Attributi

Prestiti <<-|----> Utenti

4. Modello Relazionale Corso di Basi di Dati


Schemi a oggetti -> Schemi relazionali 20

Associazioni N:1 (univoche e parziali)


<latexit sha1_base64="mee5ie5nD+cFZoeUodEqRP2jaZs=">AAAbknic3Vh7U+NGEndyuVvie+0m+Y9/5s5QBSlhLGPDssRbMY9cXGEXziybXGwXNZLG8hR6ZWYMGK2+y32tfJvrkWSjkeUtWJLU3anKVePp1697unseRuBQLmq1nz/6+Hef/P4PT5Y+Lf/xT3/+y1+fPvvsLffHzCTnpu/47AcDc+JQj5wLKhzyQ8AIdg2HfG9cHkj691eEcep7b8QkIAMX2x4dUhMLmLp49uTfCKE+N7FDDP8mrFUb9ShEaBUG6nyzCfNlFH99g9jUCwW9vA2oKcaMRCkFaJ5vEYTW2vq5R698E59idkt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ZemIYiJWtKtxExGgdvduIWTfeIZhtTGf3UDkqwAYHwfju/8tCi59j0i42QHAylwxh9KGwC3Cb0IcYXK7wh+P+RSJaAE3uKxSOc94jYvqrh1S+5eReKEP5chaVL55W9PzT1/zgbb2qb1cb/6xXvt5Pn8WWSsulv5fWSnppp/R16dvSaem8ZC49WdpY2l7aWf5i+cVye/kgYf34o1Tm85LyLR//B7H9t1U=</latexit>

A R B
A B
A ⌧PK ⌧FK(A)
R Attributi Attributi
A B B ⌧FK(B)
Attributi Attributi
A R
B
Attributi
R ⌧FK(B) Attributi

<latexit sha1_base64="cFAUPzU3hM63PG2gaWU7MR4mwR4=">AAAcjHic3Vhtc+O2EdalaXtW2+Qu/Rh/QGt7aie0LMqS7xxXN5FfrvHEF7vyOUkrcjwQCVEY860AZFvm8Y/0n+XfdEFSEkFRV9/52knLGY8hYF+eXewuFuiHLuWiXv/p0Ue/+PiXv/r146Xqb377u08+ffL0s+95MGIWubACN2A/9jEnLvXJhaDCJT+GjGCv75If+lcHcv2Ha8I4DfzXYhwS08OOTwfUwgKmLp8+/idCyOAWdkk/uI3qtWYjjhBag4E632rBfBUln9EnDvUjQa/uQmqJESNxtjL7DD+wCULrneaFT68DC59hdkdB3AbqgcSGhgS5FeiG2mLYblieiaYiQH+nWpAUYiYicRPEKLeyauytdoRgtD8SdLYQ702HVUUIwNm/JxwNMeoMRVuvtSwPBQM0Z4eJ8oj3FwNeiPhtOLv3xtknbnDTri/EqaFbPqQDkTo5j7n7oTDbDN/0/K90EZplO14jmIsNINzcRKVbsIcWCd0EexkWgjgOxQKbZZ6p+QETw1T+l+t1Ta/pGyUo19bQWaf7+ggdHp2/7nbQWff4VQedn55c/P349LujxVtx2Nm+x15sz2JmZ2HEPDDE3xrhZbj374O8WXuWi/cU+7zN7x86yPjHCNswdt3Vs29XDcdZTcYvv13vbCQ/DaPAs5/nAbr9Cd2c9O4s/9+WTof38kSjzA9znA9P/HKoScAzW5gL9i6XRl+u61p9A0l1PdwPrgn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FQxHflOJjs9QH+n/JCQ+yVmLP4uflMfQTZUGUEKDDY5jrdDuy7zhGB6evLuDf4TE6f318clSdxQ9Y4I1lVk1jJzm90rBKzuXkyJbH6pQiCUcZVrGGsEsdv23B8UQYQJa8mQNdkOHmNrvhebCc0CQnGZEHsqpVFsHUWTx0KbimMJHA4O1GqiepHXC+gb98SL10cuTC7SqDUCYzEYEG1HXb0+PtD3q9EDWZJXnj0pkk5JLR1Alpbhn9AeQ/JTxWjVxgoDaHXkGe6lH1z4POUHrUp97IQ0My6fO1Cbo5UDzEdzR4AKi2H/ikgGztHaCtLcYme8H/43gA87bfy7zt/xXz9J9ZsN+niE2ZSkpZxn8T3KsGumQg8mxDKKrvxoiZVUjN1DO5Y+lFO93cZmtiZIhdOALL+KQLNYsyuCdoybOnvMlOCwHx7/A7Mtf1CbdEihwCrZk1pFhln6Etp06aXSHKlCqGFk/PiTRgp0LgMkclrbumKs8/tv0b59rE50Q24ZgPiV0mANzmQVpZpExSyqaVOED/ShezCPjz5gtNumS6FOaW3lxeqqthjvHy8k2BNwzV1SK7r+otrBUVq8tzmgvLJapzFL5qs2K0rxpdtNpXrS6a7atml9jtqXarhnuq4XOWe6rlc6Z7qulltjN7JiCPnPH8buTpZwILpjBecHO6VJV3nPzNmgeQUhzqKyOu7B57TVPGpmEFAbOpD1O99DFpJXsHXGmY62Hyqpw+eUz7YBPBvLyZrq80cuupYlhc2Z48T7/ZTEg33yCYbU5m91A1LsEGjWBy9/+w0JL3mKyKmQg6c0kQxe8LuwS3BXWIweUKvz/uD+LREmjyXKHQzvkP8Ol/3KXyLafwehnJp7O4evlkRS8+fc0Pvm/U9J1a86+Nla/3s2exx5XPK3+srFf0yrPK15VvKmeVi4q19GjpT0v1JX35k+Xm8t5yOyX96FHG8/uK8i2//BcYx/gC</latexit>

R
A B
A B A A ⌧PK ⌧FK(A) B
Attributi Attributi Attributi B ⌧FK(B) Attributi
RAttributi
R A
R
Attributi Attributi B
R ⌧FK(B) Attributi
RAttributi

EsamiEsterni <<-|---|-> EsamiInterni (attributo: Colloquio)

4. Modello Relazionale Corso di Basi di Dati


Schemi a oggetti -> Schemi relazionali 21

Associazioni N:1 (ricorsive)

<latexit sha1_base64="xj2YHM6ITTZ6ReyvACfA56J1hIs=">AAAaQ3ic3VhbbyO3FVbS1knV2276ZPSFrW3ATsayRhevHVeLKGulEbLZdex1klYjGNQMNSI8t5KUbe14/lf/QH9EXvraAn0r+lqgh5yRNByNt3tD0XQAwxR5Lt+58PCQo8ijXNTr373z7g9++KO1997/cfUnP/3Zz39x7/4HX/NwymxybodeyL4dYU48GpBzQYVHvo0Ywf7II9+MLh/J9W+uCOM0DJ6JWUSGPnYDOqY2FjB1cX/tK4SQxW3skVF4E9drrUYSI7QFA32+3Yb5KlKfNSIuDWJBL59H1BZTRpJsZflZQegQhLa7zR00ABENAwlyI9A1dcSk07D9IdoyW7UFHyjtVgvsEWYiFtdhgnIrm9bRZlcIRkdTQZcLydFiWNWESAgmYECMuhPRQfVavW37KByjbhMZMz6hY9EBcyWiuGvm5CzYG/+JfdesmSl/IzlCJUAchq8HwcdmFA2VT2oQQDHZQbu7H23Xjd167SAdN7Rxvba/g9DtruIgmAv4JTENblK1Zq1p+waagwByBeI0QSXO2JIf+qz/pAeeRuis/6R/9uy0W80RoOOenELo0dMn6Pi8h86ePj7/Q//pk3614BS0fVweWAUoddX+3E0LhM0PLQdS+jHkKj7BnFOEVB6MiBded8yU/rhrDtEbpsVLZAVY8GmpBa3ag6UNC0zNIcqDOr0b0wooE1l/nGJH/vK8zc++2O7ubFquu2lZK6SNjFRRnnyhyApcLzZN5RlzxDC1r3ZNVNJAPqWJg0fhFYFsb7Tn6Y6yWB69QEqWeiorTaO+syrLQDeLJGzNd8KcAXZHow38u7dKVZb7oDCfm+isB1l33F3kXK8s5c6IHQYOPgu96XOoX+TOFExTqrWScMt4vmnlsazVQBdD/DLVSVpVWl9KzH1xvVoJoCo2JWJy1ScrP63sR6PWlvFNi04ZZ5YKR/PY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wXAGoUymEoHG1PM6i+Pt12a9kDWZJXnj0hmVcmq0cEK6t6zRGPY/JTzRjbzDQGMFvYY81aPrXwWdofRpQP2pjyZk3pcbc3QroHiEoVl5A1CdAFqdArKtV4C2dTc22a3+H+cDmNd8LfOa3xfzzP+xZH+ZIrZgKillGf91+FI10CNjkWebQFF9NUbM7MLWTD2TO5YedtLgttpzIyPswRFYxiddaNiUwT3BUK9VcDVasMFV4Tl+Rea6OeeWSJFLoDWzJxTr7Eu05dSq2RWiTKlmaPH0nEsDdioELnOUat0NXTnkmRAE7h24nCen0yEBJ7IJx3xCnDIB4DYftpVNyiSlbEaJA8yPTbHMgN/uPjSkSxZLUW7p9uJCX41yjBcXtwXeKNJXi+yBrrewVlSsL69oLiyXqM5RBLrNmtGBbnTR6kC3umh2oJtdYrev260b7uuGr1ju65avmO7rppfZzpylgDxyxvPRyNMvBRZMYbzg5nSpKu84+Zs1D2FLcaivjHiyexy0hjI3LTsMmUMDmBqk7z4b2bvdRmO4He3IF5L0SWTRBw8RzMub6fZGI7eeKobFjWYNbiLyjUQ+hADp7i2C2dZ89ghVkxJs0Aiqu//bhaZe27IqNkTQmUuCOHld2CW4bahDDC5X+PVxvxWPlkCT5wpVb09vE9tbdql8yym8NMbyYTSpXtzbMItPX6uDrxs1c7/W+qqx8cmn2bPY+5VfVX5T2a6YlQeVTyqfV04q5xV77U9rf1n769rf1v+8/vf1f6z/MyV9952M55cV7Vv/178BF7FIhQ==</latexit>

A1 R A2
A
A1 ⌧FK(A)
A1 Attributi
A A2 ⌧PK ⌧FK(A)
Attributi
R
A2 A A1
Attributi
A1 ⌧FK(A)

4. Modello Relazionale Corso di Basi di Dati


Schemi a oggetti -> Schemi relazionali 22

Associazioni 1:1 (univoche con inversa univoca)


<latexit sha1_base64="or0KCkemDUzbSTzLDMrm79XJQFI=">AAAXdnic3Vh9b9vGGVebrOu0tUs6YAFWYLhNFmYPtCzKkhM3Y1AlcltjaZM5cdtNFIzj8UQdzLfdnWwrDP/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hEZ286x+3yXfyABe5EZtUsduLTKwmr+GSOD215vs4o4nCUYRVpCFoK22uacDwRBpAlb+pAB2Q4mc2uufLCEdPEJxmRJ7OqVRbBxFkc7tDgmtxEDIM3a4meuHbA+Qb+8iD1ksmxIxhOIRTJjEWgIXWc5ux4+6tezUVNaknWuGQmDrl4NHNCklvGYAj5TwmPVCMXGKjNoVeQJ3pU/fOgU5Qu9ag7dtGITFt3bYpuDhQP8C31HwGq6fkeySFbewC0tcXYZDf4fxwPYN72B5m3/b9inv5fFuz3KWIzpoJSlvJf+/eqgQ4ZiizbCIrqwxgxM3OpmXgmcyw9byabW29MjQywA0dgEZ90oWZSBvcELX4QlBfDWSEg3i1+IHNVn3JLpMgm0JqZI4pV9ju0xdRxsytEkVLF0PzpOZUG7FQIXOSouHXXVOUQZ0IQuHfgYp6MTot4nMgmHPMRsYoEgNtcSCuTFElK2LQCB+hf6eIuAr7efK5Jl8yWgszS+4sLdTXIMF5cvM/xBoG6mmf3VL25tbxidXlOc265QHWGwlNtVoz2VKPzVnuq1XmzPdXsArtd1W7VcFc1fM5yV7V8znRXNb3IdmbdCcgiZzy7G1n6O4E5UxjPuTlZKss7TvZmzX1IKQ71lRFHdo+9el/GpmH6PrOoB1O95HFoJX3aW6n114MN+Q6XPH3M+uA+gnl5M11fqWXWE8WwuLJdgZuIGG2g95sx6eZ7BLP16ew+KkcF2KARjO/+vyy0+F0mrWJ9BJ25JAijD4VdgNuEOsTgcoU/HPcv4tECaPJcodDOeY/w6X/cpfItJ/f6H8ontKh88WRFzz99zQ/e1ir6TqX+j9rKNwfps9hSabn0RWm9pJd2S9+UXpROS+clc2l5qbX096WXy+vLr5fPl98lpB9/lPL8paR8y//8N7Cjuvo=</latexit>

A R B
A B
A ⌧PK ⌧FK(A)
R Attributi Attributi
A B B ⌧CK ⌧FK(B)
Attributi Attributi
A R
B
Attributi
R ⌧FK(B) Attributi

Es.: Domande Trasferimento <---|-> Pratiche Trasferimento

4. Modello Relazionale Corso di Basi di Dati


Schemi a oggetti -> Schemi relazionali 23

Associazioni N:M (multivalore con inversa multivalore)


<latexit sha1_base64="FPWoWgcyq5Adepq0ekSEMQ3rLJY=">AAAeM3ic3Vhbc9vGFWbSW4re7PSxo5ltJc3IDUQBJCVbcekJdUnCiW2plJQbwdEsgSW5I9y6u5REw/g//QP9G31tM33r9LX/oWcBkMSCoCxbTiYNZzyG9ty+c9mzZ7cfupQLw/jmnXd/9OOf/PRn7/1c+8Uvf/Xr39y7//7nPBgzm5zZgRuwL/uYE5f65ExQ4ZIvQ0aw13fJF/2LfUn/4pIwTgP/VExC0vPw0KcDamMBS+f3tRZCFrexS/rBdWRUG7U4QmgdFVYb01V1ebuMeSeONJT8rD4ZUj8S9OJFSG0xZiTOKAjNPtaTHzrutJ+1UKf9SWtGsfzAIQhttMwHqAu6azoS5FqgK+qIUbNme725FsAxF8xEQ8xEJK6CGOUoa9bjtZYQjPbHgs4J8eNFZFP7e8vs64jR4Ug0zeq27aFggFpmD+Ux7S2HtBxTKRSH4auu96EvRC+JSJVgLh4AZXMTScVd3A8uSdOo1rZlXKIOWEiQP0YlIUcHhyennVZuQYb/CLWfo9bT0yPUKjJMQ3FQnov6PBY780jcMTm3yg0AKk9Po/owl6AU1EExP53XyA+y/jLGDny77trxZ2vWcLiWfH/82UbrQfKnZRVk9m6Q2Utl8k4uOvfqyps5tvcWSu/miCclyJykABODuRr8YMPUjQeLlahf8xEdiOamUU3rci+pywO1MEtUX5G56s0lulGmfKq7lepuJbqXNRpoNaeHna/TVoPQyeH+0fODkp7TWBr5PnGDK2XPfzddaDmiYhdq3L0UbkLSeVVsjDmSWZKSdv2me+9GVIXW2Mi3xjRuZT0wFdsEFxgWggyHFAvcS7yr+gETo2n1GbpZhYq6oZ4KvbKkR9Vv2TQbdy2lGyupDNheKbTy5ln/vjVPyyoa6rziGJ011lK3yxorROhbPdNnXQ8M3aahomUdtX5DR5W6b9NRlzTUnGqL+I4y0KH4/N6qUTWSH1r8MLOP1Ur2O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jMIZToTFWhAXbc5O95+bxqFqsk8yTuXriQll3zNgpDuLas/gP1PCY9VJ5c4qC+gV5CndlT7i6AzlB71qTf20IhMxzF9im4BFA/xCxrcAVTTD3xSQLb+GtDWl2OTM+YPuB7AvfobuVf/f3HP/J4V+22a2EyopJVl8lfBrXqgSwYiLzaCpvp6gpjZha2ZRiZ3LD1ppsltbE+dDLELR2CZnAyhblMG9wQ9eXOWl5VZIyD+C/yawoY5lZZI0ZDAaGaPKFbF52jLuZNhV4gyo4qjxdNzqg3EqRC4LFDJ6K6rxvNvFq8IrkN8TuQQjvmIOGUKIGwebCublGlKxfSSAJgfmmJeAX/afKLLkMxIYY708vxcpYY5wfPzlwXZMFSpRXFftVugFQ2r5AXLBXKJ6RyHr/qsOO2rThe99lWvi277qtslfnuq36rjnur4guee6vmC657qepnvzJkryCNnPJ+NPP9cYcEVxgthTkmavOPkb9Y8gC3Fob8y4srpsdvoydq07CBgDvVhqZs+OK5mzzWrtd5GmLzVpQ8gszm4h2Bd3kw3Vms5emoYiKv16aPfy82EdfMlgtXZU+BjpMUl2GAQTO7+bxda8i6TdbEegslcMkTxm8IuwW1DH2JwucJvjvutRLQEmjxXKIxz/h1i+q2HVL7lWPIW8BQuavgYZmIaySe0WDu/t2oWn74WPz6vVc2dauPPtdWP9rJnsfcqv6v8obJRMSsPKx9VPq0cV84qtvZX7e/aP7R/rvxt5V8r/175T8r67juZzG8rym/lv/8DWLk2xw==</latexit>

R A R B
A B A B
A ⌧PK ⌧FK(A)
Attributi Attributi Attributi Attributi
B ⌧PK ⌧FK(B)

R
A B
A B A A ⌧PK ⌧FK(A) B
Attributi Attributi Attributi B ⌧PK ⌧FK(B) Attributi
RAttributi
R
Attributi

<latexit sha1_base64="QecVecuyev2HIe1A0Xj/MV7ymew=">AAAYj3ic3Vh5c+O2FVfSdZuq1276j2f6D1rbM3ZKyaIOH9lqZxXb23iyWbv2OkkrajwQCFEY8yoA2ZZpfpR+sHybPpCURFD0JntMpwlnPIbwrt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Wvi277utslfnu637rjnu74kuee7vmS657uepnv3F4oyCPnIp+NPP9CYcEVLgphTklVdcfJ36xFAEtKQH/l1FWnx357oGrTIkHAbebDVH9IodV317JXoLXmYDPcUo8t6bvI/Bw8QDCvbqaba80cPTUMxLVWHW4i6k1PvdcBa+0ewWx7NvsUVeMSbHAQTO7+HxZa8mKTdbEBgpO5Yojid4VdgptAH+JwucLvjvuDRLQEmtpX2J16zPyQ2D5wSNVbjqVuAS/hooZP4UzMIvW4FlcvH6+Zxaev5cE3zbq5U2//o7n2/IvsWeyTyp8qf6lsVszKbuV55cvKaeWiQlYerXy20lpprz5Z3V19tvo8Zf34o0zmjxXtWz3+L6dHzCQ=</latexit>

A1 A1 R A2
A A
A1 ⌧PK ⌧FK(A)
Attributi Attributi
R A2 ⌧PK ⌧FK(A)
A2

totalità non rappresentabile


4. Modello Relazionale Corso di Basi di Dati
Trasformazione di Schemi a Oggetti in Relazionali 24

Editori Libri Prestiti

Autori Utenti

Editori Libri Prestiti

AutoriLibri

Autori Utenti

4. Modello Relazionale Corso di Basi di Dati


Trasformazione di Schemi a Oggetti in Relazionali 24

Editori Libri Prestiti

Autori Utenti

Editori Libri Prestiti

AutoriLibri

Autori Utenti

4. Modello Relazionale Corso di Basi di Dati


Sottoclassi 25

Data la classe A (attr. XA, chiave KA) con sottoclassi B (attr. XB) e C (attr. XC)

Tre possibili soluzioni

Relazione unica
- R(XA, XB, XC, Discr)
- Discr indica la classe alla quale appartiene l’elemento
- XB e XC possono avere valore nullo


Partizionamento verticale
- RA(XA): tutti gli elementi di A,
- RB(XB,KA): attributi propri per gli elementi di B
- RC(XC,KA): attributi propri per gli elementi di C

4. Modello Relazionale Corso di Basi di Dati


Sottoclassi 26

Partizionamento orizzontale
- RA(XA): solo gli elementi di A - (B ∪ C)
- RB(XA,XB): elementi di B (tutti gli attributi)
- RC(XA,XC): elementi di C (tutti gli attributi)

4. Modello Relazionale Corso di Basi di Dati


Esempio 27

Si consideri la gerarchia seguente:

Corsi
Codice <<PK>>
Nome

CorsiInterni CorsiEsterni
Crediti CorsoLaurea
Anno

4. Modello Relazionale Corso di Basi di Dati


Tabella Unica 28

L’attributo InterniEsterni svolge il ruolo di discriminatore

Corsi
Codice <<PK>>
Nome
Crediti
CorsoLaurea
Anno
InterniEsterni

4. Modello Relazionale Corso di Basi di Dati


Partizionamento 29

Verticale Corsi
Codice <<PK>>
Nome

Codice Codice

CorsiInterni CorsiEsterni
Codice <<PK>> <<FK(Corsi)>> Codice <<PK>> <<FK(Corsi)>>
Crediti CorsoLaurea
Anno

Orizzontale

CorsiInterni CorsiEsterni
Codice <<PK>> Codice <<PK>>
Nome Nome
Crediti CorsoLaurea
Anno

4. Modello Relazionale Corso di Basi di Dati


Come scegliere? 30

Tabella unica
- conveniente se le sottoclassi differiscono per pochi attributi

Partizionamento orizzontale
- complica la visita di tutti gli elementi della superclasse
- divide la superclasse in più relazioni: sconsigliato se vi è una associazione
entrante nella superclasse
- problematico senza vincolo di disgiunzione

Partizionamento verticale
- complica il recupero di tutte le informazioni relative ad un’entità (distribuite in
varie relazioni)

4. Modello Relazionale Corso di Basi di Dati


Definizioni delle chiavi primarie 31

Relazioni corrispondenti a classi radice (prive di superclasse)

attributo univoco, totale, costante

attributo artificiale (chiave sintetica)

Relazioni che corrispondono a sottoclassi

chiave della superclasse

Relazioni per associazioni N:M

concatenazione delle chiavi esterne

4. Modello Relazionale Corso di Basi di Dati


Attributi Multivalore e Strutturati 32

CorsiInterni
Codice: int <<PK>>
Nome: string
Crediti: int
Docenti: seq [Nome:string, Cognome: string]

4. Modello Relazionale Corso di Basi di Dati


Attributi Multivalore e Strutturati 32

CorsiInterni
Codice: int <<PK>>
Nome: string
Crediti: int
Docenti: seq [Nome:string, Cognome: string]

CorsiInterni
Codice: int <<PK>>
Nome: string
Crediti: int

Codice

DocentiCorsiInterni
Codice: int <<PK>> <<FK(CorsiInterni)>>
Docente: [Nome:string, Cognome: string] <<PK>>

4. Modello Relazionale Corso di Basi di Dati


Attributi Multivalore e Composti (cont.) 33

CorsiInterni
Codice: int <<PK>>
CorsiInterni Nome: string
Codice: int <<PK>> Crediti: int
Nome: string
Crediti: int CodCorso

Codice DocentiCorsiInterni
CodCorso: int <<PK>> <<FK(CorsiInterni)>>
DocentiCorsiInterni CodDoc: int <<PK>> <<FK(Docenti)>>
Codice: int <<PK>> <<FK(CorsiInterni)>>
Nome: string <<PK>> CodDoc
Cognome: string <<PK>>

Docenti
Codice: int <<PK>>
Nome: string
Cognome: string

4. Modello Relazionale Corso di Basi di Dati


Un esempio:
BD per una Biblioteca
Modello concettuale 35

Specializza
<latexit sha1_base64="qEsJX/GXtntJQ+sQ3DSQ2hvzhVM=">AAAnenic3Vpbdxu3EWbSm8ve7MRvfUEjK5ZriuJS1M0qfSJLSsxTW1Z1SdKKPDK4C5I42psBUBK12h/Tf9K/0f/Shw6wFy6WS0qydXra8sGhgJnBN98MBgMwXd+mXNRq//zs85/89Gc//8WDX5Z/9evf/PZ3Dx998T33hswkx6Zne+zHLubEpi45FlTY5EefEex0bfJD92xbzv9wThinnnskRj7pOLjv0h41sYCh00df/h21uYlt0vUug1p1tR4GSH7aXdKnbiDo2ZVPTTFkJCyj+NN2PYsgtHAsiCvoM3QCuvUKEuRSoAtqiUFzpbpiOh2UagQokk0HYiM+ZiIQF16YnYhXxt2hjVkY2MjOTiP0pL35ZPtb9PULLhh1+/C3bT/585N2v/8EtdsTonueQ8bCBQIt16KMXl15WSk0IXZEbNLzXApSbelqtxdw8iFEkUrWAeJaKfx0PNyc4G9rKDw2nb8Kwl3vnDTrpoO8XsxgltRI/x45Tf1Hn0zqHr6C/MI2Fe33eKbklut6e5ibVEg56oqPofKIMIe6wGUBmQ2NTPmHpDMiT8vR2MhUQtFdGY0Mjoma5lmhSzuEm5CWwGJhiqxGXjHaH4jIRelV7EIn4xVCGUsys1/Rrk29PsNQBQbk/rxtHb7aQ7felkdUQHGamRm7Fsiw2Xkms2d/2AWPTJVxZHYOaUynVO8zwqF2Fv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u+Vx/oAHzkjuqjR31OkVpZW6yqlrn7xypRJpHxJWELTSfbcp+1fCALLUjQm0wYadCXbdcWBayUS32y0hmL6qLIIRWdy3KVCTG1AweLMeraNqB5xvwBfcDXg0CE0jwzGEIpvKBOpR226mx9sfjFoua2JPss5FIyrl1LeUhGhvjVsy3ckpDlYm0GvIo3X09SdBxyhlA+cMHTQg6uFWdS4xuglQ3Jct9SeAasL9kOSQzd8B2vx0bPIR6f84H8C95Y9yb/l/xT3jvyzZb1PEUqWCUhbrX3i3qoHyPSOrNoCiejdFzMzc1oyYyRxLL5tRcBsriZM+tuEILNKTFFZMyuCeUFH/X4C8daeFgLhX+I7KNSPRlkjHr5a6+hhtsbRqduFuV7Co5mj+9EysyV/4hcBFRKnWvaIvDnkmBIF7By7WyaxpEZcT2YRjPiBWkQGgzYFtZZIiS5FapYAA44Uhxhnwp8WXFUlJOuVnpq5PT/VZP6N4enqd0/V9fTav7urr5ubyC+vTEyvnpguWzki4us+a067udN5rV/c677aru13gt6P7rTvu6I5PeO7onk+47uiuF/nOrLGBLHLGs9HIyo8N5lxhPEdzNFWWd5zszVo9jHOor4zYsns8aXRkbrZNz2MWdWEoekJuzsWv8HP1zoKvXi2il5K0D+4gGJc304W5emY+Whgm55aTJ5TrRSW6eI1gtJGMbqJyWIANGkF1979faOoBJ65iHQSduRQIwo+FXYDbhDrE4HKFPx73vTBaAG38O8h9YrtvSk8fzhn5F67JL9/Xq8ZqtfGX+tw3r+LXrwel35e+Ki2UjNJa6ZvS69J+6bhkPn7wuPp47fH61/96+tXTZ0+fR6KffxbrfFnSPk8b/waqPFAs</latexit>

Termine più Termini più


generale specifici Descrizioni
Bibliografiche
Termini Indicizza
ISBN :string ⌧K
Termine :string Titolo :string
Editore :string
Standard Sinonimi AnnoPubblicazione :int
Descrive
ÈSinonimoDi

Autori
Libri
CF :string ⌧K HaScritto
Codice :string ⌧K
Nome :string
Nazionalità :string
AnnoNascita :int
HaPreso Consultabili
Prestabili
PerGiorni :int
Prestiti
DataPrestito :date
Utenti DataRestituzione :date
Riguarda
CF :string ⌧K
Nome :string
Indirizzo :string
Telefoni :seq string InConsultazione Regolari

Consulta Riguarda
Studenti Docenti
Matricola :int ⌧K TelefonoUfficio :string

2. Modellazione e progettazione Corso di Basi di Dati


Schema Logico (Passo 1) 36

Termine più generale


<latexit sha1_base64="ZkPtW140khPUstBYd5ti+eqc2vU=">AAAhAHic3VlbUyPHFZadm6MEZ9d5zEsnFFWQHQmNkFgw1pZZILGq2AVzsZ0gFWnNtKQu5uaeHkAM85K/kdekKm+pvOaf+N/kdM+1RyPYXW+lkkwVaHS6zznfufTp062RZ1Gft1rfffDhD374ox//5KOf1n/286WPf/Hk6Sdf+W7ADHJuuJbLvhlhn1jUIeeccot84zGC7ZFFvh5d7Ynxr68J86nrnPGZR4Y2njh0TA3MgXT5dOljBM/AN7BFRu5t2GpuRiFaUSjdDUGamwMfwFpH8hmMyIQ6IadXdx41eMBIhOrJGIw6rkkQWj3nxOF07QKk6Bri5JajG2ryaW/DsIeZLITCeGK0k1HmRO0G3GV0DVXK0mAiHrnXRHxB7hjF8kAFWonpnRI9Vx0Lfkj1GWE2dRaYoaWa281urCMWCDpWVEwZPdedSK5SvoJW8gedHZy86r/uo72j1zB2tvvy4PDwAJ0eHZ/sIvF5dnaE4OPw/I/9o9cHaPf09Givvyu+9FPe3CyT4ZsL5nvD3Lam3mmtoUbjGVptaUhfy3FImt7cfK4BVTjkQhqFeq1ma0uYf+tP6Zj3Gq3mtghqYhNBHh38KUAT4hAGeRQhRWQssbW2UyA/DLAhEWYQG9UYGynIEbHcmwxkGeMpx46JmRlVYUI7hUwuheF3ffDue4zFoqRb3Se+wegdrNnqnG/K1GN0MuW9TvN5knqJs4Z5hqGCIBA+yEYQeklHFnUnDEN1mJKHFsAxIz7UmodW3yz2cFt+i2F1Fy65VF5UHf5E675rBLasH+hRvZ3cG3q7uaVozvUe0tGClS4zzv7U4byQc2syL1Ap6/WuTKG+Y1KD3t1hyOxS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UvwjVW85uXdbbg9XPXnVE9+TZH3wEAFdnExXl9uF8VgxDC5vpLco9w05tXGPgNpJqTuoHlVgg0ZQnv3fLzR5aZNUsSGCzlxMCKN3hV2B24A6xOBwhd8d93vxaAW0/ObzfWJ7zy4VdzkDcQo4hIMaPoaemIbiji+qXz5Z1stXX/MvX7Wb+maz82V7+fOXybXYR7Vf1X5TW63ptee1z2tf1I5r5zVjKVj6y9Jfl/6G/oz+jv6B/hlP/fCDhOeXNeVB//o3zI579w==</latexit>

Indicizza Descrizioni Descrive


Termini
Bibliografiche

Standard

AppareIn
Autori Libri
InPrestitoDa

Prestiti Prestabili Consultabili

Riguarda
Utenti InConsultazione Regolari

ConsultatoDa Riguarda

Studenti Docenti

4. Modello Relazionale Corso di Basi di Dati


Schema Logico (Passo 2) 37

Termine più generale


<latexit sha1_base64="Oowlpe9k8un8xnOkHGJJvUuneKc=">AAAi9Hic3VlZbyO5EdZuro1yeGbzmBfGhgA705LVsuQjjgbrtZ2MAM/Y62N2E0twqG5KItxX2JRtud2/Ia8JkLcgr/k/+29SZJ9stTzj2UGQRMBi20VW1Vcni5yhZ1GfN5vffvLp977/gx/+6LMfV3/y05/9fOnZ88/f+u6UGeTCcC2XfTPEPrGoQy445Rb5xmME20OLfD283hfrX98Q5lPXOeczjwxsPHboiBqYA+nq+dKnSPz6voEtMnTvgmZjMwxQTSV1tiPa/L5mY6uKIhFDMqZOwOn1vUcNPmUkjFcQsKaffcc1CUKrF5w4nK5dgixdQ5zccXRLTT7pbhi2Bvts6lB7aqMJoeMJ7+qGPUCZlCBiD3dTypyCvSl3GV1DCzXgoXtDxB/IHaFI3kBgjejtAj1THQl+TPU5YQL+YuNi3a1GJ9ISicxp3yjQM+2x7DL1EKBa9EMnh6fo9eH5+eHpIUJnx0fHCO2/6u297aHDMyC+OZQ74Ot1700PXZztwb6vLmDtOCftlBouZM4NQW+m7o1bU0w1Gb69ZL43yOxt6O3mGqrXX6DVpob0tWy3pOmNzS0NqMJJl9JM1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3hCOqfEj9UjVxgoDaHXkEe6VH1z4OOUc6/X2sJujlQvifG2+8AquvAcFxAVnsCtNpibHC7a/0f5wOYt/FB5m38r5in/5cl+/s0sZSppJXF/Lfue/VAi4x4nm0CTfVpjJgZhdKMPJM7ll52o+C2O4mRHrbgCCzjEy7UDMrgnqDJf0yDe1PKBleFe/xE5qaecAuk2bOSyp6hLd8th13Oy5QqhhZPz0QasFPOcZmj5OiuqcohzzgncO/A5Tw5nSZxfCKGcOxPiFkmANxmQ1kZpExSxKaVOED/jc6zDPht/aUmXJIuebmlh6srddXLMV5dPRR4PU9dLbI7qt7CWlGxujynubBcojq3w1FtVox2VKOLVjuq1UWzHdXsErtt1W7VcFs1fM5yW7V8znRbNb3MdmZmAvLImZ+PRn5/JrBgCvMLbo6WquKOk79Zy6dLH/orI5aYHi/bA5GbfcN1mUkdIEUPGt2V+Jl0pTVY9dbEm0/0SpLOwQMEdHEzXV1p5dYjxbC4spE8oDzU5db6AwJqO6HuompYgg0GQXn3/7jQ5EtN3MUGCCZzsSEIPxR2CW4D+hCDyxX+cNwfxaMl0LKX6o+J7SO7VLzl9MUt4AguavgEZmIaNButTli9eraiF5++5j/ethr6ZqP9VWvliy/jZ7HPKr+sLFdWK3plq/JF5VXlpHJRMZbo0l+W/rr0t+Wb5b8v/2P5n9HWTz+JeX5RUX7L//o3C84SOQ==</latexit>

Bibliografia
Termine Descrizioni Descrive
Termini Indicizza
Bibliografiche

Standard Bibliografia

Autore
Autori AppareIn Libri
InPrestitoDa

Prestiti Prestabili Consultabili

Riguarda Riguarda
Utenti InConsultazione Regolari

ConsultatoDa

Studenti Docenti

4. Modello Relazionale Corso di Basi di Dati


Schema Logico (Passo 3) 38

PiùGenerale
<latexit sha1_base64="75z6AsPyRxsOdDrJkTRseEZC7Xo=">AAAiB3ic3VndbuO4FfZu/7Zum85s0aveMA0CJF1ZkRw7P516sNmZdNdAdpMmk91tYyOlJdomor+SdBJH0QP0NXrbAr0retvH2LfpISXLoiwnM7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9J90q+Mgf0fCsK3Uiu5Z/nz2+4Xh5VJpAagl11oOzg9+EP3+IsuenH8+Tn897KLzl51jw7r8/wBBf5Urqo8d9QGlqaVugSpG1IEG04+QqWjTKvEQNijo6AjN2XCgLK0zQLogQ+vMNlN34duNUbtZORACKajyiKYBotHHoXQlBoUDd5ppjiqdsD+BvEKYOmljbAdM5xRqPKpXKAh9bxOvr2t2lYpazIlRXFpi0o59ZYHIV1bvcEQ1j8lPNFFLhFoLLDXmKc4Ov4i6Yxl1WfajN0CKR7Jm/m3INUJ4F5fYrb+BtTWl3ODm3fz/zgfQN72W8nb/l+RZ/+XJfvrFLHcqKKUZfY34WvVQI8MRdFsDEX1zQwxc0pLM41MYVt63kknt9WeiYywB1tglZ0MoeFQBvcEQ/0OJT8q5IWABHf4DY0te2YtmaIRgaOZM6ZYN5+zrR6tDrtCVIFqQsu758wbmFMhcFWg1NHd0MEhz4QgcO/A1TYFTJcEnMhDOOZj4lY5gLD5sKwcUuUpNTMqAmD/2hbzDPhN47khQ5J3RYWu+8tLvTcqGF5e3pdso0jvLZsHOm6prwysdy8gl7oroAsjAl2zJjrQRZdVB7rqsuxAl12h29d168J9XfiCcl9XviDd16VXaWfu3EGROePF2SiOnzssSWG8FOa0qy7vOMWbNQ9hSXGor4x48vR40erL3Ow5YchcGkBT+gtfZy37gL3W7G9Em/JzRfrlJD8H9xG0y5vpxlqz0J8CQ+fa9ux75X1DDW3cI2htzVqfoXpSwQ0Oguru/26pqe84WRXrIziZywFx8ra0K3g7UIcYXK7w2/N+JxGtoCb3FZr+0PIOub3jkMpvOT15CziCixo+gTMxjS2z2U7ql0/W7PKnr8WXL5umvWO2ftdc+/iT7LPYB7Vf1H5Z26jZtd3ax7XPaie185qzcr/yl5W/rvxt9c+rf1/9x+o/06Hvv5fZ/KymPav/+jfF6aAc</latexit>

Bibliografia
Termine Descrizioni
Termini Indicizza
Bibliografiche

Standard Bibliografia
DescrittoDa

Autore
Autori AppareIn Libri

Libro Libro

Prestabili Consultabili

Riguarda Riguarda

PresoDa
Utenti PrestitiRegolari

Utente Utente

ConsultatoDa
Studenti Docenti PrestitiInConsultazione

4. Modello Relazionale Corso di Basi di Dati


Schema delle relazioni (attributi, tipi, vincoli) 39

Termini(Termine: string, PiùGenerale*: string, Standard*: string)


PK(Termine)
PiùGenerale FK(Termini), Standard FK(Termini)

DescrizioneBib(ISBN: string, Titolo: string, Editore: string, Anno: int)


PK(ISBN)

Indicizza (Termine*: string, Bibliografia*: string)


PK(Termine, Bibliografia)
Termine FK(Termini), Bibliografia FK(DescrizioniBib)

Autori (CF: string, Nome: string, Nazionalita: string, DataNascita: date)


PK(CF)

AppareIn(Autore*: int, Bibliografia*: string)


PK(Autore,Bibliografia)
Autore FK(Autori), Bibliografia FK(DescrizioniBib)

4. Modello Relazionale Corso di Basi di Dati


Schema delle relazioni (Cont.) 40

Libri(Codice: string, DescrittoDa*: string)


PK(Codice)
DescrittoDa FK(DescrizioniBib)

Consultabili(Libro*: string, PerGiorni: int)


PK(Libro)
Libro FK(Libri)

Prestabili(Libro*: string)
PK(Libro)
Libro FK(Libri)

Utenti (CF: int, Nome: string, Indirizzo: string)


PK(CF)

Telefoni(Numero: string, Utente*: int)


PK(Numero,Utente)
Utente FK(Utenti)

4. Modello Relazionale Corso di Basi di Dati


Schema delle relazioni (Cont.) 41

Studenti (Utente*: int, Matricola: string)


PK(Utente)
Utente FK(Utenti)
CK(Matricola)

Docenti (Utente*: int, TelefonoUfficio: string)


PK(Utente)
Utente FK(Utenti)

PrestitiRegolari(DataPrestito: date, DataRestituzione: date, PresoDa*: int, Riguarda*: string)


PK(Riguarda)
PresoDa FK(Utenti), Riguarda FK(Prestabili)

PrestitiInConsultazione(DataPrestito: date, DataRestituzione: date, ConsultatoDa*: string, Riguarda*:


string)
PK(Riguarda)
ConsultatoDa FK(Docenti), Riguarda FK(Consultabili)

4. Modello Relazionale Corso di Basi di Dati


Schema relazionale con attributi, tipi, vincoli 42
Più generale
<latexit sha1_base64="u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q5trNKBVHYoL8A5RqBdBIFTS7v4Rq9+frJoYd/8fxAObVb2Ve/X/FPOcVC/abJLHJppJUpvafhzfKgR4ZcH3bCJLqchsxcwtHM0NGK0sftzLnNpq5kRH2oASW7RMQVl3K4J5QlT/3FG+dJomABFd4yc22k+8WmqIhgdbMHVFsbp9qW04tm124hZcINQwtVs+cmxiic47LgJKte9UUDnHGOYF7By7fo8nskyAmognH8Yj0yxgAbD4cK5eUccq2VUsAcD5y+DQC/rbxcVVAMlmKtKWXJyfmaqRtPDl5WdgbReZqcXtgyi2sFQWbyzOSC8slojWKwLTZMDowjS5aHZhWF80OTLNL7PZNu03DfdPwGct90/IZ033T9DLbWX/KQNecxbo3dPopw4IpLC7AnC1VxB1Hv1nHIRypGPIrI57oHo8bXRGbHTcMWZ8G8Cj7/WxrVb03WK1116J1MbnIBiWTPriL4Lm4ma6t1rT1TDAsrtbzscfLDUkqxoVrq43JMARV0hLdoBGUd/+7VU0OcVQW6yLozAVBkt5W7RK9XchDDC5X+PZ63wmiJaqJuiKnoj8A0x8dUjHL6YhbwFO4qOED6IlpYlu1Zlo5eXvVKY6+Zr98VbOcTavx99rqJ4/VWOyNlT+s/HllbcVZebjyycrnKwcrRyvu+//64M0P3v3gPfvfzu+d950/ZqSvv6b2vLdifJy1/wDmPI2V</latexit>

Termini Indicizza Descrizioni


Bibliografiche
Termine :string ⌧PK Termine Termine :string ⌧PK Bibliografia
PiùGenerale :string ⌧FK(Termini) ISBN :string ⌧PK
⌧FK(Termini) Bibliografia :string ⌧PK Titolo :string
Standard :string ⌧FK(Descrizioni Editore :string
⌧FK(Termini) Bibliografiche) Anno :int

Bibliografia
DescrittoDa
Standard

AppareIn
Autori Libri
Autore Autore :string ⌧PK
CF :string ⌧PK Codice :string ⌧PK
⌧FK(Autori)
Nome :string DescrittoDa :string
Bibliografia :string ⌧PK
Nazionalità :string ⌧FK(Descrizioni
⌧FK(Descrizioni
DataNascita :date Bibliografiche)
Bibliografiche)
Libro Libro

Prestabili Consultabili