Dsy Network www | forum | my | didattica | howto | wiki | el goog | stats | blog | dona | rappresentanti
Homepage
 Register   Calendar   Members  Faq   Search  Logout 
.dsy:it. : Powered by vBulletin version 2.3.1 .dsy:it. > Didattica > Corsi A - F > Basi di dati ~ comunicazione digitale > esami perlasca 06/07
Pages (8): [1] 2 3 4 5 » ... Last »   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
dvr
.illuminato.

User info:
Registered: May 2005
Posts: 158 (0.02 al dì)
Location: mi
Corso: Comunicazione Digitale
Anno: 3
Time Online: 1 Day, 20:39:43 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged
esami perlasca 06/07

ho trovato solo esami relativi all' edizione 05/06 (quelli fatti insieme a mazzoleni) :sad: di quella corrente non c'è nulla?

chi li ha già fatti in passato ricorda qualcosa?

24-01-2008 10:16
Click Here to See the Profile for dvr Click here to Send dvr a Private Message Find more posts by dvr Add dvr to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
LiJay
.illuminato.

User info:
Registered: Mar 2006
Posts: 182 (0.03 al dì)
Location: bergamo
Corso: comunicazione digitale
Anno: 2
Time Online: 3 Days, 11:22:07: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

questo è l'esame di settembre..l'esercizio sul diagramma ER non ce l'ho sotto mano magari lo stendo piu' tardi quando avrò finito di esercitarmi ^_^

Esercizio 2
Sia dato il seguente schema relazionale:

MUSEI(nome, città, nazione, giornoChiusura)
ARTISTI(nome, nazionalità, dataNascita, DataMorte)
OPERE(codice, titolo, stato artista,museo)
PERSONAGGI(Personaggio, codice)

Rispondere ai seguenti quesiti utilizzando il linguaggio SQL:
• Restituire il nome dell’artista ed il titolo delle opere conservate alla “Galleria degli Uffizi” o alla “National Gallery”.
• Il codice ed il titolo delle opere di artisti italiani conservate nei musei di Londra, in cui è rappresentato Dante
• Restituire per ogni museo di Londra il numero delle opere di artisti italiani conservate nei musei di Londra, in cui è rappresentato Dante.
• Restituire per ogni museo di londra il numero delle opere di artisti italiani conservate in esso
• Il titolo dell’opera ed il nome dell’artista delle opere di artisti italiani che non hanno personaggi.
• Restituire il nome dei musei di Londra che conservano solo opere di Leonardo; effettuare tale interrogazione anche in algebra relazionale.

Esercizio 3

Si consideri R(A,B,C,D,E,F) con le seguenti dipendenze funzionali:
AB→E, AC→F, AD→B, B→C, C→D

Determinare
• Tutte le chiavi di R
• Se R è in 3NF
• Se R è in BCNF; nel caso in cui non lo fosse, discutere l’esistenza di una decomposizione che preservi le dipendenze funzionali

Last edited by LiJay on 25-01-2008 at 13:17

25-01-2008 12:52
Click Here to See the Profile for LiJay Click here to Send LiJay a Private Message Find more posts by LiJay Add LiJay to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
WillyWonka
.consigliere.

User info:
Registered: Oct 2005
Posts: 142 (0.02 al dì)
Location: Desio
Corso: COM DIG
Anno: terzo
Time Online: 1 Day, 13:17:44 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

domanda sull'es 3: le chiavi sono AB, AC e AD, R è in 3nf, ma è anche in BCNF?

25-01-2008 14:20
Click Here to See the Profile for WillyWonka Click Here to See the Blog of WillyWonka Click here to Send WillyWonka a Private Message Find more posts by WillyWonka Add WillyWonka to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
WillyWonka
.consigliere.

User info:
Registered: Oct 2005
Posts: 142 (0.02 al dì)
Location: Desio
Corso: COM DIG
Anno: terzo
Time Online: 1 Day, 13:17:44 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Il titolo dell’opera ed il nome dell’artista delle opere di artisti italiani che non hanno personaggi.

