The Gateway to Computer Science Excellence
0 votes
55 views

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 by Active (1.2k points) | 55 views
0

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
Please edit the question, type the required text instead of screenshot.

please avoid unnecessary usage of screenshots !
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
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.

Please log in or register to answer this question.

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,737 questions
57,322 answers
198,394 comments
105,144 users