Question: (h) (10 points) Two students attempted to write SQL statements to find the IDs of the employees participating in project 'Pl' but not 'P2 as

 (h) (10 points) Two students attempted to write SQL statements to

(h) (10 points) Two students attempted to write SQL statements to find the IDs of the employees participating in project 'Pl' but not 'P2 as follows: Q1: (select employee_ID from participation where project_name = 'P1') except (select employee_ID from participation where project_name = 'P2'); Q2: select distinct p1.employee_ID from participation as pi, participation as p2 where pi.project_name = 'Pi' and p2.project_name P2 and p1 employee_ID = P2. employee_ID: These students are not sure whether or not their statements are correct. Are their statements equivalent (i.e., guaranteed to always produce the same set of records)? If so, breifly explain the reason. If not, explain the reason using an example (i.e., an instance of the participation table on which the above queries will produce different results)

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!