Oracle Questions

(Oracle)

1.What is a Tablespace?

  1. A physical unit where tables are stored.
  2. A memory unit where data is stored.
  3. A memory unit where tables are stored.
  4. A logical unit where tables are stored.

Ans [c]

  1. What is Save Point?
  2. A Point in a transaction until where we can Rollback.
  3. A Point in a transaction until where we can Commit.
  4. A Point in a transaction until where we can drop a table.
  5. A Point in a transaction until where we can alter transaction.

Ans [a]

  1. How do you store images in Oracle Database (only in Ver 8.0 and higher)?

Ans.

By using a Long Raw column.

4. What Oracle object allows a user to reference another user's objects by the name the owner gave to it?

Choice 1

SELECT privilege

Choice 2

PRAGMA

Choice 3

SCHEMA

Choice 4

SYNONYM

Choice 5

GRANT

  1. Is it possible to use Transaction control statements such as ROLLBACK or COMMIT in Database Trigger? Why?

Ans.

It is not possible, as Triggers are defined for each table, if you use COMMIT or ROLLBACK in a trigger, it affects logical transaction processing.

  1. What is the difference between %ROWTYPE and TYPE RECORD?

Ans.

%ROWTYPE is to be used whenever query returns an entire row of a table or view.

TYPE RECORD is to be used whenever the query returns columns of different table or views and variables.

7. SELECT text

FROM all_source

WHERE name = 'ADDRESS_PACKAGE';

If a developer wishes to view the source code for a programmer-defined package, what problem(s) might he or she encounter by running the SQL statement above?

Choice 1

In addition to the package source code, the user may be selecting the source code for a package of the same name developed under a different user.

Choice 2

In addition to the package source code, the user may be selecting the source code for a trigger of the same name developed under a different user.

Choice 3

In addition to the package source code, the user may be selecting the source code for a table of the same name developed under a different user.

Choice 4

In addition to the package source code, the user may be selecting the source code for a view of the same name developed under a different user.

Choice 5

All of these are possible problems the developer might encounter.

8. DECLARE

lc1 CHAR;

lc2 CHAR(20);

lv1 VARCHAR2(20);

BEGIN

lc2 := 'CAT';

lv1 := 'MOUSE';

DBMS_OUTPUT.PUT_LINE (NVL (LENGTH (lc1), -1));

DBMS_OUTPUT.PUT_LINE (NVL (LENGTH (lc2), -1));

DBMS_OUTPUT.PUT_LINE (NVL (LENGTH (lv1), -1));

END;

What is the result of the sample code above?

Choice 1

1

3

5

Choice 2

-1

3

5

Choice 3

-1

20

5

Choice 4

1

20

5

Choice 5

1

20

20

Ans [Choice 3]

(Forms)

  1. What is the difference between system.current_field and system.cursor_field?

Ans.

  1. System.current_field gives the name of the field.
  2. System.cursor_field gives the name of the field with block name.
  1. What are the different objects that you cannot copy or reference in object group?
  2. Objects of different modules.
  3. Objects from another object group.
  4. Object from independent block’s dependent items.
  5. Program units.
  6. All the above.

Ans. [e]

  1. What are the different Models of Windows?

Ans.

  1. Model windows.
  2. Modeless windows.
  1. Give the sequence of execution of trigger fired on an item.
  2. POST-CHANGE
  3. KEY-NEXT-ITEM
  4. WHEN-VALIDATE-RECORD
  5. POST-TEXT-ITEM

Ans [b,a,d,c]

  1. How can a customized message passed to the user from Oracle Reports?

Ans.

By using SRW.MESSAGE function.

(Reports)

  1. What is the difference between a Break-Report and a Master-Details Report?

Ans.

Break Report can be created on a single table where-as Master-Datails report requires a minimum of two tables.