SlideShare a Scribd company logo
Relational algebra.pptx
 Relational algebra is a procedural query language.
 It uses operations to perform queries.
 It gives a step by step process to obtain the result of the query.
Types of Relational operation
 Select operator selects tuples(rohs) that satisfy a given predicate.
 It‘s an denoted by sigma (σ).
 Notatin in σ p(r)
Where.,
σ is used for selection prediction.
r is ised to relation.
p is used as a propositional logic formula which may be use connection like:AND
OR and NOT.
These relational can use as relational operators like=, ≠, ≥,<,>, ≤
NAME AGE WEIGHT
Harry 34 80
Saily 26 64
George 29 70
Helena 54 54
Peter 34 80
NAME AGE WEIGHTH
Harry 34 80
Helena 54 54
Peter 34 80
σ age≥34(PERSON)
Name Age Weighth
Helena 54 54
Σ age=weight(PERSON)
 This operation shows the list of those attributes that we wish to appear in the
result.
 Rest of the attributes are eliminated from the table.
 It’s denoted by (π).
Where..,
 A1,A2,A3 is used as an attribute of relation r.
NAME STREET CITY
jones Main Harrison
Smith North Rye
Hays Main Harrison
Curry North Rye
Brooks Senator Brooklyn
Johnson Aima Brooklyn
Input:
πNAME, CITY(CUSTOMER)
Output:
NAME CITY
Johns Harrizon
Smith Rye
Hays Harrison
Curry Rye
Brooke Brooklyn
Johnson Brooklyn
 Union operation combines values in R,Sby removing duplicate ones.
 This operation does not need the two tables being operated on to be union
compatible.
 It elimimates the duplicate tuples.
 It’ denoted by U.
