0% found this document useful (0 votes)
5 views2 pages

Understanding Relational Algebra Operations

Relational query languages allow users to retrieve data from relational databases using operations like selection and projection. Selection selects rows in a relation based on conditional expressions, such as choosing female patients under age 20. Projection deletes unwanted columns and extracts specific columns, like listing patients over age 18 and extracting their age column. There are different basic operations that can be applied to relations based on retrieval requirements.

Uploaded by

Amen Abatemame
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views2 pages

Understanding Relational Algebra Operations

Relational query languages allow users to retrieve data from relational databases using operations like selection and projection. Selection selects rows in a relation based on conditional expressions, such as choosing female patients under age 20. Projection deletes unwanted columns and extracts specific columns, like listing patients over age 18 and extracting their age column. There are different basic operations that can be applied to relations based on retrieval requirements.

Uploaded by

Amen Abatemame
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Relational Query Languages

 Relational Algebra
The basic set of operations for the relational model is known as the
relational algebra. These operations enable a user to specify basic retrieval
requests.

 There are different basic operations that could be applied on relations on a


database based on the requirement.

1. Selection (  ) Selects a subset of rows from a relation.

P_id name Age weight gender


1011093 kasim 20 59 m
1011098 digu 19 61 m
1011076 amen 17 50 M
1011081 yonas 23 70 m
1010786 dyana 19 53 f

 Eg list female patients whose age is less than 20



 ∂<gender=”f” ˄ age < 20>(patient)

P_id name Age weight gender


1010786 dyana 19 53 f
2. Projection (  ) Deletes unwanted columns from a relation.

 Eg list patient whose age is greater than 18

Π<age<18>(patient)
P_id name Age weight gender
1011093 kasim 20 59 m
1011098 digu 19 61 m
1011081 yonas 23 70 m
1010786 dyana 19 53 f

You might also like