0

databases Online Quiz - 34

Description: databases Online Quiz - 34
Number of Questions: 20
Created by:
Tags: databases
Attempted 0/20 Correct 0 Score 0
  1. Only when it is Committed

  2. Only when it is Rolledback

  3. When it is Committed or Rolledback

  4. None of the above


Correct Option: C

What SYSTEM VARIABLE is used to refer DATABASE TIME ?

  1. $$dbtime$$

  2. $$time$$

  3. $$datetime$$

  4. None of the above


Correct Option: A
  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


Correct Option: B

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.


Correct Option: B

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


Correct Option: B

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’);


Correct Option: C
  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.


Correct Option: A
Explanation:

To answer this question, the user needs to understand the concept of package variables in PL/SQL.

Package variables are variables that are declared in the package specification and can be accessed by any subprogram or procedure defined in the package. The state of a package variable after executing the package depends on its type.

Option A is correct. Package variables persist across transactions within a session. This means that the value of a package variable remains the same during the lifetime of the session, even if multiple transactions are executed. The value of the variable can be changed by any subprogram or procedure defined in the package.

Option B is incorrect. Package variables do not persist from session to session for the same user. When a user logs out of the session and logs back in, the package variable is reinitialized with its default value.

Option C is incorrect. Package variables persist across transactions within a session. The value of a package variable remains the same during the lifetime of the session, even if multiple transactions are executed.

Option D is incorrect. Package variables do not persist from user to user when the package is invoked. When a different user invokes the package, the package variable is reinitialized with its default value.

Therefore, the correct answer is:

The Answer is: A

  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.


Correct Option: A
  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.


Correct Option: B
  1. USER_SOURCE

  2. UTL_DEPTREE

  3. USER_OBJECTS

  4. DEPTREE_TEMPTAB


Correct Option: D
  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.


Correct Option: D

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


Correct Option: C

AI Explanation

To determine when your procedure was last compiled, you should query the USER_OBJECTS table.

Let's analyze each option to understand why the correct answer is C:

Option A) USER_PROCEDURES - This option is incorrect because the USER_PROCEDURES table does not provide information about when a procedure was last compiled. It contains information about procedures owned by the current user, but not the compilation timestamp.

Option B) USER_PROCS - This option is incorrect because there is no standard Oracle table named USER_PROCS. It is not a valid table in the Oracle database.

Option C) USER_OBJECTS - This option is correct because the USER_OBJECTS table contains information about all objects owned by the current user, including procedures. It includes a LAST_DDL_TIME column that represents the timestamp of the last DDL (Data Definition Language) operation performed on the object, which includes the compilation of a procedure.

Option D) USER_PLSQL_UNITS - This option is incorrect because the USER_PLSQL_UNITS table stores information about PL/SQL units, such as packages, functions, and procedures. However, it does not specifically provide information about when a procedure was last compiled.

The correct answer is C) USER_OBJECTS. This table should be queried to determine when your procedure was last compiled because it includes the necessary information in the LAST_DDL_TIME column.

  1. a record

  2. a field

  3. a table

  4. an entity


Correct Option: B

"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


Correct Option: D
  1. Visio

  2. ERwin

  3. ER/Studio

  4. Data Builder

  5. empowER


Correct Option: D
  1. Design logical data systems

  2. Design physical storage system

  3. Define data entities relevant to the enterprise

  4. All of the above


Correct Option: C
  1. Business Data Model

  2. Logical Data Model

  3. Data Management Process Model

  4. Data entity/business function Matrix

  5. Data Interface requirements


Correct Option: E
- Hide questions