Notation:
R U S
a union operation must hold the following condition.
1. R.and S must have the attribute of the. Same number.
2. Dupicte tuples are eliminted automatically.
Customer_Na
me
Account_no
Johnson A-101
Smith A-121
Mayes A-321
Turner A-176
Johnson A-273
Johns A-472
Lindsay A-284
BORROW RELATION:-
Customer_na
me
Loan_no
Jones L -17
Smith L -23
Hayes L -15
Jackson L -14
Curry L -93
Smith L -11
Williams L -17
INPUT:
π CUSTOMER_NAME(BORROW)u π customer_name(DEPOSITER
CUSTOMER_NAME
johnson
Smith
Hayes
Jones
Turner
Lindsay
Jackson
Curry
Williams
Mayes
OUTPUT:-
 Suppose there are two TUPLES R and S. The set intersection operation contains all TUPLES
that are in both R & S.
 It is denoted by intersection ∩.
Notation: R ∩ S
EXAMPLE: Using the above DEPOSITOR table and BORROW table
INPUT: ∏ CUSTOMER_NAME (BORROW) ∩ ∏ CUSTOMER_NAME (DEPOSITOR)
OUTPUT:
 Suppose there are two tuples R and S. The set intersection operation contains all tuples that are
in R but not in S.
 It is denoted by intersection minus (-).
Notation: R - S
EXAMPLE: Using the above DEPOSITOR table and BORROW table
INPUT:
∏ CUSTOMER_NAME (BORROW)-∏ CUSTOMER_NAME (DEPOSITOR)
OUTPUT:
 The Cartesian product is used to combine each row in one table with each row in the other
table. It is also known as a cross product.
 It is denoted by X.
Notation: E X D
EXAMPLE:
INPUT:
EMPLOYEE X DEPARTMENT
Relational algebra.pptx
 The rename operation is used to rename the output relation. It is denoted by rho (ρ).
EXAMPLE:
We can use the rename operator to rename STUDENT relation to STUDENT1.
ρ(STUDENT1, STUDENT)

More Related Content

PPTX
Relational Algebra in DBMS 2025 power point
PDF
1695304562_RELATIONAL_ALGEBRA.pdf
DOCX
Relational Algebra Ch6 (Navathe 4th edition)/ Ch7 (Navathe 3rd edition)
PPT
Relational algebra operations
PPTX
Datqbase management system: Relational Algebra.pptx
PPT
Relational Algebra
PPT
relalgebraasssssssssssssssssssssssss.ppt
PPT
Relational Algebra.ppt
Relational Algebra in DBMS 2025 power point
1695304562_RELATIONAL_ALGEBRA.pdf
Relational Algebra Ch6 (Navathe 4th edition)/ Ch7 (Navathe 3rd edition)
Relational algebra operations
Datqbase management system: Relational Algebra.pptx
Relational Algebra
relalgebraasssssssssssssssssssssssss.ppt
Relational Algebra.ppt

Similar to Relational algebra.pptx (20)

PPT
relational algebra
PDF
3.2 SQL to -Relational Algebra.pdf
PPT
Intro to relational model
PPT
chapter 5-Relational Algebra and calculus.ppt
PPT
PPTX
Slide For Database Management System Relational Model.pptx
PPTX
Dbms relational model
PPT
Unit04 dbms
PDF
Cs501 rel algebra
PPT
Unit2 -DBMS.ppt with type of job operation
PPT
3. Relational Models in DBMS
PPT
PDF
Relational Algebra Various Operations
PPT
4. SQL in DBMS
PPT
relational algebra and it's implementation
PPT
2. Relational Algebra.ppt
PPTX
Relation model part 1
PPT
Relational+algebra (1)
relational algebra
3.2 SQL to -Relational Algebra.pdf
Intro to relational model
chapter 5-Relational Algebra and calculus.ppt
Slide For Database Management System Relational Model.pptx
Dbms relational model
Unit04 dbms
Cs501 rel algebra
Unit2 -DBMS.ppt with type of job operation
3. Relational Models in DBMS
Relational Algebra Various Operations
4. SQL in DBMS
relational algebra and it's implementation
2. Relational Algebra.ppt
Relation model part 1
Relational+algebra (1)
Ad

Recently uploaded (20)

PDF
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
PPTX
Cell Structure & Organelles in detailed.
PDF
VCE English Exam - Section C Student Revision Booklet
PPTX
Microbial diseases, their pathogenesis and prophylaxis
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
Anesthesia in Laparoscopic Surgery in India
PPTX
Renaissance Architecture: A Journey from Faith to Humanism
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Week 4 Term 3 Study Techniques revisited.pptx
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
Insiders guide to clinical Medicine.pdf
PPTX
Pharmacology of Heart Failure /Pharmacotherapy of CHF
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PDF
Business Ethics Teaching Materials for college
PDF
TR - Agricultural Crops Production NC III.pdf
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PDF
Complications of Minimal Access Surgery at WLH
BÀI TẬP BỔ TRỢ 4 KỸ NĂNG TIẾNG ANH 9 GLOBAL SUCCESS - CẢ NĂM - BÁM SÁT FORM Đ...
Cell Structure & Organelles in detailed.
VCE English Exam - Section C Student Revision Booklet
Microbial diseases, their pathogenesis and prophylaxis
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
Anesthesia in Laparoscopic Surgery in India
Renaissance Architecture: A Journey from Faith to Humanism
O7-L3 Supply Chain Operations - ICLT Program
Week 4 Term 3 Study Techniques revisited.pptx
PPH.pptx obstetrics and gynecology in nursing
Insiders guide to clinical Medicine.pdf
Pharmacology of Heart Failure /Pharmacotherapy of CHF
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Business Ethics Teaching Materials for college
TR - Agricultural Crops Production NC III.pdf
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Origin of periodic table-Mendeleev’s Periodic-Modern Periodic table
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Complications of Minimal Access Surgery at WLH
Ad

Relational algebra.pptx

  • 2.  Relational algebra is a procedural query language.  It uses operations to perform queries.  It gives a step by step process to obtain the result of the query.
  • 4.  Select operator selects tuples(rohs) that satisfy a given predicate.  It‘s an denoted by sigma (σ).  Notatin in σ p(r) Where., σ is used for selection prediction. r is ised to relation. p is used as a propositional logic formula which may be use connection like:AND OR and NOT. These relational can use as relational operators like=, ≠, ≥,<,>, ≤
  • 5. NAME AGE WEIGHT Harry 34 80 Saily 26 64 George 29 70 Helena 54 54 Peter 34 80 NAME AGE WEIGHTH Harry 34 80 Helena 54 54 Peter 34 80 σ age≥34(PERSON) Name Age Weighth Helena 54 54 Σ age=weight(PERSON)
  • 6.  This operation shows the list of those attributes that we wish to appear in the result.  Rest of the attributes are eliminated from the table.  It’s denoted by (π). Where..,  A1,A2,A3 is used as an attribute of relation r.
  • 7. NAME STREET CITY jones Main Harrison Smith North Rye Hays Main Harrison Curry North Rye Brooks Senator Brooklyn Johnson Aima Brooklyn Input: πNAME, CITY(CUSTOMER) Output: NAME CITY Johns Harrizon Smith Rye Hays Harrison Curry Rye Brooke Brooklyn Johnson Brooklyn
  • 8.  Union operation combines values in R,Sby removing duplicate ones.  This operation does not need the two tables being operated on to be union compatible.  It elimimates the duplicate tuples.  It’ denoted by U. Notation: R U S a union operation must hold the following condition. 1. R.and S must have the attribute of the. Same number. 2. Dupicte tuples are eliminted automatically.
  • 9. Customer_Na me Account_no Johnson A-101 Smith A-121 Mayes A-321 Turner A-176 Johnson A-273 Johns A-472 Lindsay A-284 BORROW RELATION:- Customer_na me Loan_no Jones L -17 Smith L -23 Hayes L -15 Jackson L -14 Curry L -93 Smith L -11 Williams L -17
  • 10. INPUT: π CUSTOMER_NAME(BORROW)u π customer_name(DEPOSITER CUSTOMER_NAME johnson Smith Hayes Jones Turner Lindsay Jackson Curry Williams Mayes OUTPUT:-
  • 11.  Suppose there are two TUPLES R and S. The set intersection operation contains all TUPLES that are in both R & S.  It is denoted by intersection ∩. Notation: R ∩ S EXAMPLE: Using the above DEPOSITOR table and BORROW table INPUT: ∏ CUSTOMER_NAME (BORROW) ∩ ∏ CUSTOMER_NAME (DEPOSITOR) OUTPUT:
  • 12.  Suppose there are two tuples R and S. The set intersection operation contains all tuples that are in R but not in S.  It is denoted by intersection minus (-). Notation: R - S EXAMPLE: Using the above DEPOSITOR table and BORROW table INPUT: ∏ CUSTOMER_NAME (BORROW)-∏ CUSTOMER_NAME (DEPOSITOR) OUTPUT:
  • 13.  The Cartesian product is used to combine each row in one table with each row in the other table. It is also known as a cross product.  It is denoted by X. Notation: E X D EXAMPLE:
  • 16.  The rename operation is used to rename the output relation. It is denoted by rho (ρ). EXAMPLE: We can use the rename operator to rename STUDENT relation to STUDENT1. ρ(STUDENT1, STUDENT)