Page 1 of 1

I want the solution to be handwritten, please

Posted: Mon Jun 06, 2022 4:45 pm
by answerhappygod
I want the solution to be handwritten,
please
I Want The Solution To Be Handwritten Please 1
I Want The Solution To Be Handwritten Please 1 (119.81 KiB) Viewed 29 times
I Want The Solution To Be Handwritten Please 2
I Want The Solution To Be Handwritten Please 2 (128.59 KiB) Viewed 29 times
For the following schema: EMPLOYEE Fname Minit Lname Ssn Bdate DEPARTMENT Dname Dnumber Mgr_ssn Mgr_start_date DEPT_LOCATIONS Dnumber Dlocation PROJECT Pname Pnumber Plocation Dnum WORKS ON Essn Pno Hours DEPENDENT Essn Dependent_name Sex Bdate Relationship Consider The Following SQL queries Address Sex Salary Super_ssn Dno

Q4: (SELECT DISTINCT Pnumber FROM PROJECT, DEPARTMENT, EMPLOYEE WHERE Dnum=Dnumber AND Mgr_ssn=Ssn AND Lname='Smith') UNION (SELECT DISTINCT Pnumber FROM PROJECT, WORKS_ON, EMPLOYEE WHERE Pnumber=Pno AND Essn=Ssn AND Lname='Smith' ); Q5: SELECT Pnumber, Pname, COUNT (*) FROM PROJECT, WORKS_ON, EMPLOYEE WHERE Pnumber=Pno AND Ssn Essn AND Dno=5 GROUP BY Pnumber, Pname; (a) Draw the canonical query trees for each of these queries. (b) Show how the query tree is optimized for each of these quires using Heuristics in Query Optimization.