Chapter Five Flashcards
(40 cards)
What are the benefits of a standardized relational language?
- Reduced training costs
- Productivity
- Application portability
- Application longevity
- Reduced dependence on a single vendor
- Cross-system communication
None
What is the processing order of Boolean operators by default?
NOT, then AND, then OR
None
What does the SQL SELECT statement do?
Used for queries on single or multiple tables
None
What are the main clauses of the SELECT statement?
- SELECT: List the columns to be returned
- FROM: Indicate the table(s) or view(s)
- WHERE: Indicate conditions for rows
- GROUP BY: Indicate categorization of results
- HAVING: Conditions for categories
- ORDER BY: Sort results according to criteria
None
What is an alias in SQL?
An alternative column or table name
None
Fill in the blank: Comparison operators include =, >, >=, <, <=, <> and _______.
!=
None
What is the purpose of the GROUP BY clause?
To categorize results for use with aggregate functions
None
What is the purpose of the HAVING clause?
Qualifying results by categories, operates on groups, not individual rows
None
What does the MERGE statement do in SQL?
Easier to update a table, combines Insert and Update in one statement
None
What is the function of the DELETE statement?
Removes rows from a table
None
What are the major CREATE statements in Data Definition Language (DDL)?
- CREATE SCHEMA
- CREATE TABLE
- CREATE VIEW
None
What types of data can be defined in SQL?
- Strings: CHARACTER, VARYING CHARACTER
- Binary: BLOB
- Number: Numeric, Decimal, Integer
- Temporal: Timestamp
- Boolean: True or False
None
What is the role of Data Definition Language (DDL)?
Commands that define a database, including creating, altering, and dropping tables
None
What does the UPDATE statement do?
Modifies data in existing rows
None
What does the ALTER TABLE statement allow you to do?
Change column specifications in a table
None
What is the purpose of the DROP TABLE statement?
Removes tables from your schema
None
What does the INSERT statement do?
Adds one or more rows to a table
None
What is referential integrity in SQL?
Constraint ensuring foreign key values must match primary key values in related tables
None
What are the steps in table creation?
- Identify data types for attributes
- Identify columns that can/cannot be null
- Identify unique columns
- Identify primary key–foreign key relationships
- Determine default values
- Identify constraints on columns
- Create the table and associated indexes
None
What does the SQL:1999 and SQL:2016 standards refer to?
Updates to the SQL standard over the years
None
Is SQL a standard certified by NIST?
No, it is no longer certified by NIST
None
Expressions are mathematical manipulations of data in a table that may be included as part of the SELECT statement.
True
What will result from the following SQL Select statement?
SELECT MIN(Product_Description)
FROM Product_V;
SELECT @ will be displayed.
*The first product description alphabetically in Product_V will be shown. *
An error message will be generated.
The minimum value of Product_Description will be displayed.
When creating a table, it is not important to consider foreign key–primary key mates.
False