Database-Oracle [3i Infotech Placement]: Sample Questions 15 - 16 of 132

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 15

Oracle
Edit

Describe in Detail

Essay▾

How is a “cursor” used?

Explanation

Explanation of Cursor
  • Cursors processes individual rows returned by database system queries
  • Temporary work area created in the system memory, when a SQL statement is executed,
  • Used to store the data retrieve from the database this data.
  • Can hold more than one row, but can process only one row at a time.

Basically, two types of cursor

  1. Implicit cursor
  2. Explicit cursor

Implicit Cursors

  • Implicit cursors created when DML statement, INSERT, UPDATE, and DELETE statement are executed.
  • This cursor also created when, a SELECT statement that return only one row executed.

Explicit Cursors

  • Explicit cursor created when executing a SELECT statement, it is returns more than one row.
  • The cursors have multiple records, only one record can be processed at a time.

Both cursor have the same functionality, but have different way of access.

Question 16

Oracle

Question

MCQ▾

Which of the following does not affect the size of the SGA

Choices

Choice (4)

a.

Database buffer

b.

Redolog buffer

c.

Shared pool

d.

Stored procedure

Answer

d.

Explanation

Structure of System Global Area
  • The SGA (System Global Area) is an area of memory allocated when an Oracle Instance starts.
  • Its size and function controlled by initialization parameters.
  • Contains data buffer areas; redo log buffers and the shared pool.
  • Used by oracle processes to hold shared database instance information.
  • Oracle uses initialization parameters to control the amount of allocated SGA memory.

SGA Components Are as Follow

  • Dictionary cache
    • It is holds data dictionary table information and information regarding accounts, segments, data files, tables and privileges
  • Redo log buffer
    • Includes information about committed transactions that have not yet been written to online redo log files
  • BUFFER_CATCH
    • It is holds a copy of data blocks read from data files
  • Shared pool
    • Holds a cache of parsed and commonly used Structured Query Language (SQL) statements
  • Java pool
    • Parses Java statements.
The SGA Components

Developed by: