I am trying to learn Domain relational calculus. Considering the below relations and queries, why can't we write for{<c>|< b, l, c, a> ∈ borrow ∧ a>1200}
the second question? I have a feeling that it has something to do with whether the query is safe, but how come the answer for question one works? I don't know what exactly is wrong. Could you please help to explain? Many thanks!
Source from http://www.cs.sfu.ca/CourseCentral/354/zaiane/material/notes/Chapter3/node18.html#SECTION00142000000000000000
and the relations it refers to is here http://www.cs.sfu.ca/CourseCentral/354/zaiane/material/notes/Chapter3/node8.html#SECTION00121000000000000000
About query written in Domain Relational Calculus
295 views Asked by user3735871 At
1
Remember, that the definition of query in Domain Relational Calculus
says that the variables
x1, ..., xn
that appear to the left of ‘|’ must be the only free variables in the formulap(...)
. In your example, variablesb,l,a
are not bound and remain free. In the correct answer, the existence quantifier binds them.