Practice Test 3 Flashcards
Logical Constraints
rules of relational databases that ensure data is valid
A syntax error and error occurs when…
SQL is syntactically incorrect
INT
Whole integer value such as age
MySQL Command line interface
Text-based interface included in mySQL server
Data Transaction Language (DTL)
Can be used to roll back database changes
Database Control Language (DCL)
Used to manage/control database access (Grant, Revoke)
Which Database includes the world database during its installation?
MySQL
Data Manipulation Language (DML)
Used to manage data within databases (Select, Insert, Update, Delete)
Data Definition Language (DDL)
Used to manage and define database structures (Create, Alter, Drop, Truncate)
Data Query Language (DQL)
Used to query and retrieve data from a database (Select)
Operation order precedence
- exponentiation
- multplication/div
- add/sub
- comparison (=,<=,>=,etc)
- Between, when, case, then, else
- Not
- and
- OR
- SET =
Self Join
Table joins itself
Useful for comparing rows within the same table
Compares columns from left table to right table
=
Outer Join
Left/right outer join will return all the rows from the left/right table and only the matching rows from the other table.
Full outer join will return all rows if matching and Null values for the non matching rows
EquiJoin
combines rows that have equivalent values in specified columns
Used to combine rows form two or more tables based on a related column
Cross Join
Combines rows from both tables all into one new table
Outer query
Main query that can contain one or more subqueries(Nested queries)
Nested Query
Sub query that is a query within a query
Correlated Query
Sub query that references columns from the outer query
IN
allows you to specify multiple values in a WHERE clause
BETWEEN
Selects values within a given range
LIKE
used in a where clause to search for a specified value
OR
Used to combine multiple conditions in a WHERE clause
%
Used to represent zero or more characters when searching for a specified pattern using a LIKE operator