QUESTION: 11

On 20 de July de 2007, in 1Z0-001, OCA (PL/SQL Developer), ORACLE, by Fabiano Anjos

The view EMP_VIEW is created based on the EMP table as follows:

CREATE OR REPLACE VIEW emp_view AS
SELECT deptno
, SUM(sal) TOT_SAL
, COUNT(*) TOT_EMP
FROM emp;
GROUP BY deptno;

What happens when the command is used?

UPDATE emp_view
SET tot_sal = 20000
WHERE deptno = 10;

A: The base table cannot be updated through this view.
B: The TOT_SAL column in the EMP table is updated to 20000 for department 10.
C: The TOT_EMP column in the EMP table is updated to 20000 for department 10.
D: The SAL column in the EMP table is updated to 20000 for employees in department 10.

ANSWER: A

EXPLANATION: Answer A is correct because the user may not INSERT, DELETE, or UPDATE data on the table underlying the sample view if the SELECT statement creating the view contains GROUP BY, or a single-row operation.

INCORRECT ANSWERS:

B: TOT_SAL column in the EMP table will not be updated.
C: TOT_EMP column in the EMP table will not be updated for any rows.
D: UPDATE command does not contain SAL column for update.

 

QUESTION: 10

On 20 de July de 2007, in 1Z0-001, OCA (PL/SQL Developer), ORACLE, by Fabiano Anjos

In SQL Plus You issued this command:

DELETE FROM dept WHERE dept_id = 901;

You received an integrated constraint error because the child record was found. What could you do to make the statement execute?

A: Delete the child record first.
B: You cannot make the command execute.
C: Add a fourth keyword to the command.
D: Add the constraints cascade option to the command.

ANSWER: A

EXPLANATION: Answer A is correct because you need first delete the child record in dependable table for avoid foreign constraint violation.

INCORRECT ANSWERS:

B: You can execute the command if you don’t have child records in other tables for record you need to delete in the parent table DEPT.
C: Adding an additional keyword will not help because foreign constraint will be violated.
D: CASCADE CONSTRAINTS option works only for DROP TABLE command, not for DELETE.

 

QUESTION: 09

On 20 de July de 2007, in 1Z0-001, OCA (PL/SQL Developer), ORACLE, by Fabiano Anjos

You are updating the employee table. Jane has been granted the same privileges as you on the employee table. You ask Jane to logon to the database to check your work before you issue the commit command. What can Jane do to the employee table?

A: Jane can access the table and verify your changes.
B: Jane cannot access the table.
C: Jane can access the table but she cannot see your changes, she can make the changes for you.
D: Jane can access the table but she cannot see your changes and cannot make the changes to the roles that you are changing.

ANSWER: D

EXPLANATION: Answer D is correct because before you committed changes in the employee table nobody can see changed data.

INCORRECT ANSWER:

A: Jane can access table but she cannot verify changes because she does not see them before you commit data changes.
B: Jane can access table because she has been granted the same privileges as you on the employee table.
C: Jane cannot commit herself changes you did to the data.

 

QUESTION: 08

On 20 de July de 2007, in 1Z0-001, OCA (PL/SQL Developer), ORACLE, by Fabiano Anjos

Which privilege concerns with system level security?

A: DROP ANY TABLE
B: DELETE
C: ALTER
D: INDEX
E: UPDATE

ANSWER: A

EXPLANATION: Answer A is correct because only DROP ANY TABLE privilege from all choices belongs to SYSTEM level security, all others not.

INCORRECT ANSWERS:

B: DELETE is object privilege. Permits the grantee of this object privilege to delete data from a table or view.
C: ALTER is object privilege. Permits the grantee of this object privilege to alter the definition of a table or sequence only. The ALTER privileges on all other database objects are considered system privileges.
D: INDEX is object privilege. Permits the grantee of this object privilege to create an index on a table already defined.
E: UPDATE is object privilege. Permits the grantee of this object privilege to update data into a table or view.