Lesson 6 Flashcards
alias
An alternative name for a column or table in a SQL statement.
ALTER TABLE
The SQL command used to make changes to table structure. When the command is followed by a keyword (ADD or MODIFY), it adds a column or changes column characteristics.
AND
The SQL logical operator used to link multiple conditional expressions in a WHERE or HAVING clause. It requires that all conditional expressions evaluate to true.
AVG
A SQL aggregate function that outputs the mean average for a specified column or expression.
BETWEEN
In SQL, a special comparison operator used to check whether a value is within a range of specified values.
Boolean algebra
A branch of mathematics that uses the logical operators OR, AND, and NOT.
cascading order sequence
A nested ordering sequence for a set of rows, such as a list in which all last names are alphabetically ordered and, within the last names, all first names are ordered.
COMMIT
The SQL command that permanently writes data changes to a database.
COUNT
A SQL aggregate function that outputs the number of rows containing not null values for a given column or expression, sometimes used in conjunction with the DISTINCT clause.
CREATE INDEX
A SQL command that creates indexes on the basis of a selected attribute or attributes.
CREATE TABLE
A SQL command that creates a table’s structures using the characteristics and attributes given.
DELETE
A SQL command that allows data rows to be deleted from a table.
DISTINCT
A SQL clause that produces only a list of values that are different from one another.
DROP INDEX
A SQL command that permanently deletes an index.
DROP TABLE
A SQL command that permanently deletes a table and its data.
EXISTS
In SQL, a comparison operator that checks whether a subquery returns any rows.
FROM
A SQL clause that specifies the table or tables from which data is to be retrieved.
GROUP BY
A SQL clause used to create frequency distributions when combined with any of the aggregate functions in a SELECT statement.
HAVING
A clause applied to the output of a GROUP BY operation to restrict selected rows.
IN
In SQL, a comparison operator used to check whether a value is among a list of specified values.
inner query
A query that is embedded or nested inside another query. Also known as a nested query or a subquery.
INSERT
A SQL command that allows the insertion of one or more data rows into a table.
IS NULL
In SQL, a comparison operator used to check whether an attribute has a value.
LIKE
In SQL, a comparison operator used to check whether an attribute’s text value matches a specified string pattern.
MAX
A SQL aggregate function that yields the maximum attribute value in a given column.
MIN
A SQL aggregate function that yields the minimum attribute value in a given column.
nested query
In SQL, a query that is embedded in another query.
NOT
A SQL logical operator that negates a given predicate.
OR
The SQL logical operator used to link multiple conditional expressions in a WHERE or HAVING clause. It requires only one of the conditional expressions to be true.
ORDER BY
A SQL clause that is useful for ordering the output of a SELECT query (for example, in ascending or descending order).
ROLLBACK
A SQL command that restores the database table contents to the condition that existed after the last COMMIT statement.
rules of precedence
- Basic algebraic rules that specify the order in which operations are performed.
- For example, operations within parentheses are executed first, so in the equation 2 + (3 * 5), the multiplication portion is calculated first, making the correct answer 17.
subquery
A query that is embedded (or nested) inside another query. Also known as a nested query or an inner query.
SUM
A SQL aggregate function that yields the sum of all values for a given column or expression.
UPDATE
A SQL command that allows attribute values to be changed in one or more rows of a table.
WHERE
A SQL clause that adds conditional restrictions to a SELECT statement that limit the rows returned by the query.
wildcard character
A symbol that can be used as a general substitute for: (1) all columns in a table (*) when used in an attribute list of a SELECT statement or, (2) zero or more characters in a SQL LIKE clause condition ( % and _ ).
SQL commands can be divided into two overall categories: _______ and ______ commands.
- Data definition languauge (DDL)
- Data manipulation language (DML)
The basic DML commands are:
- SELECT
- INSERT
- UPDATE
- DELETE
- COMMIT
- ROLLBACK
The basic data definition commands allow you to create tables and indexes. Many SQL constraints can be used with columns. The commands are:
- CREATE TABLE
- CREATE INDEX
- ALTER TABLE
- DROP TABLE
- DROP INDEX
The ANSI prescribes a standard SQL-the current fully approved version is known as SQL 07. (T/F)
False
You can select partial table contents by naming the desired fields and by placing restrictions on the rows to be included in the output. (T/F)
True
The ______ command, coupled with appropriate search conditions, is an incredibly powerful tool that enables a user to transform data into information.
SELECT
The conditional LIKE should be used in conjunction with wildcard characters. (T/F)
True
A database language enables the user to perform complex queries designed to transform the raw data into useful information. (T/F)
True
The special operator used to check whether a subquery returns any rows is _____.
EXISTS
According to the rules of precedence, which of the following computations should be completed first?
Performing operations within parentheses
The SQL command that allows a user to permanently save data changes is _____.
COMMIT
In SQL, all _______ expressions evaluate to true or false.
conditional or boolean
A database language enables the user to create database and table structures to perform basic data management chores. (T/F)
True
The SQL data manipulation command HAVING:
restricts the selection of grouped rows based on a condition.
String comparisons are made from left to right. (T/F)
True
To make the output more readable, the SQL standard permits the use of aliases for any column in a ______ statement.
SELECT
Which operator is used to check whether an attribute value lies within two bounds?
BETWEEN
The SQL command that allows a user to list the contents of a table is _____.
SELECT
Date procedures are often more software-specific than other SQL procedures. (T/F)
True
A _______ order sequence is a multilevel ordered sequence that can be created easily by listing several attributes, separated by commas, after the ORDER BY clause.
cascading
Oracle users can use the Access QBE (query by example) query generator. (T/F)
False
The _____ special operator is used to check whether an attribute value is null.
IS NULL
SQL allows the use of logical restrictions on its inquiries such as OR, AND, and NOT. (T/F)
True
ANSI-standard SQL allows the use of special operators in conjunction with the WHERE clause. (T/F)
True
The basic SQL vocabulary has fewer than _____ words.
hundred
The ANSI SQL standards are also accepted by the ISO. (T/F)
True
SQL is considered difficult to learn; its command set has a vocabulary of more than 300 words. (T/F)
False
Mathematical operators cannot be used to place restrictions on character-based attributes. (T/F)
False
A specialty field in mathematics, known as ______ algebra, is dedicated to the use of logical operators.
Boolean
A(n) _____ is an alternate name given to a column or table in any SQL statement.
alias
The SQL command that allows a user to insert rows into a table is _____.
INSERT
The special operator used to check whether an attribute value matches a given string pattern is _____.
LIKE
Most SQL implementations yield case-insensitive searches. (T/F)
False
Some RDBMSs, such as Microsoft Access, automatically make the necessary conversions to eliminate case sensitivity. (T/F)
True
In the SQL environment, the word _____ covers both questions and actions.
query