Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
The view will allow the user to check it against the data dictionary
Prohibits changing rows not returned by the subquery in the view definit
ion. (*)
Allows for DELETES from other tables, including ones not listed in subqu
ery
Correct Correct
A complex view is created that returns the sum of salaries per departmen
t, sorted by department name. (*)
A simple view is created that returns the sum of salaries per department
, sorted by department name.
A complex view is created that returns the sum of salaries per departmen
t, sorted by department id.
Correct Correct
3. You administer an Oracle database. Jack manages the Sale
s department. He and his employees often find it necessary to query the database
to identify customers and their orders. He has asked you to create a view that
will simplify this procedure for himself and his staff. The view should not acce
pt INSERT, UPDATE or DELETE operations. Which of the following statements should
you issue? Mark for Review
(1) Points
Correct Correct
You cannot perform DML operations on a view that contains the WITH CHECK
OPTION clause.
You can perform DML operations on a view that contains the WITH READ ONL
Y option.
You can perform DML operations on a view that contains columns defined b
y expressions, such as COST + 1.
Correct Correct
To make sure no rows are updated through the view that will hinder those
rows from being returned by the view. (*)
Correct Correct
A WHERE clause
A join
A column alias
Correct Correct
FORCE
OR REPLACE
Correct Correct
True
False (*)
Correct Correct
True
False (*)
Correct Correct
FORCE (*)
NOFORCE
OR REPLACE
WITH READ ONLY
Correct Correct
Section 10
11. Which of the following keywords cannot be used when crea
ting a view? Mark for Review
(1) Points
HAVING
WHERE
ORDER BY
Correct Correct
12. Which statement would you use to alter a view? Mark for
Review
(1) Points
ALTER VIEW
MODIFY VIEW
ALTER TABLE
Correct Correct
Views allow access to the data because the view displays all of the colu
mns from the table.
Views provide data independence for infrequent users and application pro
grams. One view can be used to retrieve data from several tables. Views can be u
sed to provide data security. (*)
Views are used when you only want to restrict DML operations using a WIT
H CHECK OPTION.
Views are not valid unless you have more than one user.
Correct Correct
SELECT *
FROM part_name_v;
(*)
UPDATE part_name_v
SET cost = cost * 1.23
WHERE part_id = 56990;
Correct Correct
Nested
Simple
Inline
Complex (*)
A complex view
A simple view
A hierarchical view
Correct Correct
You cannot modify data in the SALES table using the SALES_VIEW view. (*)
You can only insert records into the SALES table using the SALES_VIEW vi
ew.
Correct Correct
18. You must create a view that when queried will display th
e name, customer identification number, new balance, finance charge and credit l
imit of all customers. You issue this statement:
CREATE OR REPLACE VIEW CUST_CREDIT_V
AS SELECT c.last_name, c.customer_id, a.new_balance, a.finance_charge, a.credit_
limit
FROM customers c, accounts a
WHERE c.account_id = a.account_id WITH READ ONLY;
Which type of SQL command can be issued on the CUST_CREDIT_V view?
Mark for Review
(1) Points
UPDATE
DELETE
INSERT
SELECT (*)
Correct Correct
DROP emp_hist_v;
DELETE emp_hist_v;
REMOVE emp_hist_v;
Correct Correct
Correct Correct
Part II of the Semester 2 Final Exam covers Sections 10-14 of Database P
rogramming with SQL.
Section 11
21. As user Julie, you issue this statement:
CREATE SYNONYM emp FOR sam.employees;
Which task was accomplished by this statement?
Mark for Review
(1) Points
You created a public synonym on the EMP table owned by user Sam.
You created a private synonym on the EMPLOYEES table that you own.
You created a public synonym on the EMPLOYEES table owned by user Sam.
You created a private synonym on the EMPLOYEES table owned by user Sam.
(*)
Correct Correct
Correct Correct
A synonym.
A composite index.
Correct Correct
24. You need to determine the table name and column name(s)
on which the SALES_IDX index is defined. Which data dictionary view would you qu
ery? Mark for Review
(1) Points
USER_INDEXES
USER_TABLES
USER_OBJECTS
USER_IND_COLUMNS (*)
Correct Correct
Correct Correct
A schema
An index
A view
A synonym (*)
Correct Correct
Correct Correct
Correct Correct
SALARY
LAST_NAME
HIRE_DATE
EMPLOYEE_ID (*)
DEPARTMENT_ID
Correct Correct
Correct Correct
Part II of the Semester 2 Final Exam covers Sections 10-14 of Database Programmi
ng with SQL.
Section 11
31. Evaluate this statement:
DROP SEQUENCE line_item_id_seq;
What does this statement accomplish?
Mark for Review
(1) Points
The sequence will continue to generate values after reaching its maximum
value.
Correct Correct
Ensure primary key values will be unique even though gaps may exist (*)
Generate a range of numbers and optionally cycle through them again (*)
Correct Correct
MAXVALUE is unlimited.
When the sequence exceeds its maximum value it will continue to generate
numbers starting with MINVALUE.
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
OPEN SESSION
RESTRICTED SESSION
Correct Correct
Correct Correct
Correct Correct
39. You want to grant privileges to user CHAN that will allo
w 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
System privileges
Administrator privileges
Correct Correct
Correct Correct
Part II of the Semester 2 Final Exam covers Sections 10-14 of Database Programmi
ng with SQL.
Section 12
41. You want to grant user BOB the ability to change other u
sers' passwords. Which privilege should you grant to BOB? Mark for Review
(1) Points
Correct Correct
SELECT
CREATE OBJECT
Correct Correct
ALTER USER
REVOKE (*)
REMOVE
DROP
Correct Correct
PUBLIC
FORCE
Correct Correct
GRANT (*)
ALTER USER
CREATE USER
ASSIGN
Correct Correct
CREATE ROLE
ALTER ROLE
GRANT (*)
ASSIGN
Correct Correct
An index
A view
A trigger
A role (*)
Correct Correct
An ODBC driver
Correct Correct
Section 14
49. Which SQL statement is used to remove all the changes ma
de by an uncommitted transaction? Mark for Review
(1) Points
UNDO;
ROLLBACK; (*)
ROLLBACK TO SAVEPOINT;
REVOKE ...;
Correct Correct
True (*)
False
Correct Correct