Multiple choice

Which of the following does not find all the customers who have a loan amount more than 1200?

  1. {t (Customer name) / t $\in$ borrow $\land$ t [amount] > 1200}
  2. {t / t(Customer name) $\in$ borrow $\land$ t [amount] > 1200}
  3. {t / $\exists$ s $\in$ borrow (t[Customer name] = s[Customer name]) $\land$ s[amount] > 1200)}
  4. Both (1) and (2)

Reveal answer Fill a bubble to check yourself
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)}