The Gateway to Computer Science Excellence
0 votes
79 views

What is the correct interpretion of this query

in Databases by Loyal (7.8k points) | 79 views
0
Is ESSN(and not SSN) not the second attribute in Employee Relation Schema?
0
Anyway, Result will contain the name of employees who are managers but no one is dependent on them. (Employess with SSN, who are having entry in MGRSSN of department but Not having in ESSN of Dependent)
0
m not getting the C<-----------A-B part pls explainby taking example
0
Well think of it as:

Let say, A has IDs of All the employees who are managers, while B has IDs of all the employees who has someone dependent upon them. Then C = A-B, will simply contain all the managers upon whom no one is dependent.

1 Answer

0 votes

A, B and C are temprary variables

All the MGRSSN will be stored in A from Department table under the column name SSN.
All the ESSN will be stored in B from Dependent table under the column name SSN. So that the set difference can be calculated further.

C <-- A-B 

C will store those MGRSSN who don't have any dependent.

There is natural join of employee with C, it means the names of those employees who are manager and don't have any dependent will be stored in the Result variable.

by Boss (44.1k points)
edited

Related questions

0 votes
1 answer
1
asked Jun 7, 2019 in Databases by ushamya Junior (529 points) | 242 views
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,297 answers
198,265 comments
104,979 users