Question
1 As Dr. Chen has emphasized since Module 3, to write SQL code for a given query question (List.... ) , the FIRST thing that
1 As Dr. Chen has emphasized since Module 3, to write SQL code for a given query question ("List.... ") , the FIRST thing that needs to be figured out correctly is
____________________. 1. What are the differences between a non-correlated subquery and a correlated subquery. How can you tell a subquery is correlated.
Show examples.
2 (a). If you want to show attributes from different tables in query result, can you still use subquery to do it? (No or Maybe?) (b). Try to use only subquery structure (not to use JOIN) for this query: List the ID, name of each employee and his/her project workload (hours spent on project). ( hint: using corelated subquery at select clause)
3. State a query question that can be solved by using both JOIN and Subquery. Show (a) query question (List..); (b) SQL code using JOIN; and (c) SQL code using subquery. Do not use examples that were already discussed in lecture video. Your query case must be based on the tables used for learning SQL in this class.
4. Do a google search to see what people say about performance comparison between using JOIN vs using Subquery. Briefly describe what you find - which strategy is faster/better? Assuming a query can be done by both.
5. (review question): Show an example of a real world table (not the one discussed in ppt/videos of Module 2) that is in 2NF but not in 3NF. Give your explanation.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started