| You
are here: Freetutes.com
> Systems
Analysis and Design
Special Relational Operators in Relational Database Model
Selection:
The selection operator yields a 'horizontal' subset of a given relation - that
is, the subset of tuples within the given relation for which a specified predicate
is satisfied.
The predicate is expressed as a Boolean combination of terms, each term being
a simple comparison that can be established as true or false for a given tuple
by inspecting that tuple in isolation.
Book WHERE Author = ‘Kruse’
| BookID |
BookName |
Author |
| A-112 |
Algorithms |
Jack |
| C-12 |
Data Mining |
Jack |
| F-348 |
Software Engineer |
Jack |
Employee WHERE Desig=’Manager’ AND Dept =’SD’
| EmpNo |
EmpName |
Designation |
Depat |
| 2001 |
Morrison |
Manager |
SD |
| 2002 |
Steve |
Manager |
SD |
| 2003 |
Fleming |
Manager |
SD |
Projection:
The projection yields a 'vertical' subset of a given relation- that is, the
subset obtained by selecting specified attributes, in a specified left-to-right
order, and then eliminating duplicate tuples within the attributes selected.
Example: Issue[BookId,ReturnDate]
| BookID |
ReturnDate |
| q-110 |
20-May-2008 |
| w-990 |
21-Jun-2008 |
| f-100 |
23-Jun-2008 |
| r-800 |
27-Jun-2008 |
| q-501 |
15-Jul-2008 |
Book[BookName]
| BookName |
| Software Concepts |
| Data Structures |
| Programming |
| AssemblyLanguage |
| SSAD |
| PC-Troubleshooting |
| Compiler Design |
Now we know about the constructs of relational data model. We also know how
to specify constraints and how to use relational algebra for illustrating various
functions. We now take up another data model that is entirely different from relational
model.
Division:
The division operator divides a dividend relation A of degree m+n by a divisor
relation B of degree n, and produces a result relation of degree m.
Let A be set of pairs of values <x, y> and B a set of single values,
<y>. Then the result of dividing A by B - that is A DIVIDEDBY B- is the
set of values x such that the pair <x, y> appears in A for all values y
appearing in B.
See Also
<< Previous Page
| Contents | Next
Page >>
|