Mastering Database Management

0 of 78 lessons complete (0%)

Relational Models

Relational Calculus

You don’t have access to this lesson

Please register or sign in to access the course content.

Tuple Relational Calculus

 Filtering variable ranges over tuples.

 Notation − {T | Condition}

 Returns all tuples T that satisfies a condition.

 For example −

 { |  Author(T) AND T.article = 'database' }

 Output − Returns tuples with ‘name’ from Author who has written article on ‘database’.

Domain Relational Calculus (DRC)

 In DRC, the filtering variable uses the domain of attributes instead of entire tuple values (as done in TRC, mentioned above).


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

 Where a1, a2 are attributes and P stands for formulae built by inner attributes.

 For example −  {< article, page, subject > |  ∈ Sahoo ∧ subject = 'database'}

 Output − Yields Article, Page, and Subject from the relation Sahoo, where subject is database.