Exercise 4
1 Tuple Relational Calculus
Based on the Company database from Exercise
1, propose tuple relational calculus expressions that represent the
following relation descriptions.
-
The first name of all employees that work in the department whose manager's
CPR no. is 654.
-
The CPR no. of all employees that were born before 1961-01-01 and work
on project InteractiveTV.
-
The complete names of all employees of department 10 who have to work for
more than 15 hours per week on project PalmTop.
2 Domain Relational Calculus
Also based on the company database, propose domain relational calculus
expressions that represent the following relation descriptions:
-
The number of all departments which have locations that are not allocated
any projects.
-
The CPR no. and dates of birth of all employees that are older than the
manager of their departments.
3 Relational Algebra
Identify relational algebra expressions that represent the relation descriptions
of Problems 1 and 2 above. Compute the relations obtained when the algebraic
expressions are evaluated on the Company database.
Best regards,
Kristian Torp