[Help]How to translate from Algebra->SQL and viceverse?
Date: Tue, 07 Nov 2000 01:55:05 +0300
Message-ID: <20001107.015448.269441500.1687_at_jedi.200.41.96.2>
Hi,
My professor have teached us how to translate from Logic Language(LL)
to SQL, and LL to Algebra, and then in exam appeared question about
tranlate Algebra code->SQL code and SQL->Algebra, so I assumed that the
only way was through the LL, becasue the direct tranlate from Algebra->SQL is
almost impossible for me, especially with subqueries of more than 4
levels, im talking about kind of monster like this:
select(select(select ... where (blablabla) or exists (select ...)));
So my first question is: Is there a book i could learn more about this
issue from?
One more quesion from the last exam was:
"to list all the clients who suffered more than one accidents in Algebra."
table Client(client_id, insurance#,...) <-strong entity (primary key:client_id;foreign key:insurance#)
table Accidents(insurance#, date, time) <-weak entity
to do this one, i used "having count(*)>1" for table Accidents, but the problem is they didnt ask for SQL, so my question is: What is the equivalent algebra codes for "groups ... having ..." ?
Any suggestion will be highly appreciated
best regards Received on Mon Nov 06 2000 - 23:55:05 CET