si lo so...
ma so anche che in questo caso non andrebbe bene!
es ...
mi serve lo studente che ha 34 all'attrib "matricola"
codice:
select
s.idStudente
from
studente s, attributi a, valori v
where
v.idStudente = s.idStudente AND
v.idAttrib = a.idAttrib AND
a.nome = 'matricola' AND
v.value = '34'
in questo caso nulla da dire... va bene...
ma se io volessi sapere lo studente che ha matricola = 33 e cognome = 'rossi' ????
intenderesti far cosi?
codice:
select
s.idStudente
from
studente s, attributi a, valori v
where
v.idStudente = s.idStudente AND
v.idAttrib = a.idAttrib AND
a.nome = 'matricola' AND
v.value = '34' AND
a.nome = 'cognome' AND
v.value = 'rossi'
... mi sa mi sa che non va bene