Which of the following does not find all the customers who have a loan amount more than 1200?
-
{t (Customer name) / t $\in$ borrow $\land$ t [amount] > 1200}
-
{t / t(Customer name) $\in$ borrow $\land$ t [amount] > 1200}
-
{t / $\exists$ s $\in$ borrow (t[Customer name] = s[Customer name]) $\land$ s[amount] > 1200)}
-
Both (1) and (2)
D
Correct answer
Explanation
The SQL statement is select customer. Customer name from customer, Borrow where Borrow
Customer name = customer Customer name and Borrow. amount > 1200
Hence, relational calculus statement is
{t / $\exists$ s $\in$ borrow (t[Customer name] = s[Customer name]) $\land$ s[amount] > 1200)}