Question: Show the result of the sample query as it would apply to the database state in Figure 3 . 6 Must be answered in writing

Show the result of the sample query as it would apply to the database state in Figure 3.6
Must be answered in writing not with an image of the query.
Query 6. Retrieve the names of employees who have no dependents.
This is an example of the type of query that uses the MINUS (SET DIFFERENCE) operation.
ALL_EMPS \pi Ssn(EMPLOYEE)
EMPS_WITH_DEPS(Ssn)\pi Essn(DEPENDENT) EMPS_WITHOUT_DEPS (ALL_EMPS EMPS_WITH_DEPS) RESULT \pi Lname, Fname(EMPS_WITHOUT_DEPS * EMPLOYEE)
We first retrieve a relation with all employee Ssns in ALL_EMPS. Then we create a table with the Ssns of employees who have at least one dependent in EMPS_WITH_DEPS. Then we apply the SET DIFFERENCE operation to retrieve employees Ssns with no dependents in EMPS_WITHOUT_DEPS, and finally join this with EMPLOYEE to retrieve the desired attributes. As a single in-line expression, this query becomes:
 Show the result of the sample query as it would apply

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!