MIDTERM QUESTIONS Flashcards
Which of the following is used to uniquely identify each record?
Primary Key
A file is composed of a group of related ____________________.
Records
Analyzing historical sales data stored in a database is commonly referred to as ____.
data mining
Which of the following can be used to link the data in two or more tables together?
Common Field
What represents a characteristic or attribute that is being collected about an entity?
Field
A(n)________________ relationship cannot exist in a physical relational database.
many to many
(T/F) A bridging table can be used to eliminate a many-to-many relationship in a relational database.
True
A field is referred to as a(n) ____________________ in the physical database.
Column
If uncontrolled, what can lead to data anomalies?
Data redundancy
Which of the following terms best describes where a group of characters that represents a customer’s address would be stored in the logical design?
Field
(T/F) According to the Oracle Naming Standard, ‘-‘ (hyphen) is a legal character.
False
A DATE column consists of ____________________ bytes.
7
A column’s ____________________ identifies the type of data that can be stored in a column.
Data type
(T/F) A table name can consist of numbers, letters, and blank spaces.
False
A table name can contain the number sign and ____________________ symbols.
Underscore
(T/F) When declaring a NUMBER data type, scale is the total number of digits both to the left and to the right of the decimal point.
False
(T/F) The scale of a NUMBER column indicates the total number of digits that can be stored in the column.
False
____ commands are used to add new database objects.
DDL
(T/F) A column name can consist of up to 225 characters.
False
What is the default format for a DATE value?
DD-MON-YY
The ____________________ command can be used to modify the structure of a table.
ALTER TABLE
The ____ TABLE command is used to modify an existing column’s data declaration.
ALTER
When using the ALTER TABLE…DROP COLUMN command, which of the following is not correct?
The command can be used to delete multiple columns from a table.
The ____________________ clause of the ALTER TABLE command can be used to delete a column from an existing table.
DROP COLUMN
(T/F) DML commands are used to create or modify database tables.
False
Which of the following keywords can be used to change the size, datatype, and/or default value of an existing column?
MODIFY
(T/F) The MODIFY TABLE command can be used to change the size of a table.
False
A(n) ____________________ enables you to specify that a column value must be a specific value or fall within a range of values.
Check Constraint
A(n) ____________________ constraint is a table constraint that specifies that a column must have a unique value for every table row.
Unique
(T/F) A composite key is created using a value constraint.
False
Which of the following is a table constraint?
Unique Constraint
A(n) ____________________ constraint limits the value that can be placed in a specific column, irrespective of values that exist in other table rows.
Column
Which command would be used to delete table x and all foreign key constraints to x?
Drop x Cascade Constraints
Adding a check condition constraint to a table is a(n) ____________________ action.
Restricted
(T/F) A NOT NULL constraint is an example of a table constraint.
False
Which command is used to disable the constraint named faculty_loc_id_fk in the faculty table?
ALTER TABLE faculty
DISABLE CONSTRAINT faculty_loc_id_fk;
(T/F) A primary key is defined using an integrity constraint.
True
(T/F) The DROP command can be used to remove rows from an existing table.
False
The ____________________ command is used to change data stored in a table.
UPDATE
(T/F) If more than one data value is being added to a table, the values must be separated by parentheses.
False
(T/F) Only one search condition may be listed in a WHERE clause.
False
(T/F) If non-numeric data is being added to a column, the data must be enclosed in double quotation marks.
False
(T/F) Data that is being added to a table is specified in the VALUES clause of the INSERT command.
True
When the INSERT command is being used to enter data into a non-numeric column, the data must be enclosed in ____.
Single quotation marks
(T/F) A subquery can be used with the INSERT command to enter data from an existing table into the destination table.
True
If the ____ clause of the UPDATE command is omitted, then all the rows in the specified table will be changed.
WHERE
When sorting the results in ascending order, which of the following values will be presented first in the output?
Numeric
(T/F) When sorted in descending order, NULL values will be listed first in the results, unless the user specifies otherwise.
True
(T/F) Oracle11 g is case sensitive when comparing data to a search condition.
True
(T/F) To find rows containing a NULL value in a specified column, you must use the search condition of = NULL.
False
(T/F) When two conditions are joined by the AND logical operator, both of the conditions must be evaluated as FALSE to be included in the query results.
False
(T/F) The default sort order for the ORDER BY clause is ascending.
True
When using the LIKE operator, the ____________________ wildcard represents multiple characters.
%
The maximum number of columns that can be specified for sorting data is ____.
255
What operator can be used to combine search conditions?
AND
(T/F) A COMMIT is explicitly issued when the user exits SQL*Plus.
False
When does a COMMIT command implicitly occur?
When the user issues a DDL command such as CREATE or ALTER TABLE
(T/F) The COMMIT command is used to add new rows to a table.
False
(T/F) After a COMMIT command is executed, the ROLLBACK command will have no affect on the changed data.
True
Use ____ to save a transaction.
COMMIT
Which of the following commands allows a user to “undo” uncommitted changes to data?
ROLLBACK
(T/F) A transaction is defined as the set of statements that are committed at one time.
True
A user who is issuing DML commands can save modified data or undo uncommitted changes by issuing ____ statements.
Transaction Control
Which keyword permanently saves changed data in a table?
COMMIT
(T/F) A(n) non-equality join is also known as an equijoin, inner join, or simple join.
False
(T/F) When a self-join is created, each copy of the table must be assigned a table alias.
True
Data stored in separate tables can be reconstructed through the use of ____________________.
JOINS
(T/F) When using the JOIN…ON keywords to join four tables, both keywords must be repeated four times.
False
(T/F) The USING clause must be used with the JOIN keyword when linking tables that do not contain a commonly named column.
False
(T/F) The NATURAL JOIN keywords can be used to link two tables that have a commonly named and defined column.
True
(T/F) A column qualifier is separated from the column name with a colon.
False
(T/F) A column qualifier indicates the column containing the data being referenced.
False
A column ____________________ indicates the table containing the column being referenced.
Qualifier
Tables can be joined in the FROM clause or the WHERE clause of a SELECT statement.
True
(T/F) The outer join operator is used to combine the results of multiple SELECT statements.
False
(T/F) Data stored in multiple tables can be combined through the use of an ORDER BY clause.
False
(T/F) If you are joining five tables in a SELECT statement, five joining conditions will be required.
False
A full outer join cannot be created in the ____________________ clause.
WHERE
(T/F) The JOIN keyword is used in the WHERE clause to indicate the tables that should be joined or linked.
False
(T/F) A full outer join can be created by including an outer join operator on both sides of the linking condition stated in the WHERE clause.
False
(T/F) A(n) outer join can be created by not including a joining condition in a SELECT statement.
False
(T/F) If you are joining two tables in a SELECT statement, three joining conditions will be required.
False
(T/F) An outer join only lists rows that contain a match in both tables.
False
(T/F) Set operators are used to combine the results of multiple queries.
True
____________________ operators are used to combine the results of multiple queries.
Set
The ____________________ set operator is used to display the combined results returned by multiple SELECT statements.
UNION ALL
(T/F) The INTERSECT set operator only displays the rows returned by both queries.
True
The ____________________ set operator is used to display the rows returned by both SELECT statements.
INTERSECT
(T/F) When combining the results of two SELECT statements with the MINUS keyword, duplicate rows are suppressed in the results.
False
(T/F) If you are joining four tables in a SELECT statement, three joining conditions will be required.
True
A(n) ____ is used to combine the results of two queries.
Set operator
A(n) ____________________ is a predefined block of code that accepts one or more arguments and returns a single value as output.
Function
Although the ____________________ table is rarely used in the industry, it can be valuable for someone learning how to work with functions or testing new functions.
DUAL
(T/F) The NVL function can be used to include records containing null values in calculations.
True
(T/F) The REPLACE function is used to substitute one character string for another character string in a set of data.
True
(T/F) The NULLIF function is often combined with the NVL2 function to display a descriptive status.
True
The ____________________ function is used to determine the number of months between two dates.
MONTHS_BETWEEN
(T/F) The CONCAT function is used to store the contents of two columns into one column.
False
Which of the following functions can be used to convert a character string to upper-case letters?
UPPER
To indicate that minutes should be displayed, include ____________________ in the time element format argument.
MI
If the data returned by the GROUP BY clause needs to be sorted in descending order, you must include a(n) ____________________ clause in the SELECT statement.
ORDER BY
The ____________________ clause is used to group data based upon a specified column or columns.
GROUP BY
The ____ function is used to determine how widely data are spread out within a group.
VARIANCE
If a SELECT statement contains a GROUP BY clause, but no ORDER BY clause, the results will be presented in ____________________ order based on the column(s) listed in the GROUP BY clause.
Ascending
The ____________________ function is used to determine the largest value stored in a specified column.
MAX
The ____ function is based upon the concept of a normal distribution.
STDDEV
(T/F) A SELECT statement cannot include both a GROUP BY and an ORDER BY clause.
False
(T/F) The AVG function only includes non-NULL values in its calculations.
True
(T/F) The COUNT function can be used to count NULL, as well as, non-NULL values.
True
Which operator will instruct Oracle10 g to list all records with a value that is less than the highest value returned by the subquery?
<ANY
Which of the following terms refers to a type of subquery that is processed, or executed, once for each row in the outer query?
Correlated subquery
(T/F) When the subquery is executed first and the value is passed back as input to the outer query, the subquery is known as an uncorrelated subquery.
True
(T/F) A correlated subquery is one in which the inner query is executed first, and then the outer query is executed.
False
(T/F) The EXISTS operator can be used with multiple-row subqueries.
True
The operators =, <, >, <=, >=, and <> are referred to as ____ operators.
Single-row
(T/F) If the value of the EXISTS operator is ____________________, then the rows meeting the condition are displayed.
TRUE
The <> operator is referred to as a(n) ____ operator.
Single-row
(T/F) A subquery, except one in the FROM clause, can’t have an ORDER BY clause.
True
(T/F) The START WITH clause of a sequence cannot be reset with the ALTER SEQUENCE command.
True
The ____________________ pseudocolumn is used to generate the next sequence value.
NEXTVAL
(T/F) To change the starting value for a sequence, the sequence must be dropped and then re-created.
True
Which of the following keywords is used to actually generate a sequence value?
NEXTVAL
SKIP
What can be created so other users will not need to prefix a table owned by user Jeff with his schema name?
Synonym
(T/F) A sequence serves as a nickname for a database object.
False
If a column contains a large number of NULL values, a(n) ____________________ can quickly help determine the rows that contain NULL values and those that do not.
Index
(T/F) An index is implicitly created when a NOT NULL constraint is added to a table.
False
Which of the following is defined in Oracle11 g as simply anything that has a name and a defined structure?
Object
The keyword ____________________ must be used in a CREATE INDEX command to create a Bitmap index.
Bitmap
An index can be created with the ____________________ INDEX command.
CREATE
The ____________________ view can be used to verify the existence of an index owned by a user.
USER_INDEXES
A(n) ____________________ can be used to quickly locate specific records in a large table.
Index
(T/F) A basic CREATE INDEX command will create a B-Tree index.
True
(T/F) The USER_SEQ data dictionary view can be used to verify sequence settings.
False