RELATIONAL ALGEBRA
- Dec 6, 2015
- 1 min read
RELATIONAL ALGEBRA
-A query language (QL) is a language that allows users to manipulate and retrieve data from a database.
-Relational Algebra is useful for representing query execution plans, and query optimization techniques.
-Relational Algebra comprises a set of basic operations.
-An operation is the application of an operator to one or more source (or input) relations to produce a new relation as a result.
-Relational algebra has the property of closure, that is the output from each of the operations is another relation.
5 BASIC RA OPERATIONS
•Projection ( ) Retains only wanted columns from relation (vertical).
•Selection ( ) Selects a subset of rows from relation (horizontal).
•Cross-product (x) Allows us to combine two relations.
•Set-difference (–) Tuples in R1, but not in R2.
•Union (È ) Tuples in R1 and/or in R2.
NOTE: R1 = relation/table 1
R2 = relation/table 2


Comments