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 > Basi di dati:soluzioni??
Pages (3): « 1 2 [3]   Last Thread   Next Thread
Author
Thread    Expand all | Contract all    Post New Thread    Post A Reply
Collapse
imation
.illuminato.

User info:
Registered: May 2002
Posts: 158 (0.02 al dì)
Location:
Corso: Comunicazione Digitale
Anno: 2
Time Online: 3 Days, 1:19:31 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

nn sono sicuro ma anche l'esercizio b del tema del 20/06/2002 sembra sbagliato...

SELECT Autore#
FROM Libri,Prestiti
WHERE LibriLibro#=Prestiti.Libro# AND Nome-utente IS NOT NULL
GROUP BY Autore#
HAVING COUNT(Libro#)<=(SELECT Count(Libro#)
FROM Libri,Prestiti
WHERE LibriLibro#=Prestiti.Libro# AND Nome-utente IS NOT NULL
GROUP BY Autore#)

12-02-2003 18:42
Click Here to See the Profile for imation Click here to Send imation a Private Message Find more posts by imation Add imation to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Alis
.grande:maestro.

User info:
Registered: Jun 2002
Posts: 862 (0.10 al dì)
Location: Corsico
Corso:
Anno:
Time Online: 10 Days, 16:32:12 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by imation
nn sono sicuro ma anche l'esercizio b del tema del 20/06/2002 sembra sbagliato...

SELECT Autore#
FROM Libri,Prestiti
WHERE LibriLibro#=Prestiti.Libro# AND Nome-utente IS NOT NULL
GROUP BY Autore#
HAVING COUNT(Libro#)<=(SELECT Count(Libro#)
FROM Libri,Prestiti
WHERE LibriLibro#=Prestiti.Libro# AND Nome-utente IS NOT NULL
GROUP BY Autore#)



Perchè hai messo IS NOT NULL?che io sappia si usa nelle creazioni di tabelle!!

12-02-2003 19:13
Click Here to See the Profile for Alis Click here to Send Alis a Private Message Find more posts by Alis Add Alis to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lunik
dsy core staff

User info:
Registered: Mar 2002
Posts: 22362 (2.56 al dì)
Location: Milano
Corso: ComDig
Anno: Dott.ssa
Time Online: 93 Days, 0:52:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

azz Alis lo puoi usare anche nelle query...

__________________
Il DSY su Facebook!!!

12-02-2003 19:14
Click Here to See the Profile for Lunik Click Here to See the Blog of Lunik Click here to Send Lunik a Private Message Visit Lunik's homepage! Find more posts by Lunik Add Lunik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Alis
.grande:maestro.

User info:
Registered: Jun 2002
Posts: 862 (0.10 al dì)
Location: Corsico
Corso:
Anno:
Time Online: 10 Days, 16:32:12 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Ops non lo sapevo!grazie Lunik!!

per imation:oggi ho rifatto l'esercizio del 20/6/02, non so se è giusto,te lo posto lo stesso,cos' dai una occhiata!!!

SELECT Autore#
FROM Libri, Prestiti
WHERE Libri.Libro#=Prestiti.Libro#
GROUP BY Autore#
HAVING COUNT(*) >= ALL (SELECT COUNT(*) FROM Libri, Prestiti
WHERE Libri.Libro#=Prestiti.Libro#
GROUP BY Autore#

12-02-2003 19:18
Click Here to See the Profile for Alis Click here to Send Alis a Private Message Find more posts by Alis Add Alis to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Alis
.grande:maestro.

User info:
Registered: Jun 2002
Posts: 862 (0.10 al dì)
Location: Corsico
Corso:
Anno:
Time Online: 10 Days, 16:32:12 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Alis
Ops non lo sapevo!grazie Lunik!!

per imation:oggi ho rifatto l'esercizio del 20/6/02, non so se è giusto,te lo posto lo stesso,cos' dai una occhiata!!!

SELECT Autore#
FROM Libri, Prestiti
WHERE Libri.Libro#=Prestiti.Libro#
GROUP BY Autore#
HAVING COUNT(*) <= ALL (SELECT COUNT(*) FROM Libri, Prestiti
WHERE Libri.Libro#=Prestiti.Libro#
GROUP BY Autore#

12-02-2003 19:21
Click Here to See the Profile for Alis Click here to Send Alis a Private Message Find more posts by Alis Add Alis to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lunik
dsy core staff

User info:
Registered: Mar 2002
Posts: 22362 (2.56 al dì)
Location: Milano
Corso: ComDig
Anno: Dott.ssa
Time Online: 93 Days, 0:52:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Off-Topic:
che hai fatto Alis???? Cosa volevi fare quotando il tuo post???

__________________
Il DSY su Facebook!!!

12-02-2003 19:24
Click Here to See the Profile for Lunik Click Here to See the Blog of Lunik Click here to Send Lunik a Private Message Visit Lunik's homepage! Find more posts by Lunik Add Lunik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Alis
.grande:maestro.

User info:
Registered: Jun 2002
Posts: 862 (0.10 al dì)
Location: Corsico
Corso:
Anno:
Time Online: 10 Days, 16:32:12 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Lunik
Off-Topic:
che hai fatto Alis???? Cosa volevi fare quotando il tuo post???



Volevo solo correggere l'esercizio!!avevo messo > al posto di <!!

12-02-2003 19:29
Click Here to See the Profile for Alis Click here to Send Alis a Private Message Find more posts by Alis Add Alis to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lunik
dsy core staff

User info:
Registered: Mar 2002
Posts: 22362 (2.56 al dì)
Location: Milano
Corso: ComDig
Anno: Dott.ssa
Time Online: 93 Days, 0:52:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Off-Topic:
ah scusa non si vedeva... :)

__________________
Il DSY su Facebook!!!

12-02-2003 19:29
Click Here to See the Profile for Lunik Click Here to See the Blog of Lunik Click here to Send Lunik a Private Message Visit Lunik's homepage! Find more posts by Lunik Add Lunik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
imation
.illuminato.

User info:
Registered: May 2002
Posts: 158 (0.02 al dì)
Location:
Corso: Comunicazione Digitale
Anno: 2
Time Online: 3 Days, 1:19:31 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

Originally posted by Alis
Ops non lo sapevo!grazie Lunik!!

per imation:oggi ho rifatto l'esercizio del 20/6/02, non so se è giusto,te lo posto lo stesso,cos' dai una occhiata!!!

SELECT Autore#
FROM Libri, Prestiti
WHERE Libri.Libro#=Prestiti.Libro#
GROUP BY Autore#
HAVING COUNT(*) >= ALL (SELECT COUNT(*) FROM Libri, Prestiti
WHERE Libri.Libro#=Prestiti.Libro#
GROUP BY Autore#


io aggiungerei anche Nome-Utente IS NOT NULL in modo da evitare che siano selezionati anche i libri che non sono in prestito...

12-02-2003 20:01
Click Here to See the Profile for imation Click here to Send imation a Private Message Find more posts by imation Add imation to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lunik
dsy core staff

User info:
Registered: Mar 2002
Posts: 22362 (2.56 al dì)
Location: Milano
Corso: ComDig
Anno: Dott.ssa
Time Online: 93 Days, 0:52:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

è inutile mettere IS NOT NUll...
nell'ultima select confrontando i codici dei libri PER FORZA fa un confronto tra libri in prestito..
fidati..è giusta...
forse il controllo nella prima select è inutile....

__________________
Il DSY su Facebook!!!

12-02-2003 20:12
Click Here to See the Profile for Lunik Click Here to See the Blog of Lunik Click here to Send Lunik a Private Message Visit Lunik's homepage! Find more posts by Lunik Add Lunik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
imation
.illuminato.

User info:
Registered: May 2002
Posts: 158 (0.02 al dì)
Location:
Corso: Comunicazione Digitale
Anno: 2
Time Online: 3 Days, 1:19:31 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

secondo me dipende da come è strutturata la base di dati.... nel senso che la relazione Prestiti potrebbe tenere memorizzati cmq tutti i libri e inserire nella colonna Nome-utente NULL se il libro nn è in prestito... nelle indicazioni nn è specificato

12-02-2003 20:17
Click Here to See the Profile for imation Click here to Send imation a Private Message Find more posts by imation Add imation to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
Collapse
Lunik
dsy core staff

User info:
Registered: Mar 2002
Posts: 22362 (2.56 al dì)
Location: Milano
Corso: ComDig
Anno: Dott.ssa
Time Online: 93 Days, 0:52:10 [...]
Status: Offline

Post actions:

Edit | Report | IP: Logged

beh penso che se un libro non è in prestito, non è nella tabella prestiti!
mi sembra cmq anche ovvio...in un tema d'esame, simile a questo, ci sono 4 tabelle...e c'è proprio questa cosa "i libri in prestito NON sono nella tabella prestiti"

cmq....

__________________
Il DSY su Facebook!!!

12-02-2003 20:18
Click Here to See the Profile for Lunik Click Here to See the Blog of Lunik Click here to Send Lunik a Private Message Visit Lunik's homepage! Find more posts by Lunik Add Lunik to your buddy list Printer Friendly version Email this Article to a friend Reply w/Quote
All times are GMT. The time now is 14:36.    Post New Thread    Post A Reply
Pages (3): « 1 2 [3]   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.066 seconds (63.73% PHP - 36.27% MySQL) con 24 query.