534 views
0 votes
0 votes

EMPLOYEE(Fname,Lname,Eno,Bdate,Address,Sex,Salary,Superssn,dno)

DEPENDENT(Eno,DFname,DLname,age)

Query1 :

Select Lname,Fname 

From employee E,dependent D

Where E.Eno = D.Eno and E.Fname = D.DFname 

 

Query 2 :

Select Lname , Fname 

From employee E

Where exists(Select * From dependent D Where E.Eno = D.Eno and E.Fname = D.DFname)

 

What about the complexity of two queries ?

Are they of same complexity? ( in terms of number of comparisons) 

 

 

 

 

Please log in or register to answer this question.

No related questions found