sâmbătă, 8 mai 2010

Test: Final Exam Semester 2 - Part II (31-40)

Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Part II of the Semester 2 Final Exam covers Sections 10-14 of Database Programming with SQL.
Section 11
31. Evaluate this statement:

DROP SEQUENCE line_item_id_seq;

What does this statement accomplish?

Mark for Review
(1) Points
It sets the next value of the sequence to 1.
It sets the next value of the sequence to 0.
It sets the current value of the sequence to 0.
It removes the sequence from the data dictionary. (*)
Incorrect Incorrect. Refer to Section 11
32. Evaluate this CREATE SEQUENCE statement:

CREATE SEQUENCE order_id_seq NOCYCLE NOCACHE;

Which statement is true?

Mark for Review
(1) Points
The sequence has no maximum value.
The sequence preallocates values and retains them in memory.
The sequence will continue to generate values after reaching its maximum value.
The sequence will start with 1. (*)
Incorrect Incorrect. Refer to Section 11
33. Which statement would you use to remove the EMP_ID_SEQ sequence? Mark for Review
(1) Points
DELETE SEQUENCE emp_id_seq;
DROP SEQUENCE emp_id_seq; (*)
ALTER SEQUENCE emp_id_seq ...;
REMOVE SEQUENCE emp_id_seq;
Correct Correct
34. Sequences can be used to: (Choose three) Mark for Review
(1) Points
(Choose all correct answers)
Ensure primary key values will be unique and consecutive
Ensure primary key values will be unique even though gaps may exist (*)
Generate a range of numbers and optionally cycle through them again (*)
Set a fixed interval between successively generated numbers. (*)
Guarantee that no primary key values are unused
Correct Correct
35. You create a sequence with the following statement:

CREATE SEQUENCE my_emp_seq;

Which of the following statements about this sequence are true? (Choose two)

Mark for Review
(1) Points
(Choose all correct answers)
MINVALUE is equal to 1. (*)
MAXVALUE is unlimited.
When the sequence exceeds its maximum value it will continue to generate numbers starting with MINVALUE.
The sequence will not cache a range of numbers in memory. (*)
Correct Correct
Section 12
36. Which of the following privileges must be assigned to a user account in order for that user to connect to an Oracle database? Mark for Review
(1) Points
ALTER SESSION
CREATE SESSION (*)
OPEN SESSION
RESTRICTED SESSION
Correct Correct
37. Which of the following best describes a role in an Oracle database? Mark for Review
(1) Points
A role is a type of system privilege.
A role is the part that a user plays in querying the database.
A role is a name for a group of privileges. (*)
A role is an object privilege which allows a user to update a table.
Correct Correct
38. User JAMES has created a CUSTOMERS table and wants to allow all other users to SELECT from it. Which command should JAMES use to do this? Mark for Review
(1) Points
GRANT customers(SELECT) TO PUBLIC;
GRANT SELECT ON customers TO ALL;
GRANT SELECT ON customers TO PUBLIC; (*)
CREATE PUBLIC SYNONYM customers FOR james.customers;
Correct Correct
39. You want to grant privileges to user CHAN that will allow CHAN to update the data in the EMPLOYEES table. Which type of privileges will you grant to CHAN? Mark for Review
(1) Points
User privileges
Object privileges (*)
System privileges
Administrator privileges
CorrectCorrect
40. You create a view named EMPLOYEES_VIEW on a subset of the EMPLOYEES table. User AUDREY needs to use this view to create reports. Only you and Audrey should have access to this view. Which of the following actions should you perform? Mark for Review
(1) Points
Do nothing. As a database user, Audrey's user account has automatically been granted the SELECT privilege for all database objects.
GRANT SELECT ON employees_view TO public;
GRANT SELECT ON employees_view TO audrey; (*)
GRANT SELECT ON employees AND employees_view TO audrey;
Correct Correct

Niciun comentariu:

Trimiteți un comentariu