
domenica 21 dicembre 2008
giovedì 4 dicembre 2008
lunedì 1 dicembre 2008
/Tabelle/
STUDENTE(codice, nome, indirizzo, età)
COMPRA(numProg, *codStud, *codicecd, data);
CD(codicCd, autore, titolo, prezzo);
/Codice MYSQL/
create table studente(codice integer primary key, nome text, eta intger, indirizzo text);
create table cd(codice integer primary key, autore text, titolo text, prezzo intger);
create table compra(numProg primary key, codiceCd integer foreing key, codiceStudente foreing key, data text);
insert into values studente(1, 'Silvano', 33, 'via del falco');
insert into values studente(2, 'andrea', 33, 'via francia');
insert into values studente(3, 'luca', 33, 'via garibaldi');
insert into values cd(1,'vasco','a', 15);
insert into values cd(2,'tizio','b', 13);
insert into values cd(3,'caio','b', 12);
insert into values compra(1, 2, 3, 26/9/2008);
insert into values compra(2, 3, 1, 25/10/2008);
insert into values compra(2, 3, 1, 27/11/2008);
.mode coluan
.headers
select * from studente;
select * from cd;
select * from guida;
select studente.nome, cd.titolo, cd.prezzo;
from studente, cd, compra
where studente.codice=compra.codiceStudente and cd.codice=compra.codiceCd and compra.codiceStudente=2;
STUDENTE(codice, nome, indirizzo, età)
COMPRA(numProg, *codStud, *codicecd, data);
CD(codicCd, autore, titolo, prezzo);
/Codice MYSQL/
create table studente(codice integer primary key, nome text, eta intger, indirizzo text);
create table cd(codice integer primary key, autore text, titolo text, prezzo intger);
create table compra(numProg primary key, codiceCd integer foreing key, codiceStudente foreing key, data text);
insert into values studente(1, 'Silvano', 33, 'via del falco');
insert into values studente(2, 'andrea', 33, 'via francia');
insert into values studente(3, 'luca', 33, 'via garibaldi');
insert into values cd(1,'vasco','a', 15);
insert into values cd(2,'tizio','b', 13);
insert into values cd(3,'caio','b', 12);
insert into values compra(1, 2, 3, 26/9/2008);
insert into values compra(2, 3, 1, 25/10/2008);
insert into values compra(2, 3, 1, 27/11/2008);
.mode coluan
.headers
select * from studente;
select * from cd;
select * from guida;
select studente.nome, cd.titolo, cd.prezzo;
from studente, cd, compra
where studente.codice=compra.codiceStudente and cd.codice=compra.codiceCd and compra.codiceStudente=2;
giovedì 20 novembre 2008
lunedì 3 novembre 2008
giovedì 30 ottobre 2008
venerdì 24 ottobre 2008
Vogliamo memorizzare i cantanti (nome, età) e le canzoni (titolo, anno pubblicazione) preferite dagli studenti (nome, età). Inoltre si vuole memorizzare in quali siti web (indirizzo sito, nomeUtente, password) le vanno ad ascoltare.
STUDENTE(matricola, nome, età)
SITOWEB(codice,indirizzo)
ACCEDE(password, nomeute, codiceStudente, codiceWeb)
CANZONE(codice, titolo,anno)
CANTANTE(matricola, nome età)
STUDENTE
Matricola | nome | età |
1 | caglio | 17 |
2 | tizio | 18 |
3 | sempronio | 19 |
SITOWEB
Codice | indirizzo |
1 | www.abc.it |
2 | www.cba.com |
3 | www.adm.com |
ACCEDE
Password | nomeute | codiceStudente | codiceWeb |
fhsdgfhjgf | a | 1 | 1 |
dsdkks | b | 3 | 3 |
dadjaufiuapfuipsa | c | 2 | 2 |
CANZONE
Codice | titolo | anno |
| | |
| | |
CANTANRE
Matricola | nome | età |
| | |
| |
Iscriviti a:
Post (Atom)