e per risolvere questa dobbiamo mettere come condizione:
WHERE personaggi.personaggi="nessuno" dato che personaggi.personaggio è parte della chiave primaria e non può essere nullo? corretto?

25-01-2008 15:16
Click Here to See the Profile for WillyWonka Click Here to See the Blog of WillyWonka Click here to Send WillyWonka a Private Message Find more posts by WillyWonka Add WillyWonka to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
j'sòd'bààr
.consigliere.

User info:
Registered: Jan 2005
Posts: 112 (0.01 al dì)
Location: non lo so
Corso: comunicazione digitale
Anno: assai
Time Online: 1 Day, 1:22:07: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

potete anche mettere le soluzioni degli altri esercizi?

grazie!!!

25-01-2008 15:18
Click Here to See the Profile for j'sòd'bààr Click here to Send j'sòd'bààr a Private Message Find more posts by j'sòd'bààr Add j'sòd'bààr to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.08 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ho provato a fare le query e questi sono i miei risultati...voi come avete fatto?

select a.nome, o.titolo
from artisti a, opere o, musei m
where a.nome=o.artista and o.museo=m.nome and o.museo=’Galleria degli Uffizi’ OR o.museo='National Gallery';



select o.codice, o.titolo
from artisti a, opere o, musei m, personaggi p
where a.nome=o.artista and o.museo=m.nome and p.codice=o.codice and p.Personaggio='Dante' and m.città='londra';


select m.nome, count(*) as numeropere
from artisti a, opere o, musei m, personaggi p
where a.nome=o.artista and o.museo=m.nome and p.codice=o.codice and p.Personaggio='Dante' and m.città='londra';


select m.nome, count(*) as numeropere
from artisti a, opere o, musei m,
where a.nome=o.artista and o.museo=m.nome and p.codice=o.codice and a.nazionalità='italiana' and m.città='londra';


select o.titolo, a.nome
from artisti a, opere o, personaggi.p
where a.nome=o.artista and p.codice=o.codice and a.nazionalità='italiana' and p.Personaggio=null;




select m.nome
from musei m
where m.città=’londra’ and not exist (select * from opere o where o.nome<>’leonardo’ and
m.nome=o.museo);

R1:Pnome(Scittà=’londra’(Musei))
R2: Pnome(Scittà=’londra’ and artista<>’leonardo’(Musei|><|nome=museoOpere))
R1-R2

25-01-2008 16:46
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.08 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Per quanto riguarda l'ultimo esercizio:
Le chiavi sono: AB, AC, AD
E' in 3NF, Non è in BCNF
Io non ho trovato ancora scomposizioni che preservino le dipendenze...voi?
Fatemi sapere
Ciao

25-01-2008 17:02
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.08 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Piccole correzioni
query 1:
select a.nome, o.titolo
from artisti a, opere o
where a.nome=o.artista and and o.museo=’Galleria degli Uffizi’ OR o.museo='National Gallery';

query 3:
select m.nome, count(*) as numeropere
from artisti a, opere o, musei m, personaggi p
where a.nome=o.artista and o.museo=m.nome and p.codice=o.codice and p.Personaggio='Dante' and m.città='londra'
GROUP BY m.nome;

Per caso avete lo schema ER dell'esame di settembre?
Grazie

25-01-2008 17:25
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.08 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Altre correzioni che ho trovato(purtroppo le avevo fatte su carta e nel ricopiarle mi sono persa dei pezzi :P ):

query 2:
select o.codice, o.titolo
from artisti a, opere o, musei m, personaggi p
where a.nome=o.artista and o.museo=m.nome and p.codice=o.codice and p.Personaggio='Dante' and m.città='londra' and a.nazionalità='italiana';

query4:
select m.nome, count(*) as numeropere
from artisti a, opere o, musei m,
where a.nome=o.artista and o.museo=m.nome and p.codice=o.codice and a.nazionalità='italiana' and m.città='londra';
GROUP BY m.nome;

query 5:
select o.titolo, a.nome
from artisti a, opere o, personaggi.p
where a.nome=o.artista and p.codice=o.codice and a.nazionalità='italiana' and p.Personaggio IS NULL;

26-01-2008 09:28
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
WillyWonka
.consigliere.

