Database Programming with SQL-Section 17 Quiz
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
1.
REGULAR EXPRESSIONS can be used as part of a contraint definition. (True or False?)
Mark for Review
(1) Points
True (*)
False
Correct
Correct
2.
Select the correct REGULAR EXPRESSION functions: (Choose two)
Mark for Review
(1) Points
(Choose all correct answers)
REGEXP_LIKE, REGEXP_REPLACE (*)
REGEXP_INSTR, REGEXP_SUBSTR (*)
REGEXP_REPLACE, REGEXP_REFORM
REGEXP_LIKE, REGEXP_NEAR
Correct
Correct
3.
REGULAR EXPRESSIONS can be used on CHAR, CLOB, and VARCHAR2 datatypes? (True or False)
Mark for Review
(1) Points
True (*)
False
Correct
Correct
4.
The following table shows some of the output from one of the data dictionary views. Which view is being queried?
USERNAME
PRIVILEGE
ADMIN_OPTION
USCA_ORACLE_SQL01_S08
CREATE
VIEW NO
USCA_ORACLE_SQL01_S08
CREATE
TABLE NO
USCA_ORACLE_SQL01_S08
CREATE
SYNONYM NO
USCA_ORACLE_SQL01_S08
CREATE
TRIGGER NO
USCA_ORACLE_SQL01_S08
CREATE
SEQUENCE NO
USCA_ORACLE_SQL01_S08
CREATE
DATABASE NO
Mark for Review
(1) Points
role_sys_privs (lists system privileges granted to roles)
user_sys_privs (lists system privileges granted to the user) (*)
user_tab_privs_recd (lists object privileges granted to the user)
role_tab_privs (lists table privileges granted to roles)
Correct
Correct
5.
User
CHANG has been granted SELECT, UPDATE, INSERT, and DELETE privileges on
the EMPLOYEES table. You now want to prevent Chang from adding or
deleting rows from the table, while still allowing him to read and
modify existing rows. Which statement should you use to do this?
Mark for Review
(1) Points
REMOVE INSERT, DELETE ON employees FROM chang;
REVOKE INSERT AND DELETE ON employees FROM chang;
REVOKE ALL ON employees FROM chang;
REVOKE INSERT, DELETE ON employees FROM chang; (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
Page 1 of 3
Next
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
6.
User
ADAM has successfully logged on to the database in the past, but today
he receives an error message stating that (although he has entered his
password correctly) he cannot log on. What is the most likely cause of
the problem?
Mark for Review
(1) Points
One or more object privileges have been REVOKEd from Adam.
ADAM's user account has been removed from the database.
ADAM's CREATE USER privilege has been revoked.
ADAM's CREATE SESSION privilege has been revoked. (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
7.
User Kate wants to create indexes on tables in her schema. What privilege must be granted to Kate so that she can do this?
Mark for Review
(1) Points
CREATE INDEX
CREATE ANY INDEX
ALTER TABLE
None; users do not need extra privileges to create indexes on tables in their own schema. (*)
Correct
Correct
8.
Which of these is NOT a System Privilege granted by the DBA?
Mark for Review
(1) Points
Create Index (*)
Create Session
Create Procedure
Create Sequence
Correct
Correct
9.
By
Controlling User Access with Oracle Database Security, you can give
access to specific Objects in the Database. True or False?
Mark for Review
(1) Points
True (*)
False
Correct
Correct
10.
Which of the following simplifies the administration of privileges?
Mark for Review
(1) Points
A trigger
A view
A role (*)
An index
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
Previous
Page 2 of 3
Next
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
11.
Which of the following statements is true?
Mark for Review
(1) Points
Database Links are pointers to another schema in the same database.
Database Links allow users to work on remote database objects without having to log into the other database. (*)
Database Links can be created by any user of a database. You do not need any special privileges to create them.
Database Links are never used in the real world.
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
12.
Which data dictionary view shows which system privileges have been granted to a user?
Mark for Review
(1) Points
USER_SYSTEM_PRIVS
USER_SYSTEM_PRIVILEGES
USER_TAB_PRIVS
USER_SYS_PRIVS (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
13.
A role can be granted to another role. True or False?
Mark for Review
(1) Points
True (*)
False
Correct
Correct
14.
Scott King owns a table called employees. He issues the following statement:
GRANT select ON employees TO PUBLIC;
Allison Plumb has been granted CREATE SESSION by the DBA. She logs into the database and issues the following statement:
GRANT ï¾ select ON ï¾ scott_king.employees TO jennifer_cho;
True or False: Allison's statement will fail.
Mark for Review
(1) Points
True (*)
False
Correct
Correct
15.
You
need to grant user BOB SELECT privileges on the EMPLOYEES table. You
want to allow BOB to grant this privileges to other users. Which
statement should you use?
Mark for Review
(1) Points
GRANT SELECT ON employees TO bob;
GRANT SELECT ON employees TO bob WITH GRANT OPTION; (*)
GRANT SELECT ON employees TO PUBLIC WITH GRANT OPTION;
GRANT SELECT ON employees TO bob WITH ADMIN OPTION;
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
Previous
Page 3 of 3
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
1.
Select the correct REGULAR EXPRESSION functions: (Choose two)
Mark for Review
(1) Points
(Choose all correct answers)
REGEXP_INSTR, REGEXP_SUBSTR (*)
REGEXP_LIKE, REGEXP_REPLACE (*)
REGEXP_REPLACE, REGEXP_REFORM
REGEXP_LIKE, REGEXP_NEAR
Correct
Correct
2.
Regular
expressions used as check constraints are another way to ensure data is
formatted correctly prior to being written into the database table.
True or False?
Mark for Review
(1) Points
True (*)
False
Correct
Correct
3.
REGULAR EXPRESSIONS can be used as part of a contraint definition. (True or False?)
Mark for Review
(1) Points
True (*)
False
Correct
Correct
4.
Granting
an object privilege WITH GRANT OPTION allows the recipient to grant all
object privileges on the table to other users. True or False?
Mark for Review
(1) Points
True
False (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
5.
A role can be granted to another role. True or False?
Mark for Review
(1) Points
True (*)
False
Correct
Correct
Page 1 of 3
Next
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
6.
Which statement would you use to remove an object privilege granted to a user?
Mark for Review
(1) Points
ALTER USER
DROP
REVOKE (*)
REMOVE
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
7.
Which of the following statements about granting object privileges is false?
Mark for Review
(1) Points
Object privileges can only be granted through roles. (*)
The owner of an object automatically acquires all object privileges on that object.
An object owner can grant any object privilege on the object to any other user or role of the database.
To grant
privileges on an object, the object must be in your own schema, or you
must have been granted the object privileges WITH GRANT OPTION.
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
8.
Which of the following best describes the purpose of the REFERENCES object privilege on a table?
Mark for Review
(1) Points
It allows the user to create new tables which contain the same data as the referenced table.
It allows a user to refer to the table in a SELECT statement.
It allows a user to create foreign key constraints on the table. (*)
It allows a user's session to read from the table but only so that foreign key constraints can be checked.
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
9.
User1
owns a table and grants select on it WITH GRANT OPTION to User2. User2
then grants select on the same table to User3. If User1 revokes select
privileges from User2, will User3 be able to access the table?
Mark for Review
(1) Points
Yes
No (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
10.
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
OPEN SESSION
RESTRICTED SESSION
CREATE SESSION (*)
ALTER SESSION
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
Previous
Page 2 of 3
Next
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
11.
Which of the following Object Privileges can be granted on an individual column on a table? (Choose two)
Mark for Review
(1) Points
(Choose all correct answers)
References (*)
Update (*)
Delete
Select
Correct
Correct
12.
Which of the following is NOT a database object?
Mark for Review
(1) Points
Table
Sequence
View
Subquery (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
13.
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 an object privilege which allows a user to update a table.
A role is the part that a user plays in querying the database.
A role is a name for a group of privileges. (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
14.
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 SELECT ON customers TO ALL;
GRANT customers(SELECT) TO PUBLIC;
CREATE PUBLIC SYNONYM customers FOR james.customers;
GRANT SELECT ON customers TO PUBLIC; (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
15.
Which Object Privilege (other than Alter) can be granted to a Sequence?
Mark for Review
(1) Points
SELECT (*)
INSERT
DELETE
UPDATE
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
Previous
Page 3 of 3
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
1.
Which of the following are system privileges?
(Choose two)
Mark for Review
(1) Points
(Choose all correct answers)
INDEX
CREATE SYNONYM (*)
UPDATE
CREATE TABLE (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
2.
You grant user AMY the CREATE SESSION privilege. Which type of privilege have you granted to AMY?
Mark for Review
(1) Points
A user privilege
An object privilege
A system privilege (*)
An access privilege
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
3.
Object privileges are:
Mark for Review
(1) Points
Required to manipulate the content of objects in the database. (*)
Named groups of related privileges given to a user.
A collection of objects, such as tables, views, and sequences.
Required to gain access to the database.
Correct
Correct
4.
Evaluate this statement:
ALTER USER bob IDENTIFIED BY jim;
Which statement about the result of executing this statement is true?
Mark for Review
(1) Points
A new user JIM is created from user BOB's profile.
The user BOB is renamed and is accessible as user JIM.
The user BOB is assigned the same privileges as user JIM.
A new password is assigned to user BOB. (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
5.
User
SUSAN creates an EMPLOYEES table, and then creates a view EMP_VIEW
which shows only the FIRST_NAME and LAST_NAME columns of EMPLOYEES. User
RUDI needs to be able to access employees' names but no other data from
EMPLOYEES. Which statement should SUSAN execute to allow this?
Mark for Review
(1) Points
GRANT SELECT ON emp_view TO rudi; (*)
CREATE SYNONYM emp_view FOR employees;
SELECT * FROM emp_view FOR rudi;
GRANT SELECT ON emp_view ONLY TO rudi;
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
Page 1 of 3
Next
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
6.
You
are the database administrator. You want to create a new user JONES
with a password of MARK, and allow this user to create his own tables.
Which of the following should you execute?
Mark for Review
(1) Points
CREATE USER jones IDENTIFIED BY mark;
GRANT CREATE SESSION TO jones;
GRANT CREATE TABLE TO jones;
(*)
CREATE USER jones IDENTIFIED BY mark;
GRANT CREATE SESSION TO jones;
CREATE USER jones IDENTIFIED BY mark;
GRANT CREATE TABLE TO jones;
GRANT CREATE SESSION TO jones;
GRANT CREATE TABLE TO jones;
Correct
Correct
7.
Which of the following statements is true?
Mark for Review
(1) Points
Database Links are never used in the real world.
Database Links allow users to work on remote database objects without having to log into the other database. (*)
Database Links are pointers to another schema in the same database.
Database Links can be created by any user of a database. You do not need any special privileges to create them.
Correct
Correct
8.
If
you are granted privileges to your friend's object, by default you may
also grant access to this same object to other users. True or False?
Mark for Review
(1) Points
True
False (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
9.
When granting an object privilege, which option would you include to allow the grantee to grant the privilege to another user?
Mark for Review
(1) Points
FORCE
WITH GRANT OPTION (*)
WITH ADMIN OPTION
PUBLIC
Correct
Correct
10.
You
need to grant user BOB SELECT privileges on the EMPLOYEES table. You
want to allow BOB to grant this privileges to other users. Which
statement should you use?
Mark for Review
(1) Points
GRANT SELECT ON employees TO bob WITH ADMIN OPTION;
GRANT SELECT ON employees TO bob;
GRANT SELECT ON employees TO bob WITH GRANT OPTION; (*)
GRANT SELECT ON employees TO PUBLIC WITH GRANT OPTION;
Correct
Correct
Previous
Page 2 of 3
Next
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
11.
To take away a privilege from a user, you use which command?
Mark for Review
(1) Points
DELETE
REMOVE
REVOKE (*)
ALTER
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
12.
User1
owns a table and grants select on it WITH GRANT OPTION to User2. User2
then grants select on the same table to User3. If User1 revokes select
privileges from User2, will User3 be able to access the table?
Mark for Review
(1) Points
No (*)
Yes
Correct
Correct
13.
Regular expressions are a method of describing both simple and complex patterns for searching and manipulating. True or False?
Mark for Review
(1) Points
True (*)
False
Correct
Correct
14.
_________________
are special characters that have a special meaning, such as a wildcard
character, a repeating character, a non-matching character, or a range
of characters. You can use several of these symbols in pattern matching.
Mark for Review
(1) Points
Alphanumeric values
Meta characters (*)
Reference checks
Clip Art
Correct
Correct
15.
REGULAR EXPRESSIONS can be used as part of a contraint definition. (True or False?)
Mark for Review
(1) Points
True (*)
False
Correct
Correct
Previous
Page 3 of 3
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
1.
Which statement would you use to remove an object privilege granted to a user?
Mark for Review
(1) Points
REVOKE (*)
REMOVE
ALTER USER
DROP
Correct
Correct
2.
What Oracle feature simplifies the process of granting and revoking privileges?
Mark for Review
(1) Points
Object
Schema
Role (*)
Data dictionary
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
3.
Which statement would you use to grant a role to users?
Mark for Review
(1) Points
GRANT (*)
CREATE USER
ALTER USER
ASSIGN
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
4.
User BOB's schema contains an EMPLOYEES table. BOB executes the following statement:
GRANT SELECT ON employees TO mary WITH GRANT OPTION;
Which of the following statements can MARY now execute successfully? (Choose two)
Mark for Review
(1) Points
(Choose all correct answers)
SELECT FROM bob.employees; (*)
REVOKE SELECT ON bob.employees FROM bob;
DROP TABLE bob.employees;
GRANT SELECT ON bob.employees TO PUBLIC; (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
5.
Which of the following simplifies the administration of privileges?
Mark for Review
(1) Points
A view
A role (*)
An index
A trigger
Correct
Correct
Page 1 of 3
Next
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
6.
Roles are:
Mark for Review
(1) Points
Required to manipulate the content of objects in the database.
Named groups of related privileges given to a user or another role. (*)
Required to gain access to the database.
A collection of objects, such as tables, views, and sequences.
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
7.
REGULAR EXPRESSIONS can be used on CHAR, CLOB, and VARCHAR2 datatypes? (True or False)
Mark for Review
(1) Points
True (*)
False
Correct
Correct
8.
REGULAR EXPRESSIONS does exactly the same as LIKE--no more and no less. (True or False?)
Mark for Review
(1) Points
True
False (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 3.
9.
Select the correct REGULAR EXPRESSION functions: (Choose two)
Mark for Review
(1) Points
(Choose all correct answers)
REGEXP_INSTR, REGEXP_SUBSTR (*)
REGEXP_LIKE, REGEXP_NEAR
REGEXP_REPLACE, REGEXP_REFORM
REGEXP_LIKE, REGEXP_REPLACE (*)
Correct
Correct
10.
What system privilege must be held in order to login to an Oracle database?
Mark for Review
(1) Points
CREATE LOGIN
CREATE SESSION (*)
CREATE LOGON
No special privilege is needed; if your username exists in the database, you can login.
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
Previous
Page 2 of 3
Next
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
11.
User
ADAM has successfully logged on to the database in the past, but today
he receives an error message stating that (although he has entered his
password correctly) he cannot log on. What is the most likely cause of
the problem?
Mark for Review
(1) Points
ADAM's user account has been removed from the database.
ADAM's CREATE SESSION privilege has been revoked. (*)
One or more object privileges have been REVOKEd from Adam.
ADAM's CREATE USER privilege has been revoked.
Correct
Correct
12.
Which of the following are system privileges?
(Choose two)
Mark for Review
(1) Points
(Choose all correct answers)
CREATE SYNONYM (*)
CREATE TABLE (*)
INDEX
UPDATE
Correct
Correct
13.
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
RESTRICTED SESSION
CREATE SESSION (*)
ALTER SESSION
OPEN SESSION
Correct
Correct
14.
Which of the following Object Privileges can be granted on an individual column on a table? (Choose two)
Mark for Review
(1) Points
(Choose all correct answers)
Delete
Select
References (*)
Update (*)
Correct
Correct
15.
Which Object Privilege (other than Alter) can be granted to a Sequence?
Mark for Review
(1) Points
DELETE
UPDATE
SELECT (*)
INSERT
Correct
Correct
Previous
Page 3 of 3
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
1.
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
GRANT SELECT ON employees_view TO audrey; (*)
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 AND employees_view TO audrey;
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
2.
What system privilege must be held in order to login to an Oracle database?
Mark for Review
(1) Points
CREATE LOGIN
CREATE SESSION (*)
CREATE LOGON
No special privilege is needed; if your username exists in the database, you can login.
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
3.
Which of the following Object Privileges can be granted on an individual column on a table? (Choose two)
Mark for Review
(1) Points
(Choose all correct answers)
Delete
References (*)
Select
Update (*)
Correct
Correct
4.
Which of the following is NOT a database object?
Mark for Review
(1) Points
Sequence
Subquery (*)
View
Table
Correct
Correct
5.
Which of these is NOT a System Privilege granted by the DBA?
Mark for Review
(1) Points
Create Index (*)
Create Sequence
Create Procedure
Create Session
Correct
Correct
Page 1 of 3
Next
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
6.
Which Object Privilege (other than Alter) can be granted to a Sequence?
Mark for Review
(1) Points
SELECT (*)
DELETE
INSERT
UPDATE
Correct
Correct
7.
Which of the following best describes the purpose of the REFERENCES object privilege on a table?
Mark for Review
(1) Points
It allows the user to create new tables which contain the same data as the referenced table.
It allows a user to create foreign key constraints on the table. (*)
It allows a user's session to read from the table but only so that foreign key constraints can be checked.
It allows a user to refer to the table in a SELECT statement.
Correct
Correct
8.
User1
owns a table and grants select on it WITH GRANT OPTION to User2. User2
then grants select on the same table to User3. If User1 revokes select
privileges from User2, will User3 be able to access the table?
Mark for Review
(1) Points
Yes
No (*)
Correct
Correct
9.
Scott King owns a table called employees. He issues the following statement:
GRANT select ON employees TO PUBLIC;
Allison Plumb has been granted CREATE SESSION by the DBA. She logs into the database and issues the following statement:
GRANT ï¾ select ON ï¾ scott_king.employees TO jennifer_cho;
True or False: Allison's statement will fail.
Mark for Review
(1) Points
True (*)
False
Correct
Correct
10.
Which of the following simplifies the administration of privileges?
Mark for Review
(1) Points
A role (*)
An index
A trigger
A view
Correct
Correct
Previous
Page 2 of 3
Next
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
11.
To join a table in your database to a table on a second (remote) Oracle database, you need to use:
Mark for Review
(1) Points
A remote procedure call
An Oracle gateway product
A database link (*)
An ODBC driver
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
12.
Granting
an object privilege WITH GRANT OPTION allows the recipient to grant all
object privileges on the table to other users. True or False?
Mark for Review
(1) Points
True
False (*)
Correct
Correct
13.
Which of these SQL functions used to manipulate strings is NOT a valid regular expression function ?
Mark for Review
(1) Points
REGEXP_SUBSTR
REGEXP_LIKE
REGEXP_REPLACE
REGEXP (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 3.
14.
Regular expressions are a method of describing both simple and complex patterns for searching and manipulating. True or False?
Mark for Review
(1) Points
True (*)
False
Correct
Correct
15.
Parentheses are not used to identify the sub expressions within the expression. True or False?
Mark for Review
(1) Points
True
False (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 3.
Previous
Page 3 of 3
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
1.
_________________
are special characters that have a special meaning, such as a wildcard
character, a repeating character, a non-matching character, or a range
of characters. You can use several of these symbols in pattern matching.
Mark for Review
(1) Points
Alphanumeric values
Meta characters (*)
Reference checks
Clip Art
Correct
Correct
2.
Regular expressions are a method of describing both simple and complex patterns for searching and manipulating. True or False?
Mark for Review
(1) Points
True (*)
False
Correct
Correct
3.
Parentheses are not used to identify the sub expressions within the expression. True or False?
Mark for Review
(1) Points
True
False (*)
Correct
Correct
4.
Which of the following are system privileges?
(Choose two)
Mark for Review
(1) Points
(Choose all correct answers)
UPDATE
CREATE TABLE (*)
CREATE SYNONYM (*)
INDEX
Correct
Correct
5.
You want to grant user BOB the ability to change other users' passwords. Which privilege should you grant to BOB?
Mark for Review
(1) Points
The CREATE PROFILE privilege
The CREATE USER privilege
The DROP USER privilege
The ALTER USER privilege (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
Page 1 of 3
Next
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
6.
User Kate wants to create indexes on tables in her schema. What privilege must be granted to Kate so that she can do this?
Mark for Review
(1) Points
CREATE INDEX
CREATE ANY INDEX
ALTER TABLE
None; users do not need extra privileges to create indexes on tables in their own schema. (*)
Correct
Correct
7.
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
GRANT SELECT ON employees_view TO public;
GRANT SELECT ON employees AND employees_view TO audrey;
GRANT SELECT ON employees_view TO audrey; (*)
Do
nothing. As a database user, Audrey's user account has automatically
been granted the SELECT privilege for all database objects.
Correct
Correct
8.
User
SUSAN creates an EMPLOYEES table, and then creates a view EMP_VIEW
which shows only the FIRST_NAME and LAST_NAME columns of EMPLOYEES. User
RUDI needs to be able to access employees' names but no other data from
EMPLOYEES. Which statement should SUSAN execute to allow this?
Mark for Review
(1) Points
GRANT SELECT ON emp_view ONLY TO rudi;
CREATE SYNONYM emp_view FOR employees;
SELECT * FROM emp_view FOR rudi;
GRANT SELECT ON emp_view TO rudi; (*)
Correct
Correct
9.
The
database administrator wants to allow user Marco to create new tables
in his own schema. Which privilege should be granted to Marco?
Mark for Review
(1) Points
SELECT
CREATE ANY TABLE
CREATE TABLE (*)
CREATE OBJECT
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
10.
To join a table in your database to a table on a second (remote) Oracle database, you need to use:
Mark for Review
(1) Points
A database link (*)
A remote procedure call
An ODBC driver
An Oracle gateway product
Correct
Correct
Previous
Page 2 of 3
Next
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
11.
When a user is logged into one database, he is restricted to working with objects found in that database. True or False?
Mark for Review
(1) Points
True
False (*)
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
12.
User1
owns a table and grants select on it WITH GRANT OPTION to User2. User2
then grants select on the same table to User3. If User1 revokes select
privileges from User2, will User3 be able to access the table?
Mark for Review
(1) Points
Yes
No (*)
Correct
Correct
13.
To take away a privilege from a user, you use which command?
Mark for Review
(1) Points
ALTER
DELETE
REMOVE
REVOKE (*)
Correct
Correct
14.
Which statement would you use to grant a role to users?
Mark for Review
(1) Points
ASSIGN
GRANT (*)
ALTER USER
CREATE USER
Correct
Correct
15.
Which keyword would you use to grant an object privilege to all database users?
Mark for Review
(1) Points
ALL
ADMIN
PUBLIC (*)
USERS
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
Previous
Page 3 of 3
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
1.
Which data dictionary view shows which system privileges have been granted to a user?
Mark for Review
(1) Points
USER_SYSTEM_PRIVILEGES
USER_SYSTEM_PRIVS
USER_SYS_PRIVS (*)
USER_TAB_PRIVS
Correct
Correct
2.
Which statement would you use to remove an object privilege granted to a user?
Mark for Review
(1) Points
DROP
REMOVE
REVOKE (*)
ALTER USER
Correct
Correct
3.
Which keyword would you use to grant an object privilege to all database users?
Mark for Review
(1) Points
ADMIN
USERS
ALL
PUBLIC (*)
Correct
Correct
4.
You
need to grant user BOB SELECT privileges on the EMPLOYEES table. You
want to allow BOB to grant this privileges to other users. Which
statement should you use?
Mark for Review
(1) Points
GRANT SELECT ON employees TO bob WITH GRANT OPTION; (*)
GRANT SELECT ON employees TO bob WITH ADMIN OPTION;
GRANT SELECT ON employees TO PUBLIC WITH GRANT OPTION;
GRANT SELECT ON employees TO bob;
Correct
Correct
5.
To take away a privilege from a user, you use which command?
Mark for Review
(1) Points
REMOVE
DELETE
REVOKE (*)
ALTER
Correct
Correct
Page 1 of 3
Next
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
6.
User
CRAIG creates a view named INVENTORY_V, which is based on the INVENTORY
table. CRAIG wants to make this view available for querying to all
database users. Which of the following actions should CRAIG perform?
Mark for Review
(1) Points
He should assign the SELECT privilege to all database users for INVENTORY_V view. (*)
He must grant each user the SELECT privilege on both the INVENTORY table and INVENTORY_V view.
He is not required to take any action because, by default, all database users can automatically access views.
He should assign the SELECT privilege to all database users for the INVENTORY table.
Incorrect
Incorrect. Refer to Section 17 Lesson 2.
7.
Which of the following are object privileges? (Choose two)
Mark for Review
(1) Points
(Choose all correct answers)
CREATE TABLE
INSERT (*)
SELECT (*)
DROP TABLE
Incorrect
Incorrect. Refer to Section 17 Lesson 1.
8.
Which of the following Object Privileges can be granted on an individual column on a table? (Choose two)
Mark for Review
(1) Points
(Choose all correct answers)
References (*)
Delete
Select
Update (*)
Correct
Correct
9.
You
are the database administrator. You want to create a new user JONES
with a password of MARK, and allow this user to create his own tables.
Which of the following should you execute?
Mark for Review
(1) Points
CREATE USER jones IDENTIFIED BY mark;
GRANT CREATE SESSION TO jones;
GRANT CREATE SESSION TO jones;
GRANT CREATE TABLE TO jones;
CREATE USER jones IDENTIFIED BY mark;
GRANT CREATE TABLE TO jones;
CREATE USER jones IDENTIFIED BY mark;
GRANT CREATE SESSION TO jones;
GRANT CREATE TABLE TO jones;
(*)
Correct
Correct
10.
Which of the following best describes a role in an Oracle database?
Mark for Review
(1) Points
A role is the part that a user plays in querying the database.
A role is an object privilege which allows a user to update a table.
A role is a name for a group of privileges. (*)
A role is a type of system privilege.
Correct
Correct
Previous
Page 2 of 3
Next
Summary
Test: Section 17 Quiz
Review your answers, feedback, and question scores below. An asterisk (*) indicates a correct answer.
Section 17 Quiz
(Answer all questions in this section)
11.
The following table shows some of the output from one of the data dictionary views. Which view is being queried?
USERNAME
PRIVILEGE
ADMIN_OPTION
USCA_ORACLE_SQL01_S08
CREATE
VIEW NO
USCA_ORACLE_SQL01_S08
CREATE
TABLE NO
USCA_ORACLE_SQL01_S08
CREATE
SYNONYM NO
USCA_ORACLE_SQL01_S08
CREATE
TRIGGER NO
USCA_ORACLE_SQL01_S08
CREATE
SEQUENCE NO
USCA_ORACLE_SQL01_S08
CREATE
DATABASE NO
Mark for Review
(1) Points
user_sys_privs (lists system privileges granted to the user) (*)
user_tab_privs_recd (lists object privileges granted to the user)
role_tab_privs (lists table privileges granted to roles)
role_sys_privs (lists system privileges granted to roles)
Correct
Correct
12.
You want to grant user BOB the ability to change other users' passwords. Which privilege should you grant to BOB?
Mark for Review
(1) Points
The CREATE USER privilege
The CREATE PROFILE privilege
The DROP USER privilege
The ALTER USER privilege (*)
Correct
Correct
13.
REGULAR EXPRESSIONS can be used on CHAR, CLOB, and VARCHAR2 datatypes? (True or False)
Mark for Review
(1) Points
True (*)
False
Correct
Correct
14.
Which of these SQL functions used to manipulate strings is NOT a valid regular expression function ?
Mark for Review
(1) Points
REGEXP_REPLACE
REGEXP (*)
REGEXP_SUBSTR
REGEXP_LIKE
Correct
Correct
15.
Select the correct REGULAR EXPRESSION functions: (Choose two)
Mark for Review
(1) Points
(Choose all correct answers)
REGEXP_INSTR, REGEXP_SUBSTR (*)
REGEXP_REPLACE, REGEXP_REFORM
REGEXP_LIKE, REGEXP_REPLACE (*)
REGEXP_LIKE, REGEXP_NEAR
Correct
Correct
Which statement would you use to add privileges to a role?
GRANT (*)
ASSIGN
ALTER ROLE
CREATE ROLE
Correct
A schema is:
Required to manipulate the content of objects in the database.
Required to gain access to the database.
A collection of objects, such as tables, views, and sequences. (*)
A named group of related privileges given to a user.
Correct
System privileges are:
Required to manipulate the content of objects in the database.
Required to gain access to the database. (*)
A collection of objects, such as tables, views, and sequences.
Named groups of related privileges given to a user.
Previous
Page 3 of 3
Summary