Relational Algebra Tutorial

Database | Home | Previous page











 


Also several predicates can be combined into larger predicates using the connectives and () and or (). An example using a connective is to find those tuples pertaining to loans of more than $1200 made by the Perryridge branch is written as:

branch-name = "Perryridge" amount > 1200 (loan)

The selection predicate may include comparisons between two attributes. For further explain this, consider the relation loan-officer that consists of three attributes: customer-name, banker-name, and loan-number, which specifies that a particular bankeris the loan officer for a loan that belong to some customer. The query to find all customers who have the same name is written as:

customer-name = banker-name (loan-officer)

 

Database | Home | Top of page | Previous page