The following relation records the age of 500 employees of a company, where empNo (Indicating the employee number) is the key: empAge(empNo, age) Consider the following relational algebra expression: πempNo(empAge ⋈ (age>age1) ρempNo 1, age1(empAge)) What does the above expression generate?
The following relation records the age of 500 employees of a company, where empNo (Indicating the employee number) is the key: empAge(empNo, age) Consider the following relational algebra expression: πempNo(empAge ⋈ (age>age1) ρempNo 1, age1(empAge)) What does the above expression generate? Correct Answer Employee numbers of all employees whose age is not the minimum.
Answer: Option 2
Explanation:
Consider the empAge(empNo, age) Table
|
empNo |
age |
|
100 |
22 |
|
101 |
21 |
|
102 |
23 |
|
103 |
24 |
|
104 |
25 |
|
105 |
26 |
|
200 |
22 |
|
201 |
21 |
|
202 |
23 |
|
203 |
24 |
|
204 |
25 |
|
205 |
26 |
|
206 |
27 |
We run the following Query on above Table
IIempNo(empAge ⋈ (age>age1) ρempNo 1, age1(empAge))
We get Output Table as
|
empNo |
|
100 |
|
102 |
|
103 |
|
104 |
|
105 |
|
200 |
|
202 |
|
203 |
|
204 |
|
205 |
|
206 |
Hence the Output is "Employees whose age greater than at least one employee" or "Employees whose age is no minimum".