Hi all,
Excuse me if this is not the right place to ask this .., but it's the
closest I could find.
I am reading Ramakrishnan and Gehrke "Database Management Systems". In
their errata for the second edition at
http://www.cs.wisc.edu/~dbbook/openA...errata1st.html
it says
'Page 111, Q9: The tuple relational calculus expression for Q9 is
unsafe if "Boats" is empty. A corrected version of the query is the
following expression: { P | there exists S in Sailors (P.sname =
S.sname and for all R in Reserves (S.sid = R.sid and R.bid = B.bid))
}'
I have two questions about this:
1) why is the query (in the book) not safe if Boats is empty ?
2) How does the corrected query answer the task : 'Find the names of
sailors who have reserved all boats'? What if nobody reserved some
boat -- his/her name will still be selected in the corrected query ?!?
I would appreciate very much if somebody could shed some light on
this.
Regards,
Janis