Page 29 - DCAP402_DCAO204_DATABASE MANAGEMENT SYSTEM_MANAGING DATABASE
P. 29
Database Management Systems/Managing Database
Notes 2.2 Additional and Extended Relational Algebra Operations
This language is used to manipulate the data in the data model. This languages uses a set of
operators that are applied on two relations (input) and produces a new relation (output).
Using the different operators-defined by the relational algebra, queries are built and applied on
the relations.
2.2.1 Relational Algebra Expression
Consists of operations when applied results into a new relation representing the different
requests.
Unary Operations
Operations which operates on only one relation.
Binary Operations
Operations which operate on two relations.
To understand the concepts of relation algebra and relational calculus, the following database
“COMPANY” will be used throughout the unit.
COMPANY database consist of five tables with attribute set as shown.
EMPLOYEE (Ename, Bid, Bdate, Address, Sex, Salary, DNo, Phonenumber, age)
DEPARTMENT (DName, DNo. Manager-id)
DEPT _LOCATION (DNo. Dlocation)
PROJECT (PName, PNumber. PLocation, DNo, Bid)
DEPENDENT (eid, Dep-Name. Sex, relationship)
The underlined attributes represent the primary key for the respective tables.
A compute view of “COMPANY” Database:
Employee
Ename Eid Bdate Address Sex ($) Salary Dno Phone Age
number (years)
John 12345261 10-8-1965 New Jersey M 25000 7 773213218 41
Jack 12345262 12-5-1955 Chicago M 55000 7 773421317 51
preen 12345263 20- 11- 1972 New York M 20000 7 773421317 34
Brown 12345264 28-7-1968 Chicago M 40000 8 773210192 28
Bill 12345265 25-4-1955 Detroit F 35000 8 773271842 51
Jill 12345266 04-4-1965 New York F 42000 8 773291828 41
Donald 12345267 02 8-1968 Detroit M 20000 9 773423145 28
John 1 234526 10- 8- 1965 New Jersey M 25000 8 773213218 41
John 12375261 10-8-1965 New Jersey M 25000 9 773213218 41
22 LOVELY PROFESSIONAL UNIVERSITY