Discrete Mathematics - Relational Algebra Notes | Khalsa College Mohali, Summaries of Discrete Mathematics

Clear and concise notes on Relational Algebra as part of Discrete Mathematics. Covers relations, operations, properties, and examples. Ideal for BCA/BSc CS semester exams.

Typology: Summaries

2025/2026

Available from 05/10/2026

sukhmeen-dhiman
sukhmeen-dhiman 🇮🇳

15 documents

1 / 3

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
Relational Algebra
Relational algebra is a widely used procedural query language.
It collects instances of relations as input and gives occurrences of
relations as output.
It uses various operations to perform this action.
Relational algebra operations are performed recursively on a relation.
The output of these operations is a new relation, which might be
formed from one or more input relations.
Fundamental Operations in Relational Algebra
1. Selection Operator (σ)
The SELECT operation is used for selecting a subset of the tuples
according to a given selection condition.
Sigma (σ) symbol denotes it.
It is used as an expression to choose tuples which meet the selection
condition.
Select operation selects tuples that satisfy a given predicate.
2. Projection Operator (П)
The projection eliminates all attributes of the input relation except
those mentioned in the projection list.
The projection method defines a relation that contains a vertical
subset of a Relation.
This helps to extract the values of specified attributes and eliminates
duplicate values.
(П) is the symbol used to choose attributes from a relation.
This operation helps you to keep specific columns from a relation and
discards the other columns.
pf3

Partial preview of the text

Download Discrete Mathematics - Relational Algebra Notes | Khalsa College Mohali and more Summaries Discrete Mathematics in PDF only on Docsity!

Relational Algebra

  • Relational algebra is a widely used procedural query language.
  • It collects instances of relations as input and gives occurrences of relations as output.
  • It uses various operations to perform this action.
  • Relational algebra operations are performed recursively on a relation.
  • The output of these operations is a new relation, which might be formed from one or more input relations.

Fundamental Operations in Relational Algebra

1. Selection Operator (σ)

  • The SELECT operation is used for selecting a subset of the tuples according to a given selection condition.
  • Sigma (σ) symbol denotes it.
  • It is used as an expression to choose tuples which meet the selection condition.
  • Select operation selects tuples that satisfy a given predicate. 2. Projection Operator (П)
  • The projection eliminates all attributes of the input relation except those mentioned in the projection list.
  • The projection method defines a relation that contains a vertical subset of a Relation.
  • This helps to extract the values of specified attributes and eliminates duplicate values.
  • (П) is the symbol used to choose attributes from a relation.
  • This operation helps you to keep specific columns from a relation and discards the other columns.

3. Union Operator (U) - UNION is symbolized by ∪ symbol. - It includes all tuples that are in tables A or in B. - It also eliminates duplicate tuples. - So, set A UNION set B would be expressed as: Result <- A ∪ B - For a union operation to be valid: R and S must have the same number of attributes; attribute domains need to be compatible; duplicate tuples should be automatically removed. 4. Intersection Operator (∩) - An intersection is defined by the symbol ∩. - For example: A ∩ B - It defines a relation consisting of a set of all tuples that are in both A and B. However, A and B must be union-compatible. 5. Cartesian Product (X) - This type of operation is helpful to merge columns from two relations. - Generally, a Cartesian product is never a meaningful operation when it performs alone. - However, it becomes meaningful when it is followed by other operations. - Cartesian Product operation is denoted by X. 6. Join Operation ( ⋈) - Join operation is essentially a Cartesian product followed by a selection criterion. - Join operation is denoted by ⋈. - JOIN operation also allows joining variously related tuples from different relations.