Quiz


1:

A Cartesian product

  1. represents all possible combinations of rows in two or more tables

  2. represents the combinations of matching rows from two or more tables

  3. represents the rows from one table matched with rows from a second table; where this is not possible, the result row is filled with NULL s where the data from the second table would have been

  4. none of the above

2:

A left join

  1. represents all possible combinations of rows in two or more tables

  2. represents the combinations of matching rows from two or more tables

  3. represents the rows from one table matched with rows from a second table; where this is not possible, the result row is filled with NULL s where the data from the second table would have been

  4. none of the above

3:

An equijoin :

  1. represents all possible combinations of rows in two or more tables

  2. represents the combinations of matching rows from two or more tables

  3. represents the rows from one table matched with rows from a second table; where this is not possible, the result row is filled with NULL s where the data from the second table would have been

  4. none of the above

4:

A correlated subquery is called this because

  1. it correlates rows between tables

  2. it correlates rows in a single table

  3. it correlates two joins

  4. it correlates the rows in an outer query with rows in an inner query

5:

The difference between the two queries marked 5.1 and 5.2 in the following text is that

  1. there is no difference

  2. they return different data

  3. they return the same data but the left join (Query 5.1) is likely to execute faster

  4. they return the same data but the subquery (Query 5.2) is likely to execute faster

Query 5.1:

 
 select employee.name from employee left join assignment on employee.employeeID = assignment.employeeID where clientID is null; 

Query 5.2:

 
 select e.name, e.employeeID from employee e where not exists           (select *            from assignment            where employeeID = e.employeeID); 



MySQL Tutorial
MySQL Tutorial
ISBN: 0672325845
EAN: 2147483647
Year: 2003
Pages: 261

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net