The Gateway to Computer Science Excellence
0 votes
Consider the following database schema where the primary keys are underlined.

                 Employee(EId, EName, ESal, PId)
                 Project(PId, PName, PDeadline, PBudget).

Which of the following is the most optimized query while retrieving employee names whose salary is more than 1000 and are allocated in a project has a budget more than 50000?

1. ΠEName(σESal>1000∧PBudget>50000(Employee⋈PIdProject)
2. ΠEName((σESal>1000(Employee))⋈PId(σPBudget>50000(Project)))
3. ΠEName(ΠEName,ESal,PId(σESal>1000(Employee))⋈PIdΠPId,PBudget(σPBudget>50000   (Project)))
4. ΠEName(ΠEName,PId(σESal>1000(Employee))⋈PIdΠPId(σPBudget>50000(Project)))
in Databases by (249 points) | 346 views

Please log in or register to answer this question.

Related questions

Quick search syntax
tags tag:apple
author user:martin
title title:apple
content content:apple
exclude -tag:apple
force match +apple
views views:100
score score:10
answers answers:2
is accepted isaccepted:true
is closed isclosed:true
50,645 questions
56,617 answers
102,350 users