Database Administration and PL/SQL Concepts

Covers data architecture, database modeling, PL/SQL procedures, triggers, packages, functions, and database administration concepts

20 Questions Published

Questions

Question 1 Multiple Choice (Single Answer)

Transaction ends

  1. Only when it is Committed
  2. Only when it is Rolledback
  3. When it is Committed or Rolledback
  4. None of the above
Question 2 Multiple Choice (Single Answer)

What SYSTEM VARIABLE is used to refer DATABASE TIME ?

  1. $$dbtime$$
  2. $$time$$
  3. $$datetime$$
  4. None of the above
Question 3 Multiple Choice (Single Answer)

Which of the following is not correct about a View ?

  1. To protect some of the columns of a table from other users
  2. Ocuupies data storage space
  3. To hide complexity of a query
  4. To hide complexity of a calculations
Question 4 Multiple Choice (Single Answer)

CREATE OR REPLACE FUNCTION CALC_PLAYER_AVG (V_ID in PLAYER_BAT_STAT.PLAYER_ID%TYPE) RETURN NUMBER IS V_AVG NUMBER; BEGIN SELECT HITS / AT_BATS INTO V_AVG FROM PLAYER_BAT_STAT WHERE PLAYER_ID = V_ID; RETURN (V_AVG); END; Which statement will successfully invoke this function in SQL *Plus

  1. SELECT CALC_PLAYER_AVG(PLAYER_ID) FROM PLAYER_BAT_STAT;
  2. EXECUTE CALC_PLAYER_AVG(31);
  3. CALC_PLAYER(‘RUTH’);
  4. CALC_PLAYER_AVG(31);
Question 5 Multiple Choice (Single Answer)

Which is the true statements about dependent objects?

  1. An object with status of invalid cannot be a referenced object.
  2. The Oracle server automatically records dependencies among objects.
  3. All schema objects have a status that is recorded in the data dictionary.
  4. You can view whether an object is valid or invalid in the USER_STATUS data dictionary view.
Question 6 Multiple Choice (Single Answer)

You have created a stored procedure DELETE_TEMP_TABLE that uses dynamic SQL to remove a table in your schema. You have granted the EXECUTE privilege to user A on this procedure. When user A executes the DELETE_TEMP_TABLE procedure, under whose privileges are the operations performed by default?

  1. SYS privileges
  2. Your privileges
  3. Public privileges
  4. User A’s privileges
Question 7 Multiple Choice (Single Answer)

CREATE OR REPLACE PRODECURE add_dept (p_dept_name VARCHAR2 DEFAULT ‘placeholder’, p_location VARCHAR2 DEFAULT ‘Boston’) IS BEGIN INSERT INTO departments VALUES (dept_id_seq.NEXTVAL, p_dept_name, p_location); END add_dept; / Which is invalid call to the add_dep procedure? (Choose three

  1. add_dept;
  2. add_dept(‘Accounting’);
  3. add_dept(, ‘New York’);
  4. add_dept(p_location=>’New York’);
Question 8 Multiple Choice (Single Answer)

Which programming constructs can be grouped within a package?

  1. Cursor
  2. Trigger
  3. Sequence
  4. View
Question 9 Multiple Choice (Single Answer)

Which statement describe the state of a package variable after executing the package in which it is declared?

  1. It persists across transactions within a session.
  2. It persists from session to session for the same user.
  3. It does not persist across transaction within a session.
  4. It persists from user to user when the package is invoked.
Question 10 Multiple Choice (Single Answer)

Which statement is valid when removing procedures?

  1. Use a drop procedure statement to drop a standalone procedure.
  2. Use a drop procedure statement to drop a procedure that is part of a package. Then recompile the package specification.
  3. Use a drop procedure statement to drop a procedure that is part of a package. Then recompile the package body.
  4. For faster removal and re-creation, do not use a drop procedure statement. Instead, recompile the procedure using the alter procedure statement with the REUSE SETTINGS clause.
Question 11 Multiple Choice (Single Answer)

Which statement is false?

  1. If errors occur during the compilation of a trigger, the trigger is still created.
  2. If errors occur during the compilation of a trigger you can go into SQL *Plus and query the USER_TRIGGERS data dictionary view to see the compilation errors.
  3. If errors occur during the compilation of a trigger you can use the SHOW ERRORS command within iSQL *Plus to see the compilation errors.
  4. If errors occur during the compilation of a trigger you can go into SQL *Plus and query the USER_ERRORS data dictionary view to see compilation errors.
Question 12 Multiple Choice (Single Answer)

Which dictionary views track dependencies?

  1. USER_SOURCE
  2. UTL_DEPTREE
  3. USER_OBJECTS
  4. DEPTREE_TEMPTAB
Question 13 Multiple Choice (Single Answer)

What happens during the execute phase with dynamic SQL for INSERT, UPDATE, and DELETE operations?

  1. The rows are selected and ordered.
  2. The validity of the SQL statement is established.
  3. An area of memory is established to process the SQL statement.
  4. The SQL statement is run and the number of rows processed is returned.
Question 14 Multiple Choice (Single Answer)

What part of a database trigger determines the number of times the trigger body executes?

  1. Trigger type
  2. Trigger body
  3. Trigger event
  4. Trigger timing
Question 15 Multiple Choice (Single Answer)

Which table should you query to determine when your procedure was last compiled?

  1. USER_PROCEDURES
  2. USER_PROCS
  3. USER_OBJECTS
  4. USER_PLSQL_UNITS
Question 16 Multiple Choice (Single Answer)

In strict relational terminology, an attribute is

  1. a record
  2. a field
  3. a table
  4. an entity
Question 17 Multiple Choice (Single Answer)

"A student has such attributes as name, address, and gender. A student can also attend a graduate, undergraduate, or elective class that has the following attributes: class name, section name, major, and instructor. Based on the scenario above, which is the composite key in a junction table if many students can attend many classes?

  1. section name, age
  2. name
  3. undergraduate
  4. name, class name
  5. major, gender
Question 18 Multiple Choice (Single Answer)

Which of the following is not a data modeling tool?

  1. Visio
  2. ERwin
  3. ER/Studio
  4. Data Builder
  5. empowER
Question 19 Multiple Choice (Single Answer)

What is the goal of Data Architecture?

  1. Design logical data systems
  2. Design physical storage system
  3. Define data entities relevant to the enterprise
  4. All of the above
Question 20 Multiple Choice (Single Answer)

Data architecture document does not include:

  1. Business Data Model
  2. Logical Data Model
  3. Data Management Process Model
  4. Data entity/business function Matrix
  5. Data Interface requirements