Professional Documents
Culture Documents
(Download PDF) Oracle 11G SQL 2nd Edition Casteel Test Bank Full Chapter
(Download PDF) Oracle 11G SQL 2nd Edition Casteel Test Bank Full Chapter
Test Bank
Go to download the full and correct content document:
https://testbankfan.com/product/oracle-11g-sql-2nd-edition-casteel-test-bank/
More products digital (pdf, epub, mobi) instant
download maybe you interests ...
https://testbankfan.com/product/oracle-11g-pl-sql-
programming-2nd-edition-casteel-test-bank/
https://testbankfan.com/product/oracle-11g-pl-sql-
programming-2nd-edition-casteel-solutions-manual/
https://testbankfan.com/product/oracle-12c-sql-3rd-edition-
casteel-test-bank/
https://testbankfan.com/product/oracle-12c-sql-3rd-edition-
casteel-solutions-manual/
Oracle 10g Database Administrator Implementation and
Administration 2nd Edition Powell Test Bank
https://testbankfan.com/product/oracle-10g-database-
administrator-implementation-and-administration-2nd-edition-
powell-test-bank/
https://testbankfan.com/product/guide-to-sql-9th-edition-pratt-
test-bank/
https://testbankfan.com/product/guide-to-sql-8th-edition-pratt-
test-bank/
https://testbankfan.com/product/guide-to-oracle-10g-5th-edition-
morrison-test-bank/
https://testbankfan.com/product/guide-to-sql-9th-edition-pratt-
solutions-manual/
Chapter 6: Additional Database Objects
TRUE/FALSE
2. A database index allows users and application programs to quickly locate specific records.
4. When a positive value is assigned to the INCREMENT BY clause of the CREATE SEQUENCE
command, numeric values are generated in descending order.
5. When a negative value is assigned to the INCREMENT BY clause of the CREATE SEQUENCE
command, numeric values are generated in descending order.
6. The START WITH clause is used to identify the starting numeric value for a synonym.
9. If the minimum value for a sequence is not specified, then NOMINVALUE will be assumed as the
default.
11. The highest possible value for a sequence can be specified through the MAXVALUE clause.
13. The NOCACHE option specifies that the sequence can generate a number only after a request has been
made by a user.
14. Pre-generated sequence numbers that have not been used when the database is shut down will no
longer be available when the database is restarted.
15. When a sequence is created for internal control purposes, the values should not be cached otherwise
gaps may appear in the sequence.
16. The USER_SEQUENCES view of the data dictionary can be used to determine the current values and
settings for a sequence.
17. The NEXTVALUE pseudocolumn is used to actually generate the next value in a sequence.
18. The NEXTVAL pseudocolumn can be referenced in an INSERT command to add the value to a
database table.
19. The START WITH clause of a sequence cannot be reset with the ALTER SEQUENCE command.
20. To change the starting value for a sequence, the sequence must be dropped and then re-created.
21. An index is implicitly created when a NOT NULL constraint is added to a table.
23. A function-based index can be used for queries that include searches based upon arithmetic
expressions or functions.
25. A synonym can be created for any database object such as a table or sequence.
29. A Bitmap index is useful for improving queries on columns that have low cardinality.
30. The USER_INDEXES data dictionary view can be used to verify existing indexes.
MODIFIED TRUE/FALSE
ANS: F, sequence
ANS: F, objects
4. When a positive value is assigned to the INCREMENT BY clause of the CREATE SEQUENCE
command, numeric values are generated in ascending order. _________________________
7. Both a minimum and maximum value can be defined for a(n) sequence.
_________________________
ANS: F, NOCYCLE
10. The GENERATE option can be used to have a sequence pre-generate a set of numbers before they are
requested by a user. _________________________
ANS: F, CACHE
11. The CURRVAL pseudocolumn is used to generate the next value in a sequence.
_________________________
ANS: F, NEXTVAL
12. Sequence settings can be altered using the ALTER SEQUENCE command.
_________________________
13. The INCREMENT BY setting for a sequence cannot be changed with the ALTER SEQUENCE
command. _________________________
15. Indexes are usually created for frequently referenced or searched columns.
_________________________
16. An index is implicitly created whenever a(n) CHECK constraint is created for a table column.
_________________________
ANS: F
PRIMARY KEY
UNIQUE
17. A(n) index can be used to quickly determine whether a value already exists in a specific column.
_________________________
18. A large table containing a particular column that is frequently referenced by a WHERE clause would
probably benefit from a(n) sequence. _________________________
ANS: F, index
19. A(n) index can be created based on more than one column. _________________________
ANS: F, schema
21. To create a PUBLIC synonym, the PUBLIC keyword must be used in the CREATE SYNONYM
command. _________________________
22. The USER_ALL data dictionary view displays information about all the relevant objects owned by the
user. _________________________
ANS: F, USER_OBJECTS
ANS: F, USER_SEQUENCES
24. The USER_INDEXES data dictionary view can be used to verify existing indexes.
_________________________
MULTIPLE CHOICE
1. A(n) ____ generates sequential integers that can be used by organizations to assist with internal
controls or simply to serve as a primary key for a table.
a. view c. synonym
b. index d. sequence
ANS: D PTS: 1 REF: 176
2. Which of the following is defined in Oracle11g as simply anything that has a name and a defined
structure?
a. object c. synonym
b. index d. sequence
ANS: A PTS: 1 REF: 176
3. Which of the following serves the same basic purpose as an index in a book, by allowing users to
quickly locate specific records?
a. view c. synonym
b. index d. sequence
ANS: B PTS: 1 REF: 176
4. Which of the following can be used to provide an alternative, simplified name, to identify database
objects?
a. view c. synonym
b. index d. sequence
ANS: C PTS: 1 REF: 176
5. A(n) ____ synonym is used by an individual to reference objects owned by that person.
a. unique c. public
b. duplicated d. private
ANS: D PTS: 1 REF: 202
7. Which command will create a sequence named NEWSEQUENCE to generate a series of integers?
a. CREATE SEQUENCE newsequence;
b. CREATE SEQUENCE STARTING WITH 5;
c. CREATE SEQUENTIAL newsequence STARTING WITH 5;
d. none of the above
ANS: A PTS: 1 REF: 178
13. When creating a sequence, which of the following is not an optional clause?
a. INCREMENT BY value c. MAXVALUE value | NOMAXVALUE
b. CYCLE | NOCYCLE d. CREATE SEQUENCE
ANS: D PTS: 1 REF: 178
14. The ____ clause is used to specify the interval between two sequential values.
a. INTERVAL SIZE c. STEP BY
b. INCREMENT BY d. START WITH
ANS: B PTS: 1 REF: 178
15. A negative number can be assigned to the ____ clause to generate sequential numbers in decreasing
order.
a. DECREMENT BY c. DECREASE BY
b. INCREMENT BY d. GENERATE BY
ANS: B PTS: 1 REF: 178
16. Which of the following is used to establish a minimum or maximum value, respectively, for a
sequence?
a. MINIMUMVALUE | MAXIMUMVALUE
b. MINVALUE | MAXVALUE
c. STARTWITH | ENDWITH
d. BEGINVALUE | ENDVALUE
ANS: B PTS: 1 REF: 179
17. Oracle10g will begin each sequence with the value of one, unless another value is specified in the
____ clause.
a. START WITH c. INCREMENT BY
b. INTERVAL SIZE d. VALUE START
ANS: A PTS: 1 REF: 179
18. Which option is used to have Oracle11g pre-generate a set of values and store those values in the
server's memory?
a. INTERVAL STORE c. CACHE
b. CACHE VALUE d. INCREMENT BY
ANS: C PTS: 1 REF: 180
19. If a sequence is set to pre-generate sequential values, ____ values will be generated at one time by
default.
a. 5 c. 15
b. 10 d. 20
ANS: D PTS: 1 REF: 180
20. The ____ options are used to determine whether Oracle10g should begin reissuing values from the
sequence once the minimum or maximum value has been reached.
a. CYCLE | NOCYCLE
b. MINIMUMVALUE | MAXIMUMVALUE
c. CACHE | NOCACHE
d. REORDER | NOREORDER
ANS: A PTS: 1 REF: 179
21. Which options are used in application cluster environments where multiple users may be requesting
sequence values at the same time?
a. CYCLE | NOCYCLE c. VALUECACHE | NOVALUECACHE
b. MINVALUE | MAXVALUE d. ORDER | NOORDER
ANS: D PTS: 1 REF: 180
22. When working with cached sequence values, which of the following is correct?
a. The cache option instructs Oracle10g to return the sequence values in the same order in
which the user requests were received.
b. The cache option instructs Oracle10g not to generate any more numbers after the
minimum or maximum value has been reached.
c. When a value has been generated and cached, that value has been assigned and cannot be
regenerated until the sequence begins a new cycle.
d. The highest value for a cached number is 10^44.
ANS: C PTS: 1 REF: 180
23. To verify individual settings for the clauses of a sequence, you can query the ____ table in the data
dictionary.
a. USER_SEQUENCES c. DISPLAY_SEQUENCES
b. V$SEQUENCES d. VIEW_SEQUENCES
ANS: A PTS: 1 REF: 182
24. Which of the following statements about NEXTVAL and CURRVAL is incorrect?
a. The pseudocolumn NEXTVAL is used to actually generate the sequence value.
b. After the value is generated, it is stored in the CURRVAL pseudocolumn so it can be
referenced again by a user.
c. A reference to CURRVAL will not cause Oracle10g to generate a new sequence number;
a reference to NEXTVAL, however, will generate a new number.
d. NEXTVAL and CURRVAL are pseudocolumns that store unique names for database
objects.
ANS: D PTS: 1 REF: 183
25. Which of the following keywords is used to actually generate a sequence value?
a. NEXTVALUE c. GENERATEVAL
b. NEXTVAL d. GENERATE
ANS: B PTS: 1 REF: 183
27. The last value generated by a sequence is stored in the ____ pseudocolumn.
a. NEXTVAL c. CURRENTVAL
b. DUAL d. CURRVAL
ANS: D PTS: 1 REF: 183
28. Which of the following is a valid SQL statement when referencing a sequence?
a. INSERT INTO orderitems
VALUES (currval, 1, 811794939, 1);
b. INSERT INTO orderitems
VALUES (currentval, 1, 811794939, 1);
c. INSERT INTO orderitems
VALUES (nextvalue, 1, 811794939, 1);
d. none of the above
ANS: D PTS: 1 REF: 183
29. A NEXTVAL call generates the sequence value of 5. After the value is generated, what value will be
stored in CURRVAL?
a. 5 c. 6
b. 4 d. unknown
ANS: A PTS: 1 REF: 183
30. Which of the following sequence settings cannot be changed with the ALTER SEQUENCE
command?
a. INCREMENT BY c. NOCACHE
b. START WITH d. NOMAXVALUE
ANS: B PTS: 1 REF: 179
31. If the last values generated by a sequence were 277 and 278, which of the following changes cannot be
initiated by the ALTER SEQUENCE command?
a. NOMAXVALUE c. INCREMENT BY 5
b. CYCLE d. MAXVALUE 200
ANS: D PTS: 1 REF: 179
32. Which of the following commands can be used to remove a sequence from a database?
a. DELETE SEQ c. REMOVE SEQUENCE
b. DROP SEQ d. DROP SEQUENCE
ANS: D PTS: 1 REF: 188
36. An index is not implicitly created when which type of constraint is created?
a. NOT NULL c. PRIMARY KEY
b. UNIQUE d. none of the above
ANS: A PTS: 1 REF: 194
37. The purpose of an index is to ____.
a. speed up DML operations
b. speed up full table scans
c. efficiently determine whether a value exists in a table
d. all of the above
ANS: C PTS: 1 REF: 188
41. Which of the following can be used to remove an index that currently exists on the column of a
database table?
a. ALTER TABLE...DROP c. DROP INDEX
b. ALTER TABLE...MODIFY d. DELETE INDEX
ANS: C PTS: 1 REF: 201
42. Which of the following can be created so other users will not need to prefix a table owned by user Jeff
with his schema name?
a. sequence c. synonym
b. index d. schema alias
ANS: C PTS: 1 REF: 201
44. Which of the following SQL statements will delete the private synonym named MYSYNON?
a. DROP PRIVATE SYNONYM mysynon;
b. DROP PUBLIC SYNONYM mysynon;
c. DROP SYNONYM mysynon;
d. DELETE PRIVATE SYNONYM mysynon;
ANS: C PTS: 1 REF: 204
45. If the PUBLIC keyword is not included when a synonym is created, the command will create a(n)
____ synonym, by default.
a. PUBLIC c. private
b. functional d. objective
ANS: C PTS: 1 REF: 202
46. To remove a PUBLIC synonym, you must include the ____ keyword in the DROP command.
a. DEFAULT c. PUBLIC
b. DBA d. none of the above
ANS: C PTS: 1 REF: 203
48. Based on the structure of the CUSTOMERS table, which of the following is a valid SQL statement?
a. CREATE PUBLIC INDEX customers_name_idx
ON customers (lastname, firstname);
b. CREATE PUBLIC INDEX customers_name_idx
ON customers (lastname);
c. CREATE INDEX customers_name_idx
ON customers (lastname, firstname);
d. CREATE PUBLIC INDEX customers_name_idx
FOR customers (lastname);
ANS: C PTS: 1 REF: 195
49. Which of the following commands can be used to create a sequence for the CUSTOMERS table?
a. CREATE SEQUENCE customers_customer#;
b. CREATE SEQUENCE customers_customer#
START WITH 2000
MAXVALUE 999;
c. CREATE SEQUENCE customers_customer#
INCREMENT BY -1
NOCACHE|CACHE;
d. all of the above
ANS: A PTS: 1 REF: 178
Structure of the BOOKS table
50. Based on the structure of the BOOKS table, which of the following is a valid SQL statement?
a. CREATE INDEX books_profit_idx
ON books "retail-cost";
b. CREATE INDEX books_title_idx
ON books (INITCAP(title));
c. CREATE INDEX books_profit_idx
FOR books "retail-cost";
d. CREATE INDEX books_title_idx
FOR books (INITCAP(title);
ANS: B PTS: 1 REF: 197
COMPLETION
1. A(n) ____________________ can be used for internal control purposes by generating a series of
numbers.
ANS: sequence
2. A(n) ____________________ can be used to quickly locate specific records in a large table.
ANS: index
3. A(n) ____________________ can be used to generate values for a column designated as the primary
key for a table.
ANS: sequence
4. A(n) ____________________ synonym is an alternate name that can be referenced by all users.
ANS: public
ANS: public
6. The ____________________ clause is used to indicate the interval that must exist between two values
generated in a sequence.
ANS: INCREMENT BY
7. The ____________________ clause of the CREATE SEQUENCE command is used to identify the
starting value for a sequence.
8. The ____________________ clause identifies the lowest value a sequence can generate.
ANS: MINVALUE
9. The ____________________ option is used to indicate that the values assigned by a sequence can be
used after the maximum value is reached.
ANS: CYCLE
10. The ____________________ option of a sequence indicates that a set of values are to be pre-generated
by the sequence rather than wait for a user request.
ANS: CACHE
11. The ____________________ pseudocolumn is used to generate the next sequence value.
ANS: NEXTVAL
ANS: CURRVAL
ANS: ALTER
14. The ____________________ value of a sequence cannot be changed if the sequence has already
generated a number greater than that value.
ANS: MAXVALUE
15. The ____________________ SEQUENCE command can be used to permanently delete a sequence
from a database.
ANS: DROP
16. Indexes can speed up row retrieval, but can slow down ____________________ operations because
the index must also be updated.
ANS: DML
17. If more than ____________________ percent of a table is expected to be returned in the results of a
query, then an index will probably not speed up the process.
ANS:
10
ten
18. 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.
ANS: index
ANS: CREATE
20. The ____________________ view can be used to verify the existence of an index owned by a user.
ANS: USER_INDEXES
PTS: 1 REF: 199
21. Even if you created a PUBLIC synonym, you must have ____________________ privileges to delete
a PUBLIC synonym.
ANS: DBA
22. The ____________________ SYNONYM command is used to permanently remove a synonym from
a database.
ANS: DROP
23. The keyword ____________________ must be used in a CREATE INDEX command to create a
Bitmap index.
ANS: BITMAP
24. The ____________________ index structure can be particularly beneficial in queries involving
compound conditions (AND and OR operator usage).
ANS: BITMAP
ESSAY
1. How does an Index Organized table differ from a standard table and a typical index?
ANS:
This structure stores the contents of the entire table in a B-tree index with rows sorted in the primary
key value order. This combines the index and table into a single structure. Search and sort operations
involving the primary key column can be improved with this index. This has an advantage over other
types of indexes in that only one physical object is needed to house both the index and the data values.
ANS:
An index can help speed up row retrieval if less than ten percent of the table is included in the query
results. However, when data changes are made, such as adding or deleting rows, the index must be
updated which can slow down DML operations.
ANS:
One aim of internal control is to ensure that data is not being deleted to conceal embezzlement or other
illegal activities. Hence, sequential values are often assigned to transactions that have an economic
purpose - such as invoices, checks, etc. A sequence can be used to assigned these same sequential
values to electronic transactions. Gaps in the values may indicate that transactions have been purposely
(or perhaps accidentally) deleted.
III. Within what Time a Fugitive Slave that has been Found,
shall be Produced Before the Judge.
Where a fugitive slave takes refuge with any person, the latter
must straightway bring him before a judge. Should he not produce
him as aforesaid, and the slave should remain with him until the
eighth night, and then go elsewhere, the person who sheltered him
shall be compelled to give two slaves of equal value to his master. If,
however, he should be found to have concealed the slave who took
refuge with him, he must restore him and give another slave to the
master, without delay; because he neglected to give notice to the
latter within the legally appointed time.