Week 6 Discussion

Week 6 Discussion - Week 6 Discussion Note # 1 by Prasanna...

Info iconThis preview shows pages 1–4. Sign up to view the full content.

View Full Document Right Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Week 6 Discussion Note # 1 by Prasanna Menta Note edited by Prasanna Menta on 10/19/2009 02:48PM Week 6 Read Chapter 9 Mannino Text before responding to the following: 1. Use examples from your lab projects to create sceanarios for outer joins (left, right and full). Attempt to write the SQL as well and make sure to post the SQL output for better understanding. 2. Expain nested query in your own words (Type 1 & 2). Make sure to use your tables from your lab project to support your response. 3. Truth Tables - How do you use for evaluating compound conditions? 4. Explain why the following equation may not be true if Column1 or Column2 contains null values: SUM(Column1) SUM(Column2) = SUM(Column1 Column2) Make sure to practice SQL from Chapter 9. Make use of SQL Scripts for chapter 9 available under course content area. Midterm is NEXT week - Study & Practice SQL. 10/15/2009 06:25AM Re: Week 6 Discussion Note # 3 by Magdalene Brownell Week 6 Read Chapter 9 Mannino Text before responding to the following: 1. Use examples from your lab projects to create sceanarios for outer joins (left, right and full). Attempt to write the SQL as well and make sure to post the SQL output for better understanding. An inner join discards all rows from the result table that dont have corresponding rows in both source tables. An outer join preserves unmatched rows and are left, right, and full. A full outer join retains unmatched rows from both tables. A left outer join retains unmatched rows from the left table. A right outer join retains unmatched rows from the right table. You have the following tables: Table1 Table2 Col1 Col1 Eggs Milk Ham Grapes Potatoes Potatoes Fruit FULL OUTER JOIN: SELECT*FROM Table1 FULL OUTER JOIN Table2.Col1 ON Table2.Col2; OUTPUT: Eggs Milk Ham Grapes Potatoes Potatoes Fruit Table1 Table2 Col1 Col1 Eggs Milk Ham Grapes Potatoes Potatoes Fruit RIGHT OUTER JOIN: SELECT*FROM Table1 RIGHT OUTER JOIN Table2.Col1 ON Table2.Col2; OUTPUT: Eggs Milk Ham Grapes Potatoes Fruit Table1 Table2 Col1 Col1 Eggs Milk Ham Grapes Potatoes Potatoes Fruit LEFT OUTER JOIN: SELECT*FROM Table1 LEFT OUTER JOIN Table2.Col1 ON Table2.Col2; OUTPUT: Eggs Milk Ham Grapes Potatoes Fruit 2. Explain nested query in your own words (Type 1 & 2). Make sure to use your tables from your lab project to support your response. Type 1 nested query 2 queries, 1 inner, 1 outer, and the inner does not reference the outer. Type 2 nested query 2 queries, 1 inner, 1 outer, and the inner does reference the outer 3. Truth Tables - How do you use for evaluating compound conditions? Compound conditions involve one or more simple conditions connected by BOOLEAN AND, OR, NOT. Truth tables are 3 (AND, OR, NOT) and internal cells are values (TRUE, FALSE, NULL). You may use truth tables to see how when you want to use a BOOLEAN operator in a compound condition what you ask for and what you get in terms of whether your answer will be TRUE, FALSE, or NULL....
View Full Document

Page1 / 38

Week 6 Discussion - Week 6 Discussion Note # 1 by Prasanna...

This preview shows document pages 1 - 4. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online