MIDTERM QUESTIONS Flashcards

(134 cards)

1
Q

Which of the following is used to uniquely identify each record?

A

Primary Key

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A file is composed of a group of related ____________________.

A

Records

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Analyzing historical sales data stored in a database is commonly referred to as ____.

A

data mining

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which of the following can be used to link the data in two or more tables together?

A

Common Field

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What represents a characteristic or attribute that is being collected about an entity?

A

Field

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A(n)________________ relationship cannot exist in a physical relational database.

A

many to many

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

(T/F) A bridging table can be used to eliminate a many-to-many relationship in a relational database.

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

A field is referred to as a(n) ____________________ in the physical database.

A

Column

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

If uncontrolled, what can lead to data anomalies?

A

Data redundancy

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

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?

A

Field

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

(T/F) According to the Oracle Naming Standard, ‘-‘ (hyphen) is a legal character.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

A DATE column consists of ____________________ bytes.

A

7

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

A column’s ____________________ identifies the type of data that can be stored in a column.

A

Data type

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

(T/F) A table name can consist of numbers, letters, and blank spaces.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

A table name can contain the number sign and ____________________ symbols.

A

Underscore

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

(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.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

(T/F) The scale of a NUMBER column indicates the total number of digits that can be stored in the column.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

____ commands are used to add new database objects.

A

DDL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

(T/F) A column name can consist of up to 225 characters.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

What is the default format for a DATE value?

A

DD-MON-YY

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

The ____________________ command can be used to modify the structure of a table.

A

ALTER TABLE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

The ____ TABLE command is used to modify an existing column’s data declaration.

A

ALTER

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

When using the ALTER TABLE…DROP COLUMN command, which of the following is not correct?

A

The command can be used to delete multiple columns from a table.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

The ____________________ clause of the ALTER TABLE command can be used to delete a column from an existing table.

A

DROP COLUMN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
(T/F) DML commands are used to create or modify database tables.
False
26
Which of the following keywords can be used to change the size, datatype, and/or default value of an existing column?
MODIFY
27
(T/F) The MODIFY TABLE command can be used to change the size of a table.
False
28
A(n) ____________________ enables you to specify that a column value must be a specific value or fall within a range of values.
Check Constraint
29
A(n) ____________________ constraint is a table constraint that specifies that a column must have a unique value for every table row.
Unique
30
(T/F) A composite key is created using a value constraint.
False
31
Which of the following is a table constraint?
Unique Constraint
32
A(n) ____________________ constraint limits the value that can be placed in a specific column, irrespective of values that exist in other table rows.
Column
33
Which command would be used to delete table x and all foreign key constraints to x?
Drop x Cascade Constraints
34
Adding a check condition constraint to a table is a(n) ____________________ action.
Restricted
35
(T/F) A NOT NULL constraint is an example of a table constraint.
False
36
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;
37
(T/F) A primary key is defined using an integrity constraint.
True
38
(T/F) The DROP command can be used to remove rows from an existing table.
False
39
The ____________________ command is used to change data stored in a table.
UPDATE
40
(T/F) If more than one data value is being added to a table, the values must be separated by parentheses.
False
41
(T/F) Only one search condition may be listed in a WHERE clause.
False
42
(T/F) If non-numeric data is being added to a column, the data must be enclosed in double quotation marks.
False
43
(T/F) Data that is being added to a table is specified in the VALUES clause of the INSERT command.
True
44
When the INSERT command is being used to enter data into a non-numeric column, the data must be enclosed in ____.
Single quotation marks
45
(T/F) A subquery can be used with the INSERT command to enter data from an existing table into the destination table.
True
46
If the ____ clause of the UPDATE command is omitted, then all the rows in the specified table will be changed.
WHERE
47
When sorting the results in ascending order, which of the following values will be presented first in the output?
Numeric
48
(T/F) When sorted in descending order, NULL values will be listed first in the results, unless the user specifies otherwise.
True
49
(T/F) Oracle11 g is case sensitive when comparing data to a search condition.
True
50
(T/F) To find rows containing a NULL value in a specified column, you must use the search condition of = NULL.
False
51
(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
52
(T/F) The default sort order for the ORDER BY clause is ascending.
True
53
When using the LIKE operator, the ____________________ wildcard represents multiple characters.
%
54
The maximum number of columns that can be specified for sorting data is ____.
255
55
What operator can be used to combine search conditions?
AND
56
(T/F) A COMMIT is explicitly issued when the user exits SQL*Plus.
False
57
When does a COMMIT command implicitly occur?
When the user issues a DDL command such as CREATE or ALTER TABLE
58
(T/F) The COMMIT command is used to add new rows to a table.
False
59
(T/F) After a COMMIT command is executed, the ROLLBACK command will have no affect on the changed data.
True
60
Use ____ to save a transaction.
COMMIT
61
Which of the following commands allows a user to "undo" uncommitted changes to data?
ROLLBACK
62
(T/F) A transaction is defined as the set of statements that are committed at one time.
True
63
A user who is issuing DML commands can save modified data or undo uncommitted changes by issuing ____ statements.
Transaction Control
64
Which keyword permanently saves changed data in a table?
COMMIT
65
(T/F) A(n) non-equality join is also known as an equijoin, inner join, or simple join.
False
66
(T/F) When a self-join is created, each copy of the table must be assigned a table alias.
True
67
Data stored in separate tables can be reconstructed through the use of ____________________.
JOINS
68
(T/F) When using the JOIN...ON keywords to join four tables, both keywords must be repeated four times.
False
69
(T/F) The USING clause must be used with the JOIN keyword when linking tables that do not contain a commonly named column.
False
70
(T/F) The NATURAL JOIN keywords can be used to link two tables that have a commonly named and defined column.
True
71
(T/F) A column qualifier is separated from the column name with a colon.
False
72
(T/F) A column qualifier indicates the column containing the data being referenced.
False
73
A column ____________________ indicates the table containing the column being referenced.
Qualifier
74
Tables can be joined in the FROM clause or the WHERE clause of a SELECT statement.
True
75
(T/F) The outer join operator is used to combine the results of multiple SELECT statements.
False
76
(T/F) Data stored in multiple tables can be combined through the use of an ORDER BY clause.
False
77
(T/F) If you are joining five tables in a SELECT statement, five joining conditions will be required.
False
78
A full outer join cannot be created in the ____________________ clause.
WHERE
79
(T/F) The JOIN keyword is used in the WHERE clause to indicate the tables that should be joined or linked.
False
80
(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
81
(T/F) A(n) outer join can be created by not including a joining condition in a SELECT statement.
False
82
(T/F) If you are joining two tables in a SELECT statement, three joining conditions will be required.
False
83
(T/F) An outer join only lists rows that contain a match in both tables.
False
84
(T/F) Set operators are used to combine the results of multiple queries.
True
85
____________________ operators are used to combine the results of multiple queries.
Set
86
The ____________________ set operator is used to display the combined results returned by multiple SELECT statements.
UNION ALL
87
(T/F) The INTERSECT set operator only displays the rows returned by both queries.
True
88
The ____________________ set operator is used to display the rows returned by both SELECT statements.
INTERSECT
89
(T/F) When combining the results of two SELECT statements with the MINUS keyword, duplicate rows are suppressed in the results.
False
90
(T/F) If you are joining four tables in a SELECT statement, three joining conditions will be required.
True
91
A(n) ____ is used to combine the results of two queries.
Set operator
92
A(n) ____________________ is a predefined block of code that accepts one or more arguments and returns a single value as output.
Function
93
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
94
(T/F) The NVL function can be used to include records containing null values in calculations.
True
95
(T/F) The REPLACE function is used to substitute one character string for another character string in a set of data.
True
96
(T/F) The NULLIF function is often combined with the NVL2 function to display a descriptive status.
True
97
The ____________________ function is used to determine the number of months between two dates.
MONTHS_BETWEEN
98
(T/F) The CONCAT function is used to store the contents of two columns into one column.
False
99
Which of the following functions can be used to convert a character string to upper-case letters?
UPPER
100
To indicate that minutes should be displayed, include ____________________ in the time element format argument.
MI
101
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
102
The ____________________ clause is used to group data based upon a specified column or columns.
GROUP BY
103
The ____ function is used to determine how widely data are spread out within a group.
VARIANCE
104
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
105
The ____________________ function is used to determine the largest value stored in a specified column.
MAX
106
The ____ function is based upon the concept of a normal distribution.
STDDEV
107
(T/F) A SELECT statement cannot include both a GROUP BY and an ORDER BY clause.
False
108
(T/F) The AVG function only includes non-NULL values in its calculations.
True
109
(T/F) The COUNT function can be used to count NULL, as well as, non-NULL values.
True
110
Which operator will instruct Oracle10 g to list all records with a value that is less than the highest value returned by the subquery?
111
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
112
(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
113
(T/F) A correlated subquery is one in which the inner query is executed first, and then the outer query is executed.
False
114
(T/F) The EXISTS operator can be used with multiple-row subqueries.
True
115
The operators =, <, >, <=, >=, and <> are referred to as ____ operators.
Single-row
116
(T/F) If the value of the EXISTS operator is ____________________, then the rows meeting the condition are displayed.
TRUE
117
The <> operator is referred to as a(n) ____ operator.
Single-row
118
(T/F) A subquery, except one in the FROM clause, can’t have an ORDER BY clause.
True
119
(T/F) The START WITH clause of a sequence cannot be reset with the ALTER SEQUENCE command.
True
120
The ____________________ pseudocolumn is used to generate the next sequence value.
NEXTVAL
121
(T/F) To change the starting value for a sequence, the sequence must be dropped and then re-created.
True
122
Which of the following keywords is used to actually generate a sequence value?
NEXTVAL
123
SKIP
124
What can be created so other users will not need to prefix a table owned by user Jeff with his schema name?
Synonym
125
(T/F) A sequence serves as a nickname for a database object.
False
126
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
127
(T/F) An index is implicitly created when a NOT NULL constraint is added to a table.
False
128
Which of the following is defined in Oracle11 g as simply anything that has a name and a defined structure?
Object
129
The keyword ____________________ must be used in a CREATE INDEX command to create a Bitmap index.
Bitmap
130
An index can be created with the ____________________ INDEX command.
CREATE
131
The ____________________ view can be used to verify the existence of an index owned by a user.
USER_INDEXES
132
A(n) ____________________ can be used to quickly locate specific records in a large table.
Index
133
(T/F) A basic CREATE INDEX command will create a B-Tree index.
True
134
(T/F) The USER_SEQ data dictionary view can be used to verify sequence settings.
False