Professional Documents
Culture Documents
loan relation
Cartesian Product (Χ)
• The relation schema for r = borrower × loan is:
(borrower.customer-name , borrower.loan-
number , loan.loan-number,loan.branch-
name, loan.amount)
• We can then write the relation schema for r as
(customer-name, borrower.loan-number ,
loan.loan-number, branch-name, amount)
Cartesian Product (Χ)
Example
loan relation
Step 1
• Find the names of all customers who have a loan at the
Perryridge branch.
• σ branch- name = “ Perryridge ” ( borrower × loan ) .
Step 2
• Π balance ( account) −
Π account .balance( σ account .balance <
d .balance ( account × ρd ( account)))
Home Task…!
• Besides fundamental operations other
relational algebra are as follows −
• Namely
• Set intersection
• Natural join
• Division
• Assignment