Database [3i Infotech Placement]: Sample Questions 77 - 78 of 294

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

Question 77

Database
Edit

Describe in Detail

Essay▾

What is 4NF?

Explanation

Forth Normal Form (4NF)
  • Tables cannot have multi-valued dependencies on a Primary Key.
  • A relation schema R is said to be in 4NF if for every Multivalued dependency X Y that holds over R, one of following is true
  • X is subset or equal to (or) XY = R.
  • X is a super key.

Question 78

Database
Edit

Describe in Detail

Essay▾

How are exceptions handled in PL/SQL? Give some of the internal exceptions ′ name

Explanation

  • Exceptions are run-time errors from design faults, coding mistakes, hardware failures, and many other sources.
  • Not be captured at the time of compilation and hence are handled only at the run-time.
  • Example- if PL/SQL engine receives an instruction to divide any number by ‘0’ then an exception is thrown.
  • Only raised at the run-time by the PL/SQL engine.

There are two type of exceptions:

  1. System-defined Exceptions
  2. User-defined Exceptions

System-Defined Exceptions

  • Two types of system defined exception
    • Named system exceptions
    • Un-named system exceptions.
  • Named system exceptions:
    • Predefined exceptions created by the SQL to handle the known types of errors.
    • They are defined by the SQL and need not be redefined by the user.
    • For example, ‘ZERO_DIVIDE’ is the predefined exception to handle division by zero.
  • Un-named system exceptions:
    • Have predefined error numbers and error code/message.
    • Do not occur as frequently as named exceptions.

User -Define Exception

  • Defined by the developers based on the business rules.
  • Are declared and assigned error code and names and handled in the exception block by calling the names as we do it in other exceptions.

Developed by: