What is a Join?
A relational operation that causes two or more tables with a common domain to be combined into a single table or view.
What is Equi-join?
A join in which the joining condition is based on equality between values in the common columns; common columns appear redundantly in the result table
What is Natural join?
An equi-join in which one of the duplicate columns is eliminated in the result table.
What are usually the common columns in joined tables?
Usually the primary key of the dominant table and the foreign key of the dependent table in 1:M relationships.
What is Outer join?
A join in which rows that do not have matching values in common columns are nonetheless included in the result table (as opposed to inner join, in which rows must have matching values in order to appear in the result table)
What is Union join?
Includes all data from each table that was joined
Example of different join types
What is a subquery?
Placing an inner query (SELECT statement) inside an outer query
What are the options for using a subquery?
What are the two options for a subquerie?
Noncorrelated
Correlated
What is a noncorrelated subquerie?
Executed once for the entire outer query
What is a correlated subquerie?
Executed once for each row returned by the outer query
What are the traits of a noncorrelated subquerie?
What are the traits of a correlated subquerie?
What is a union querie?
Combine the output (union of multiple queries) together into a single result table
Why would it be useful to combine queries, through the use of Views?
Because production databases contain hundreds or even thousands of tables, and tables could include hundreds of columns.
What can you do if you use a view (which is a query)?
You could have another query that uses the view as if it were a table.
What are some tips for developing queries?
What are some considerations for Query efficiency?
What are some guidelines for better query design?
What are some more guidelines for better query design?
What is transaction?
A discrete unit of work that must be completely processed or not processed at all
What are the SQL commands for transactions?
What are data dictionary facilities?