edited by
776 views
1 votes
1 votes

$(e.Fname$|$ EMPLOYEE(e)\ AND\ ((\forall_{d})[ (DEPENDENT(d)\ AND\ d.ssn= e.ssn \ AND\ (d.sex='M'))\rightarrow (d.age>30))] )$ 

EMPLOYEE    
Fname SSn Sex
Ram 1 M
Shyam 2 M
Ravi 3 M
Sita 4 F
DEPENDENT    
SSN SEX AGE
1 M 35
1 F 25
1 M 15
2 M 50
2 F 13
3 F 20
4 F 24

on the basis of above instances of tables, which of the following option is true of output of above query??

  1. $Ram,Shyam,Ravi,Sita$
  2. $Shyam ,Ravi,Sita$
  3. $Shyam$
  4. $Empty$
edited by

1 Answer

Best answer
1 votes
1 votes

(∀d) [(DEPENDENT(d) AND d.ssn=e.ssn AND (d.ssn="M′))→d.age>30)

I HOPE IT'S MISTAKENLY TYPED. AND THE ORIGINAL ONE 

(∀d) [ DEPENDENT(d) AND d.ssn=e.ssn AND ( (d.sex='M′)  → ( d.age>30) ) ]

 

it means all dependents  of a employee

WHO ARE MALE should have their age as grater than 30 ( p->q form ) ------> satisfied by Shyam,ravi, sita

                    or it can be read as

 have their age less than 30 then they should not Male Dependents ( ~q->~p form ) ------> satisfied by Shyam,ravi, sita

 

if you didn't understand ===> recall p->q in preposition logic where it's truth value should be TRUE

 

∴ Option B is right

edited by

Related questions

1 votes
1 votes
0 answers
1
Ayush Upadhyaya asked Nov 28, 2018
419 views
Consider two relation schemas$R(A,B,C)$ and $S(D,E,F)$Give an expression in the tuple relational calculus that is equivalent to each of the following.(a)$\pi_A(r)$ ->$\{t...
1 votes
1 votes
0 answers
2
AnilGoudar asked Jan 11, 2018
472 views
How does the evaluation will be done?
0 votes
0 votes
0 answers
4
soumayan bandhu asked Dec 22, 2017
287 views
How to solve SQL problems related to subqueries quickly?Though I have concepts still I face some difficulties in solving this problems