Page 36 - DCAP402_DCAO204_DATABASE MANAGEMENT SYSTEM_MANAGING DATABASE
P. 36
Unit 2: Database Relational Model
Renaming ( ) Notes
This operator is used to rename the relation or attributes or both. The syntax for this operator is
(A (old name new name), B)
B is the old relation which being renamed as ‘A’. The list which contains the new names for
attributes is called as renaming list.
i.e., old name rename. This list is used to rename the attributes.
Example: If we want to rename the relation DEPT-LOCATION to DLOCATION and also
the attributes DNo to D-number and DLocation to D_L then we can write this as:
(DLocation (DNo D_number, DLocation D_L) DEPT_LOCATION)
Its not compulsory to rename both relations and attributes. It depends on the user and this
operator simplifies the presentation of different relations (with different names and different
attributes). The exclusion of both the relation names and attribute names is meaningless.
Notes Both union and intersection operators are commutative and also associative.
A B B A
Commutative
A B B A
A (B C) (A B) C
Associative
A (B C) (A B) C
The ‘Minus’ operation is not commutative.
A – B B – A.
2.2.3 Joins
Joins are used to combine the information of two relations which have at least one field in
common. It is one of the most important operators of RDBMS. In simple words, a join operation
can be defined as a cartesian product followed by selection or projection operators. The different
forms of join operators are,
1. Conditional join
2. Equi-join
3. Natural join
4. Outer join.
Conditional Join
This join returns a relation that includes a set of rows from the cartesian product of two relations
A and B such that each row satisfies a given condition C. This can be denoted as,
A c B
LOVELY PROFESSIONAL UNIVERSITY 29