**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 } |

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.

## Recommended Posts:

- Tuple Relational Calculus (TRC) in DBMS
- Difference between Relational Algebra and Relational Calculus
- Domain Relational Calculus in DBMS
- Collision Domain and Broadcast Domain in Computer Network
- Difference between Domain and Workgroup
- Difference between .net and .org domain
- Difference between .com and .net domain
- Difference between .com and .org domain
- Difference Between Trademark and Domain Name
- Difference between Relational operator(==) and std::string::compare() in C++
- Difference between Relational model and Document Model
- Difference between Relational database and NoSQL
- Difference between CouchDB and Relational Database
- Difference between Hierarchical and Relational data model
- Difference between Network and Relational data model
- Difference between Hierarchical, Network and Relational Data Model
- Difference between E-R Model and Relational Model in DBMS
- Python | Difference Between List and Tuple
- How to get protocol, domain and port from URL using JavaScript ?
- Domain Resolution and URL Processing

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.