# Difference between Tuple Relational Calculus (TRC) and Domain Relational Calculus (DRC)

**1. Tuple Relational Calculus (TRC) :**

A tuple relational calculus is a non procedural query language which specifies to select the tuples in a relation. It can select the tuples with range of values or tuples for certain attribute values etc. The resulting relation can have one or more tuples.

Notation :{T | P (T)} or {T | Condition (T)}

-where T is resulting tuples and P(T) is a condition used to fetch T.

**Example :**

{T | EMPLOYEE (T) AND T.DEPT_ID = 10}

This select all the tuples of employee name who work for Department 10.

**2. Domain Relational Calculus (DRC) :**

A domain relational calculus uses list of attribute to be selected from the relation based on the condition. It is same as TRC, but differs by selecting the attributes rather than selecting whole tuples.

Notation :{ a1, a2, a3, ..., an | P (a1, a2, a3, ..., an) }

-Where a1, a2, a3, … an are attributes of the relation and P is the condition.

**Example :**

{ | < EMPLOYEE > DEPT_ID = 10 }

select EMP_ID and EMP_NAME of employees who work for department 10.

**Difference between Tuple Relational Calculus (TRC) and Domain Relational Calculus (DRC) :**

Tuple Relational Calculus (TRC) | Domain Relational Calculus (DRC) |
---|---|

In TRS, the variables represent the tuples from specified relation. | In DRS, the variables represent the value drawn from specified domain. |

A tuple is a single element of relation.In database term, it is a row. | A domain is equivalent to column data type and any constraints on value of data. |

In this filtering variable uses tuple of relation. | In this filtering is done based on the domain of attributes. |

Notation : {T | P (T)} or {T | Condition (T)} |
Notation : { a1, a2, a3, …, an | P (a1, a2, a3, …, an)} |

Example : {T | EMPLOYEE (T) AND T.DEPT_ID = 10} |
Example : { | < EMPLOYEE > DEPT_ID = 10 } |

Don’t stop now and take your learning to the next level. Learn all the important concepts of Data Structures and Algorithms with the help of the most trusted course: **DSA Self Paced**. Become industry ready at a student-friendly price.

## Recommended Posts:

- Domain Relational Calculus in DBMS
- Difference between Relational Algebra and Relational Calculus
- Tuple Relational Calculus (TRC) in DBMS
- Difference between Relational database and NoSQL
- Difference between Relational operator(==) and std::string::compare() in C++
- Difference between E-R Model and Relational Model in DBMS
- Difference between Relational model and Document Model
- Properties of Relational Decomposition
- Anomalies in Relational Model
- Relational Model in DBMS
- Basic Operators in Relational Algebra
- Extended Operators in Relational Algebra
- Violation of constraints in relational database
- Query Optimization in Relational Algebra
- Introduction of Relational Algebra in DBMS
- Set Theory Operations in Relational Algebra
- SELECT Operation in Relational Algebra
- Constraints on Relational database model
- PROJECT Operation in Relational Algebra
- RENAME (ρ) Operation in Relational Algebra

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.