Relational calculs in DBMS|types of relational calculs

0

 

Relational calculs in DBMS/Database(DBMS relational calculs)


In database management systems, the relational calculus is a formal language used to query a database. It was developed by Edgar F. Codd as part of his relational model of data.

Relational Calculus in database management system (DBMS) is all about "What you want ?". Relational calculus does not tell us how to get the results from the Database, but it just cares about what we want.

The theory of Relational calculus was introduced by computer scientist and mathematician Edgar Codd. Let's deep dive and try to understand Relational calculus.


DBMS relational calculs SKILLS ARENA


What is Relational Calculus?


Before understanding Relational calculus in DBMS, we need to understand Procedural Language and Declarative Langauge.

Procedural Language - Those Languages which clearly define how to get the required results from the Database are called Procedural Language. Relational algebra is a Procedural Language.


Declarative Language - Those Language that only cares about What to get from the database without getting into how to get the results are called Declarative Language. Relational Calculus is a Declarative Language.


So Relational Calculus is a Declarative Language that uses Predicate Logic or First-Order Logic to determine the results from Database.


Types of relational calculs in dbms


There are two types of relational calculus:


Tuple relational calculus: 

This is a non-procedural language that specifies what must be in the output, rather than how to compute it. An example of a tuple relational calculus query is: "Find all pairs (x, y) such that x is a customer and y is a product purchased by that customer."


Domain relational calculus: 

This is a more expressive version of tuple relational calculus that allows variables to range over multiple tuples. An example of a domain relational calculus query is: "Find all customers who have purchased all products in the 'Toys' category."


Both tuple and domain relational calculus are considered to be high-level languages, as they allow the user to describe the desired output in terms of the data itself, rather than specifying low-level implementation details.



______________________________________



Please share this post and blog link with your friends.For more programs use this blog.


If you have any problem, please comment in comment box, subscribe this blog for notifications of new post on your email and follow this blog.If you have any method of this program or want to give any suggestion send email on hc78326@gmail.com


Created by-- HARSH CHAUHAN


Post a Comment

0Comments
Post a Comment (0)