User info:
Registered: Oct 2005
Posts: 142 (0.02 al dì)
Location: Desio
Corso: COM DIG
Anno: terzo
Time Online: 1 Day, 13:17:44 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

l'es 3 è in 3nf xkè a sn ci sono chiavi o cmq attributi primi, mentre non è i BCNF xkè nn tutti sono appunto chiavi. E' corretto?Perchè non ho capito bene questa cosa..pomeriggio po sto le mie query

26-01-2008 09:34
Click Here to See the Profile for WillyWonka Click Here to See the Blog of WillyWonka Click here to Send WillyWonka a Private Message Find more posts by WillyWonka Add WillyWonka to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
j'sòd'bààr
.consigliere.

User info:
Registered: Jan 2005
Posts: 112 (0.01 al dì)
Location: non lo so
Corso: comunicazione digitale
Anno: assai
Time Online: 1 Day, 1:22:07: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

ma una chiave primaria non può essere null

nella query 5 di arial è null:... p.Personaggio IS NULL

chi mi spiega?

grazie

26-01-2008 09:42
Click Here to See the Profile for j'sòd'bààr Click here to Send j'sòd'bààr a Private Message Find more posts by j'sòd'bààr Add j'sòd'bààr to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.08 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Per essere in BCNF bisogna avere per ogni dipendenza funzionale a sinistra una chiave o superchiave (nel nostro caso B-->C e C--->D non vanno bene).

Per il fatto della chiave anche a me è venuto sto dubbio perchè in teoria non può essere null...boh o c'è un errore nello schema o penso che la query non si possa fare..qualcuno ha qualche idea?

26-01-2008 10:11
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
j'sòd'bààr
.consigliere.

User info:
Registered: Jan 2005
Posts: 112 (0.01 al dì)
Location: non lo so
Corso: comunicazione digitale
Anno: assai
Time Online: 1 Day, 1:22:07: [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

secondo me è:

query 5:
select o.titolo, a.nome
from artisti a, opere o, personaggi.p
where a.nome=o.artista and p.codice=o.codice and a.nazionalità='italiana' and p.Personaggio='non definito'

in un quadro che rappresenta ad esempio la natura non c'è un personaggio specifico

26-01-2008 10:17
Click Here to See the Profile for j'sòd'bààr Click here to Send j'sòd'bààr a Private Message Find more posts by j'sòd'bààr Add j'sòd'bààr to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
ARIEL
.grande:maestro.

User info:
Registered: Jul 2005
Posts: 636 (0.08 al dì)
Location: milano
Corso: Comunicazione digitale
Anno: Dottoressa!!!
Time Online: 12 Days, 7:36:22 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

giusto questo penso potrebbe andare!

26-01-2008 10:20
Click Here to See the Profile for ARIEL Click here to Send ARIEL a Private Message Find more posts by ARIEL Add ARIEL to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
WillyWonka
.consigliere.

User info:
Registered: Oct 2005
Posts: 142 (0.02 al dì)
Location: Desio
Corso: COM DIG
Anno: terzo
Time Online: 1 Day, 13:17:44 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

si basta mettere personaggio="nessuno" o qualcosa del genere, dato che non puo' essere NULL bisognaerà cmq scrivere qualcosa all'interno di personaggi.personaggio..l'avevo scritto poco sopra

26-01-2008 12:37
Click Here to See the Profile for WillyWonka Click Here to See the Blog of WillyWonka Click here to Send WillyWonka a Private Message Find more posts by WillyWonka Add WillyWonka to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 22:07.    Post New Thread    Post A Reply
Pages (8): [1] 2 3 4 5 » ... Last »   Last Thread   Next Thread
Show Printable Version | Email this Page | Subscribe to this Thread | Add to Bookmarks

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is ON
 

Powered by: vBulletin v2.3.1 - Copyright ©2000 - 2002, Jelsoft Enterprises Limited
Mantained by dsy crew (email) | Collabora con noi | Segnalaci un bug | Archive | Regolamento | Licenze | Thanks | Syndacate
Pagina generata in 0.108 seconds (63.90% PHP - 36.10% MySQL) con 24 query.