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

Managing Databases with Oracle Questions and Answers

11.

Oracle does NOT support a CASCADE UPDATE constraint.

Answer: A

Correct answer: True

Oracle supports ON DELETE CASCADE but has no ON UPDATE CASCADE, so a change to a parent key value cannot be propagated to the children automatically. The remedy is either a trigger or, more usually, a surrogate primary key whose value never needs to change - which removes the problem rather than working around it.

Please log in or register to report this question.

Answer: D

Correct answer: Sequences guarantee valid surrogate key values.

A sequence guarantees only that it will not hand out the same number twice. It cannot guarantee that the number is used, or used in the intended table, or that no one has inserted a conflicting value directly - numbers are also lost on rollback and on instance failure. The other three statements are correct descriptions of what a sequence is and does.

Please log in or register to report this question.

13.

SQL*Plus is a text editor.

Answer: A

Correct answer: True

SQL*Plus provides a small line editor for the statement buffer: LIST shows the lines with numbers, a line can be selected and changed with CHANGE, lines can be appended or deleted, and EDIT hands the buffer to a full external editor. It is a rudimentary facility rather than a text editor in the ordinary sense, but editing the buffer is part of what it does.

Please log in or register to report this question.

14.

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.

15.

To obtain the structure of an Oracle table, the command to use is:

Answer: B

Correct answer: DESCRIBE [ TableName ].

DESCRIBE, or DESC for short, lists the columns of a table or view with their datatypes and whether they accept nulls. It is a SQL*Plus command rather than SQL, so it takes no semicolon, and it works on views and procedures as well as tables.

Please log in or register to report this question.

16.

If there is only one statement and no ambiguity about what is wanted, Oracle will treat the semicolon and slash as the same.

Answer: A

Correct answer: True

With a single unambiguous statement in the buffer, ending it with a semicolon and typing a slash on the next line have the same effect: the statement is executed. The two are not interchangeable in general, however - a PL/SQL block contains semicolons within its own body, so only a slash can submit it.

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.

18.

Oracle commands, column names, table names, view names and all other database elements are case sensitive.

Answer: B

Correct answer: False

They are case insensitive. Commands, table names, column names and view names may be written in any case and are matched the same way, which is why SELECT * FROM Customer and select * from CUSTOMER are identical. Case matters only within quoted strings, and in identifiers deliberately created inside double quotes.

Please log in or register to report this question.

19.

The only time that case matters is inside quotation marks of strings.

Answer: A

Correct answer: True

Case is significant only where the characters are data rather than names: inside a quoted string literal, so that WHERE name = 'Smith' does not match SMITH. Everything else - keywords, table names, column names - is matched without regard to case. Identifiers created inside double quotes are the one further exception.

Please log in or register to report this question.

20.

The default extension for an Oracle SQL*Plus file is:

Answer: D

Correct answer: .sql.

SQL*Plus assumes an extension of .sql, so a script called load.sql can be run as @load or START load with the extension left off. Files with other extensions must be named in full.

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