1,749 views
1 votes
1 votes
What is the difference between procedural query language and non-procedural query language? Why Relation algebra is called procedural and TRC is called non-procedural?

2 Answers

1 votes
1 votes

In simple words:

Relation Algebra is procedural because there we specify What we want, How we want the output with exact order of operations.

Where as Relational Calculus is a Abstract method for declaring Formal Lang. It just mentions What we want. It never describes how to compute that output.

Eg.

Relational Algebra

                                      $σsubject = "database" and   price = "50"(Books)$ 

Relational Calculus

                                     {${b.bookSubject | Books(b) \Lambda b.bookPrice = 50}$}

Output

Selects tuples from books where 'price' is 50. (RA)

Prints Subject of book having price 50. (RC)

edited by
0 votes
0 votes
procedural language means there is a procedure to get the output...

non-procedural language means there is no procedure to get the output...

in relational algebra, we are preparing the procedure to get the output ===> relational algebra is procedural language

 

in relational calculus, we are not preparing the procedure to get the output means some how we get the output but on output we select some tuples by giving conditions ===> relational calculus is non-procedural language

Related questions

0 votes
0 votes
1 answer
1