Relational Calculus
Types of Relational calculus:![]() 1. Tuple Relational Calculus (TRC)
Notation: Where T is the resulting tuples P(T) is the condition used to fetch T. For example: OUTPUT: This query selects the tuples from the AUTHOR relation. It returns a tuple with 'name' from Author who has written an article on 'database'. TRC (tuple relation calculus) can be quantified. In TRC, we can use Existential (∃) and Universal Quantifiers (∀). For example: Output: This query will yield the same result as the previous one. 2. Domain Relational Calculus (DRC)
Notation: Where a1, a2 are attributes For example: Output: This query will yield the article, page, and subject from the relational w3cschoool, where the subject is a database. Next TopicDBMS SQL Introduction
|