Domain Relational Calculus in DBMS

Domain Relational Calculus in DBMS

In this article, we will learn about Domain Relational Calculus in DBMS. Relational algebra specifies procedures and methods to fetch data hence is called as a procedural query language ,whereas relational calculus is a non procedural query language focuses on just fetching data rather than how the query will work and how data will be fetched.

Domain relational calculus in DBMS
  • Relational algebra specifies procedures and methods to fetch data hence is called as a procedural query language ,whereas relational calculus is a non procedural query language focuses on just fetching data rather than how the query will work and how data will be fetched.
  • Simply relational calculus is nothing but focusing on what to do rather than focusing on how to do.

Relational calculus is present in two formats 

Domain Relational Calculus in DBMS

DRC in DBMS 

  • In Domain relational calculus filtering of records is done based on the domain of the attributes rather than tuple values 
  • A domain is nothing but the set of allowed values in the column of a table 

Syntax: 

{ c1, c2, c3, ..., cn | F(c1, c2, c3, ... ,cn)} 

where, c1, c2… etc represents the domain of attributes(columns) and F represents the formula including the condition for fetching the data. 

Example 1

{< name, age > | ∈ Studentage <21} 

Again, the above query will return the names and ages of the students in the table Student who not greater than 21 years old 

Example 2

{< Fname, Emp_ID > | ∈ EmployeeSalary > 10000} 

The result here will be returning the Fname and Emp_ID values for all the rows in the employee table where salary is greater than 10000.

Prime Course Trailer

Related Banners

Get PrepInsta Prime & get Access to all 200+ courses offered by PrepInsta in One Subscription

Get over 200+ course One Subscription

Courses like AI/ML, Cloud Computing, Ethical Hacking, C, C++, Java, Python, DSA (All Languages), Competitive Coding (All Languages), TCS, Infosys, Wipro, Amazon, DBMS, SQL and others

Checkout list of all the video courses in PrepInsta Prime Subscription

Checkout list of all the video courses in PrepInsta Prime Subscription