Mastering Database Management

0 of 79 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 ΓêÆ

 { T.name |  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).

 Notation ΓêÆ

 { 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.