Machine-translated by Google. Questions are authored in English.
Top

Managing Databases with Oracle Questions and Answers

11.

Which prefixes are available to Oracle triggers?

Answer: C

Correct answer: Both :new and :old

A row-level trigger can refer to the values before the change with :old and after it with :new. Which are meaningful depends on the statement: an insert has only :new, a delete only :old, and an update both, which is what allows a trigger to compare the two and act on the difference.

Please log in or register to report this question.

Answer: C

Correct answer: To see the errors, enter SHOW ERRORS in SQL*Plus.

SQL*Plus reports only that the procedure was created with compilation errors; the errors themselves must be asked for with SHOW ERRORS. The line numbers it then gives are counted from the start of the CREATE statement, which will not match a text editor’s numbering unless the statement begins on line one of the file.

Please log in or register to report this question.

Answer: D

Correct answer: Indexes are created with the ALTER TABLE command.

Indexes are created with CREATE INDEX, and a unique index is also created implicitly when a primary key or unique constraint is declared. ALTER TABLE modifies the table, not the indexes on it. The other three statements are correct: indexes enforce uniqueness, speed retrieval, and are most worthwhile on columns frequently tested for equality.

Please log in or register to report this question.

Answer: A

Correct answer: Oracle views cannot use the ORDER BY clause in view definitions.

This is the statement that is not true, and it is the one place where Oracle departs from the standard in the permissive direction. SQL-92 forbids ORDER BY in a view definition, on the ground that a view is a relation and a relation has no order; Oracle allows it, which is convenient and is the exception the item is testing.

Please log in or register to report this question.

Answer: C

Correct answer: A semicolon ( ; ) followed by [Enter].

The semicolon terminates the statement and submits it in one action. The forward slash on a line of its own does something slightly different: it executes whatever is currently in the buffer, which is how a statement is re-run or how a PL/SQL block, whose body contains semicolons of its own, is finally submitted.

Please log in or register to report this question.

16.

Which of the following is NOT an Oracle-supported trigger?

Answer: B

Correct answer: DURING

Oracle triggers fire BEFORE or AFTER the triggering statement, or INSTEAD OF it, the last being used on views that are not otherwise updatable. There is no DURING option, and there could not usefully be one, since the statement is atomic from the trigger’s point of view.

Please log in or register to report this question.

17.

After a table has been created, its structure can be modified using the SQL command:

Answer: C

Correct answer: ALTER TABLE [ TableName ].

ALTER TABLE is the standard command for changing an existing table - adding or dropping a column, changing a datatype, adding or removing a constraint. UPDATE changes data rather than structure, and the other two are not SQL commands at all.

Please log in or register to report this question.

Answer: D

Correct answer: You cannot increase or decrease the number of decimal places.

This is the statement that is untrue: the scale of a numeric column can be altered, subject to the existing data fitting. The other three hold - a column may be dropped, a column may be added provided it allows nulls or a default is supplied, and character length and numeric precision may be increased freely.

Please log in or register to report this question.

Answer: A

Correct answer: Using the Oracle Database Configuration Assistant.

The Configuration Assistant is a guided tool that creates the database, its files, its parameter file and its initial users in one operation, and it is the recommended route because it is difficult to omit a step. The CREATE DATABASE command gives complete control at the price of having to get every detail right by hand.

Please log in or register to report this question.

20.

What Oracle backup and recover file contains user and system data?

Answer: B

Correct answer: Datafile

The datafiles hold the actual contents of the database - the user tables and indexes and the data dictionary alike. The control file records the physical structure of the database and the state of the files, and the redo logs record the changes made, so all three are needed for recovery but only the datafiles hold the data itself.

Please log in or register to report this question.

Loading…

Other Subjects

Tags: Managing Databases with Oracle Questions and Answers || Managing Databases with Oracle MCQ Questions and Answers || Managing Databases with Oracle GK Questions and Answers || Managing Databases with Oracle GK MCQ Questions || Managing Databases with Oracle Multiple Choice Questions and Answers || Managing Databases with Oracle GK || GK on Managing Databases with Oracle || Database Questions and Answers || Database MCQ Questions and Answers || Database GK Questions and Answers || GK on Database