Relational Language - Tutorial
Relational Language - Tutorial
Relational Languages
πbranch_name (loan)
select branch_name from loan
2. C Find the loan number for each loan of an amount greater than $1200
Solution:
π loan_number (amount > 1200 (loan))
Select loan_number from loan where amount>1200;
3. Find the names of all customers who have a loan, an account, or both, from the bank
Solution:
customer_name (borrower) customer_name (depositor)
Select customer_name from borrower
Select customer_name from depositor;
4. Find the names of all customers who have a loan at the Perryridge branch.
Solution:
customer_name (branch_name=“Perryridge”
(borrower.loan_number = loan.loan_number(borrower x loan)))
customer_name(loan.loan_number = borrower.loan_number (
(branch_name = “Perryridge” (loan)) x borrower))