Database Reference
In-Depth Information
Defining snapshot data for snapshot relations
Defining access rights i.e. data for which authorization of some
kind is to be granted
Defining integrity constraints apart from those that are part of the
relational model
Earlier in the course, it was mentioned that every DBMS has a data sublanguage
(DSL). Typically, the DSL is based on relational algebra, relational calculus (to be
discussed in the next chapter), or a combination of both. It is therefore imperative for you
to have a good grasp of this topic.
The relational algebra is said to be prescriptive — you specify precisely how an
activity is to be carried out. In so doing, there are certain operations that you will learn
to use.
7.2 Basic Operations of Relational Algebra
There are eight basic relational algebra operations with which you need to become
familiar; they are informally described below:
1.
Union (UNION): The union of relations R1 and R2 b uilds a
relation R3 consisting of tuples in either R1 or R2 inclusive.
Corresponding attributes of R1 and R2 must be defined on the
same domain.
2.
Difference (MINUS): The difference of relation R1 and
relation R2 is a new relation R3, with tuples appearing in R1,
but not in R2. Corresponding attributes from R1 and R2 must
be defined on the same domain.
3.
Restriction (RESTRICT): A restriction extracts specified
tuples from a specified relation R1, by imposing some
condition on the relation. The resulting relation R2, has only
the specified tuples. RESTRICT is replaced by the SELECT in
modern systems, the latter usually being more powerful than
the original.
4.
Product (PRODUCT): The Cartesian product of two
relations R1 and R2 is a third relation R3, consisting of the
concatenation of every tuple in R1 with every tuple R2.
5.
Projection (PROJECT): A projection extracts specified
attributes from a specified relation R1 into a new relation R2.
6.
Join (JOIN): The join of two relations R1 and R2 builds a new
relation R3, such that the tuples from R1 and R2 satisfy some
specified condition. However, in the unqualified form, it is
generally used to mean natural join . A more generic form of
the JOIN operation is discussed in section 7.3.5.
 
Search WWH ::




Custom Search