Senin, 04 Desember 2017

Database programming section 16

1. A gap can occur in a sequence because a user generated a number from the sequence and then rolled back the transaction. True or False?
True (*)

2. CURRVAL is a pseudocolumn used to refer to a sequence number that the current user has just generated by referencing NEXTVAL. True or False?
True (*)

3. Evaluate this statement:
DROP SEQUENCE line_item_id_seq;
What does this statement accomplish?
It removes the sequence from the data dictionary. (*)

4. Nextval and Currval are known as column aliases. True or False?
False (*)

5. In order to be able to generate primary key values that are not likely to contain gaps, which phrase should be included in the sequence creation statement?
NOCACHE (*)

6. Which is the correct syntax for specifying a maximum value in a sequence?

Maxvalue (*)

7. Evaluate this CREATE SEQUENCE statement:
CREATE SEQUENCE order_id_seq NOCYCLE NOCACHE;
Which statement is true?
The sequence will start with 1. (*)

8. When creating a sequence, which keyword or option specifies the minimum sequence value?
MINVALUE (*)

9. Evaluate this statement:
CREATE INDEX sales_idx ON oe.sales (status);
Which statement is true?
The CREATE INDEX statement creates a nonunique index. (*)

10. When creating an index on one or more columns of a table, which of the following statements are true?
(Choose two)
(Choose all correct answers)
You should create an index if one or more columns are frequently used together in a join condition. (*)
You should create an index if the table is large and most queries are expected to retrieve less than 2 to 4 percent of the rows. (*)

11. Indexes can be used to speed up queries. True or False?
True (*)

12. Which of the following is created automatically by Oracle when a UNIQUE integrity constraint is created?

An index (*)

13. You want to create a composite index on the FIRST_NAME and LAST_NAME columns of the EMPLOYEES table. Which SQL statement will accomplish this task?

CREATE INDEX fl_idx
ON employees(first_name,last_name);
(*)

14. What is the correct syntax for creating an index?

CREATE OR REPLACE INDEX index_name ON table_name(column_name);

15. Which of the following statements best describes indexes and their use?
They contain the column value and pointers to the data in the table, but the data is sorted. (*)

Tidak ada komentar:

Posting Komentar