| You
are here: Freetutes.com
> Systems
Analysis and Design
Traditional set operators in Relational Database Model
Union:
The union of two relations A and B is the set of all tuples belonging to either
A or B (or both).
Example:
A = The set of employees whose department is S/W Development
B = The set of employee whose age is less than 30 years.
A UNION B = The set of employees whose are either in S/W development department
or having age less than 30 years.
Intersection:
The intersection of two relations A and B is the set of all tuples t belonging
to both A and B.
Example:
A = The set of employees whose department is S/W Development
B = The set of employee whose age is less than 30 years.
A INTERSECTION B = The set of employees whose are in S/W development department
having age less than 30 years.
Difference:
The difference between two relations A and B( in that order) is the set of
all tuples belonging to A and not to B.
Example:
A = The set of employees whose department is S/W Development
B = The set of employee whose age is less than 30 years.
A MINUS B = The set of employees whose department is S/W development and not having
age less than 30 years.
Cartesian Product:
The Cartesian product of two relations A and B is the set of all tuples t such
that t is the concatenation of a tuple a belonging to A and a tuple b belonging
to B. The concatenation of a tuple a = (a1, ………., am) and tuple
b=(bm+1 , ……., bm+n)- in that order- is the tuple t =(a1, …..,
am, bm+1, ……..bm+n).
Example:
A = The set of employees whose department is S/W Development
B = The set of employee whose age is less than 30 years.
A TIMES B = is the set of all possible employee no/department ids pairs
See Also
<< Previous
Page | Contents
| Next Page >>
|