in Databases
704 views
0 votes
0 votes

Suppose there are two tuples in Animals relation with different IDs but of same type and in Adoption table there is a tuple with an ID that matches with the  ID of first tuple in Animal relation. AND during the query evaluation, the type of first tuple of the animal relation will not be selected whereas the SQL query will select type of second tuple of animal relation as there is no tuple in ADoption that have same Id as of second tuple of Animal relation . 

Hence this is wrong to say that Distinct type of animals will be selected who have not had any adoption? right?

 

I know my answer is wrong here for the case when all Ids of the same type are also present in Adoption table . but the thing is given answer is also wrong here. 

Correct me if i’m wrong.

in Databases
704 views

4 Comments

Hence this is wrong to say that Distinct type of animals will be selected who have not had any adoption? right?

yes, they given wrong answer.

 

Simply the query returns

Distinct Types of the animals which there should be atleast one animal is not adopted !

     or

Distinct Types of the animals which all animals of that type are not adopted !

0
0
Please edit the question, type the required text instead of screenshot.

please avoid unnecessary usage of screenshots !
0
0
I don't know what's the problem here but really brother it is very helpful to post a screenshot than typing the whole question as it saves more time and removes any confusion to readers :)

Thanks for ur answer.
0
0
we can't find duplicates if you post screen shots....

there are more number of questions already present in GO, there is a high probability ( due most of the persons posting test series questions which are repeated by test series organizations ) that your question already been asked, and answered by someone.
0
0

Please log in or register to answer this question.

Related questions