EXAM 2 (Mods 3-5) Flashcards
What is the computer’s order of execution for the select statement clauses?
1: FROM
2: WHERE
3: GROUP BY
4: HAVING
5: SELECT
6: ORDER BY
What does CRUD stand for?
Create, Read, Update, Delete
Do the Select statement commands/clauses fall within DML, QL, or DDL
QL
What is the meaning of the following Reg expression operator;
<>
not equal
Which “optional” SELECT clause is mandatory for data aggregation?
GROUP BY
Which select statement clause(s) support aliases?
all but WHERE
Which clause(s) don’t support aggregate functions?
WHERE & FROM
What are the three purposes of the select statement and the associated clause responsible for each?
1) Projection -> SELECT
2) Selection -> WHERE
3) Join -> FROM (implicit)
What are the two main join syntax styles in SQL?
Implicit- FROM/WHERE
Explicit- <”some join type”> JOIN ON
How are tables most commonly joined
Equi joins on Pk-Fk
Can outer joins be only implicit or only explicit?
explicit
Which type of join will produce the fewest # of rows back?
Inner Join
What type of join does the FROM/WHERE syntax perform?
inner
If you want to preserve the rows of the second table in your join, which type should you use? Which table’s null fields will be included in the output?
RIGHT OUTER
The first/left table
What type of join will the following statement produce?
Select *
From Table_1, Table_2
Cartesian Product
If table 1 had 200 rows and table 2 has 150 rows, how many rows will be returned from a FULL OUTER Join between the two tables?
200