READ Free Dumps For Oracle- 1z0-007
Question ID 7869 | You created a view called EMP_DEPT_VU that contains three columns from the EMPLOYEES and DEPARTMENTS tables: EMPLOYEE_ID, EMPLOYEE_NAME AND DEPARTMENT_NAME. The DEPARTMENT_ID column of the EMPLOYEES table is the foreign key to the primary key DEPARTMENT_ID column of the DEPARTMENTS table. You want to modify the view by adding a fourth column, MANAGER_ID of NUMBER data type from the EMPLOYEES tables. How can you accomplish this task?
|
Option A | ALTER VIEW EMP_dept_vu (ADD manger_id NUMBER);
|
Option B | MODIFY VIEW EMP_dept_vu (ADD manger_id NUMBER);
|
Option C | ALTER VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employee e, departments d WHERE e.department _ id = d.department_id;
|
Option D | ALTER VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employee e, departments d WHERE e.department _ id = d.department_id;
|
Option E | CREATE OR REPLACE VIEW emp_dept_vu AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d WHERE e.department _ id = d.department_id;
|
Option F | You must remove the existing view first, and then run the CREATE VIEW command with a new column list to modify a view.
|
Correct Answer | E |
Explanation Explanation/Reference: Explanation: When we want to alter the underlying data used in the definition of a view, we use the CREATE OR REPLACE VIEW statement. When a CREATE OR REPLACE VIEW statement is issued, Oracle will disregard the error that arises when it encounters the view that already exists with that name, and it will overwrite the definition for the old view with the definition for the new one. Incorrect Answers A: There is no ALTER VIEW command in Oracle. B: There is no MODIFY VIEW command in Oracle. C: There is no ALTER VIEW command in Oracle. D: There is no MODIFY VIEW command in Oracle. F: You don't need to remove the existing view to create modified view. You are able to do that with CREATE OR REPLACE command. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 310-313 Chapter 7: Creating Other Database Objects in Oracle
Question ID 7870 | For which two constraints does the Oracle Server implicitly create a unique index? (Choose two.)
|
Option A | NOT NULL
|
Option B | PRIMARY KEY
|
Option C | FOREIGN KEY
|
Option D | CHECK
|
Option E | UNIQUE
|
Correct Answer | BE |
Explanation Explanation/Reference: Explanation: Indexes are created automatically by Oracle to support integrity constraints that enforce uniqueness. The two types of integrity constraints that enforce uniqueness are PRIMARY KEY and UNIQUE constraints. When the primary key or UNIQUE constraint is declared, a unique index to support the column's uniqueness is also created, and all values in all columns that were defined as part of the primary key or UNIQUE constraint are placed into the index. Incorrect Answers A: Oracle will not implicitly create an unique index for the NOT NULL constraint. C: Oracle will not implicitly create an unique index for the FOREIGN KEY constraint. D: Oracle will not implicitly create an unique index for the FOREIGN KEY constraint. OCP Introduction to Oracle 9i: SQL Exam Guide, Jason Couchman, p. 237-238 Chapter 5: Creating Oracle Database Objects