1. Registered User
Join Date
Oct 2011
Posts
10

## Relational Algebra question

I am currently studying for an exam in relational algebra and have come across the following: Please note that all italic words are replacing the symbols that represent those words.

Schema:
EMPLOYEE: Number, Name, Age, Salary

Find the reg numbers of the supervisors of the employees earning more than 40k

Solution:

project Head(SUPERVISION join EMPLOYEE = Number(select salary > '40k' (EMPLOYEE)))

Before I seen the solution I had come up with the following:

R = project Number (select salary > '40k' (EMPLOYEE))

Can someone tell me if my original solution would be considered correct? If not, why does it differ from the given solution? This algebra is doing my head in!

2. Registered User
Join Date
Feb 2008
Location
Japan
Posts
3,483
Find the reg numbers of the supervisors of the employees earning more than 40k
Where is the information "the supervisors of the employees"?

3. Registered User
Join Date
Oct 2011
Posts
10
Sorry the supervisors are also employees should have specified that

4. Registered User
Join Date
Feb 2008
Location
Japan
Posts
3,483
the supervisors are also employees should have specified that
I'm not so well at English, so I couldn't ubderstand well the phrase "should have specified that".

Schema:
EMPLOYEE: Number, Name, Age, Salary

Find the reg numbers of the supervisors of the employees earning more than 40k

Solution:

project Head(SUPERVISION join EMPLOYEE = Number(select salary > '40k' (EMPLOYEE)))

Before I seen the solution I had come up with the following:

R = project Number (select salary > '40k' (EMPLOYEE))
And, it is not clear by what condition(s) to "Supervision join R".
There is no common column.
Last edited by tonkuma; 01-04-12 at 12:04.

5. Registered User
Join Date
Oct 2011
Posts
10
Relationship Schema:

Employee: Number, Name, Age, Salary
Supervision: Supervisor Number, Employee Number

Is this better?