Tag: databases

Questions Related to databases

You examine the alert log file and notice that errors are being generated from a SQL*Plus session. Which files are best for providing you with more information about the nature of the problem?

  1. Control file

  2. User trace files

  3. Background trace files

  4. Initialization parameter files


Correct Option: B
Explanation:

To answer this question, the user needs to have knowledge about the Oracle database architecture and various files associated with it.

The alert log file is a chronological log of messages and errors from an Oracle Database instance. It contains information about database startup and shutdown, log switches, and various error messages.

When errors are being generated from a SQL*Plus session, user trace files and background trace files are the best files to provide more information about the nature of the problem.

User trace files are generated when a user session encounters an error or when a user explicitly requests tracing. These files contain detailed information about the SQL statements executed, as well as any associated errors or warnings.

Background trace files are generated by Oracle background processes, such as the database writer, log writer, and checkpoint processes. These files contain detailed information about the internal workings of the Oracle Database instance, including errors or warnings encountered by the background processes.

Control file and initialization parameter files are essential files for the proper functioning of the Oracle database but are not useful in providing more information about the nature of errors generated from a SQL*Plus session.

Therefore, the correct answer is:

The Answer is: B. User trace files and C. Background trace files

  1. CREATE TABLE EMP9$# AS (empid number(2));

  2. CREATE TABLE EMP*123 AS (empid number(2));

  3. CREATE TABLE PACKAGE AS (packid number(2));

  4. CREATE TABLE 1EMP_TEST AS (empid number(2));


Correct Option: C

A SELECT statement can be to perform these three functions: -Choose rows from a table -Choose columns from a table -Bring together data that is stored in different tables by creating a link between them. Which set of keywords describe these capabilities?

  1. difference,projection,join

  2. selection.projection,join

  3. selection,intersection,join

  4. intersection,projection,join

  5. difference,projection,product


Correct Option: B
  1. string

  2. character

  3. integer

  4. numeric

  5. date

  6. conversion


Correct Option: B,D,E,F
  1. DELETE,INSERT,SELECT

  2. ALTER,DELETE,INSERT,SELECT

  3. DELETE,INSERT,SELECT,UPDATE

  4. none


Correct Option: C
  1. Substitution variables

  2. Replacement variables

  3. Prompt variables

  4. Instead-of variables

  5. This feature cannot be implemented through iSQL*PLUS


Correct Option: A
Explanation:

To solve this question, the user needs to have knowledge about iSQL*PLUS and its features.

The answer is A. Substitution variables.

Explanation:

Substitution variables can be used to replace values in the WHERE clause of an iSQL*PLUS query. Substitution variables are identified by an ampersand (&) followed by a variable name. When a query is executed, iSQL*PLUS prompts the user to enter a value for each substitution variable. The entered value is then substituted in place of the substitution variable in the query.

Option B, Replacement variables, is not a valid iSQL*PLUS feature.

Option C, Prompt variables, is not a valid iSQL*PLUS feature.

Option D, Instead-of variables, is not a valid iSQL*PLUS feature.

Option E is incorrect because substitution variables can be used in iSQL*PLUS to replace values in the WHERE clause.

Therefore, the correct answer is A. The Answer is: A

You want to display the titles of books that meet these criteria: 1. Purchased before January 21,2001 2. Price is less than $500 and greater than $900 You want to sort the results by thier date of purchase, starting with the most recently bought book. Which statement should you use?

  1. SELECT book_title FROM books WHERE price between 500 and 900 AND puchase_date < '21-JAN-2001' ORDER BY purchase_date;

  2. SELECT book_title FROM books WHERE price IN (500,900) AND puchase_date < '21-JAN-2001' ORDER BY purchase_date ASC;

  3. SELECT book_title FROM books WHERE price <500 or >900 AND puchase_date < '21-JAN-2001' ORDER BY purchase_date DESC;

  4. SELECT book_title FROM books WHERE (price<500 OR price>900) AND puchase_date < '21-JAN-2001' ORDER BY purchase_date DESC;


Correct Option: D
  1. Immediately after the SELECT clause

  2. Before the WHERE clause

  3. Before the FROM clause

  4. After the ORDER BY clause

  5. After the WHERE clause


Correct Option: E
  1. Both tables have NULL values

  2. You want all unmatched data from one table

  3. You want all matched data from both tables

  4. You want all unmatched data from both tables

  5. One of the tables has more data than the other

  6. You want all matched and unmatched data from only one table


Correct Option: D