Database-MySQL [PCS Infotech Placement]: Sample Questions 8 - 9 of 23

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 8

Edit

Statement

True-False▾

In SQL SGA area the parser tree and exceptions are stored which are used for multiple applications.

Answer

FALSE

Explanation

  • SGA is used to store incoming data and control the information.
  • Area of memory allocated when an oracle instance starts up.
  • Size and function are controlled by initialization parameters.
  • Contains shared server and background processes.

Common Components in STA

  • Data buffer cache:
    • Cache data and index block for faster access.
  • Shared pool:
    • Cache parsed SQL and PL/SQL statements.
  • Dictionary cache:
    • Information about data dictionary objects.
  • Redo Log Buffer:
    • Committed transactions that are not written to the redo log files.
  • JAVA pool:
    • Caches parsed java program
  • Streams pool:
    • Caches oracle streams objects.
  • Large pool:
    • Used for backup.

Question 9

Edit

Statement

True-False▾

SQL % ISOPEN for implicit cursor is always evaluate to false

Answer

FALSE

Explanation

Atrributes of SQL Cursor
  • The % ISOPEN attribute is used with cursors.
  • For explicit and implicit cursor it evaluates to TRUE if the cursor is open.
  • Closing a closed cursor produces an error- Unlike host file processing- closing the same file twice generates no exception.
  • Ex. .

    IF c1 % ISOPEN THEN

    - continue

    ELSE

    CLOSE c1;

    END IF;

  • The % ISOPEN attribute is preceded by the cursor name.
  • % ISOPEN can be used in procedural statements but not from SQL.
  • SQL cursors closed automatically after use so the SQL % ISOPEN attribute will always evaluate to FALSE.

Developed by: