Execute the following two SQLs and draw the query tree for each SQL. Explain what kinds of join methods are used in each query tree. Explain why one outperforms the other.
#1 .SELECT E.emp_no, E.first_name, E.last_name
FROM employees E
WHERE EXISTS ( SELECT S.emp_no
FROM salaries S WHERE S.emp_no = E.emp_no
INTERSECT SELECT DM.emp_no
FROM dept_manager DM
WHERE DM.emp_no = E.emp_no);
#2.SELECT DISTINCT E.emp_no, E.first_name, E.last_name
FROM employees E, salaries S, dept_manager DM
WHERE S.emp_no = E.emp_no AND DM.emp_no = E.emp_no
Recently Asked Questions
- Name six roles that may be found in a typical systems development project and describe the responsibilities of each role.
- In a PRINCE2® project structure there are formal committees, a project board and specific roles. What is your opinion about the value of this kind of
- 1.According to the State Board of Nursing in your state, what is the Registered Nurses responsibility in treating a patient’s pain? 2 Based on the laws of