Skip to content
Related Articles

Related Articles

Difference between Relational Algebra and Relational Calculus
  • Difficulty Level : Basic
  • Last Updated : 22 May, 2019

Both Relational Algebra and Relational Calculus are the formal query languages.

Relational Algebra:
Relational Algebra is a Procedural language. In Relational Algebra, The order is specified in which the operations have to be performed. In Relation Algebra frameworks are created to implement the queries. The basic operation included in relational algebra are:

1. Select (σ)
2. Project (Π)
3. Union (U)
4. Set Difference (-)
5. Cartesian product (X)
6. Rename (ρ) 

Relational Calculus:
Relational Calculus is the formal query language. It also known as Declarative language. In Relational Calculus, The order is not specified in which the operation have to be performed. Relational Calculus means what result we have to obtain.
Relational Calculus has two variations:

  1. Tuple Relational Calculus (TRC)
  2. Domain Relational Calculus (DRC)

Relational Calculus is denoted as:

{ t | P(t) }

Where,
t: the set of tuples
p: is the condition which is true for the given set of tuples.

Difference between Relational Algebra and Relational Calculus:



S.NO Relational Algebra Relational Calculus
1. It is a Procedural language. While Relational Calculus is Declarative language.
2. Relational Algebra means how to obtain the result. While Relational Calculus means what result we have to obtain.
3. In Relational Algebra, The order is specified in which the operations have to be performed. While in Relational Calculus, The order is not specified.
4. Relational Algebra is independent on domain. While Relation Calculus can be a domain dependent.
5. Relational Algebra is nearer to a programming language. While Relational Calculus is not nearer to programming language.

Attention reader! Don’t stop learning now. Get hold of all the important CS Theory concepts for SDE interviews with the CS Theory Course at a student-friendly price and become industry ready.

My Personal Notes arrow_drop_up
Recommended Articles
Page :