Use app×
Join Bloom Tuition
One on One Online Tuition
JEE MAIN 2025 Foundation Course
NEET 2025 Foundation Course
CLASS 12 FOUNDATION COURSE
CLASS 10 FOUNDATION COURSE
CLASS 9 FOUNDATION COURSE
CLASS 8 FOUNDATION COURSE
0 votes
270 views
in Programming by (101k points)
closed by

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?


1. Employee numbers of only those employees whose age is the maximum.
2. Employee numbers of all employees whose age is not the minimum.
3. Employee numbers of only those employees whose age is more than the age of exactly one other employee.
4. Employee numbers of all employees whose age is the minimum.

1 Answer

0 votes
by (102k points)
selected by
 
Best answer
Correct Answer - Option 2 : 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".

Welcome to Sarthaks eConnect: A unique platform where students can interact with teachers/experts/students to get solutions to their queries. Students (upto class 10+2) preparing for All Government Exams, CBSE Board Exam, ICSE Board Exam, State Board Exam, JEE (Mains+Advance) and NEET can ask questions from any subject and get quick answers by subject teachers/ experts/mentors/students.

Categories

...