2.15

Consider the bank database of Figure 2.18. Give an expression in the relational algebra for each of the following queries:

  1. Find each loan number with a loan amount greater than $10000.
  2. Find the ID of each depositor who has an account with a balance greater than $6000.
  3. Find the ID of each depositor who has an account with a balance greater than $6000 at the “Uptown” branch.

  1. \(\Pi_{loan\_number}(\sigma_{amount > 10000}(loan))\)
  2. \(\Pi_{ID}(depositor \bowtie_{depositor.account\_number = account.account\_number} (\sigma_{balance > 6000}(account)))\)
  3. \(\Pi_{ID}(depositor \bowtie_{depositor.account\_number = account.account\_number} (\sigma_{balance > 6000 \wedge branch\_name = "Uptown"}(account) ))\)