Friday, January 18, 2008

Sql Question and answer 8

31. What are ORACLE PRECOMPILERS.

Using ORACLE PRECOMPILERS ,SQL statements and PL/SQL blocks can be contained
inside 3GL programs written in C,C++,COBOL,PASCAL, FORTRAN,PL/1 AND ADA.

The Precompilers are known as Pro*C,Pro*Cobol,...
This form of PL/SQL is known as embedded pl/sql,the language in which pl/sql is
embedded is known as the host language.

The prcompiler translates the embedded SQL and pl/sql ststements into calls to the
precompiler runtime library.The output must be compiled and linked with this library to
creater an executable.



32. What is OCI. What are its uses.

Oracle Call Interface is a method of accesing database
from a 3GL program. Uses--No precompiler is required,PL/SQL blocks are executed like
other DML
statements.
The OCI library provides
-functions to parse SQL statemets
-bind input variables
-bind output variables
-execute statements
-fetch the results

33. Difference between database triggers and form triggers.

a) Data base trigger(DBT) fires when a DML operation is performed on a data base table.Form trigger(FT) Fires when user presses a key or navigates between fields on the screen

b) Can be row level or statement level No distinction between row level and statement level.

c) Can manipulate data stored in Oracle tables via SQL Can manipulate data in Oracle tables as well as
variables in forms.

d) Can be fired from any session executing the triggering DML statements. Can be fired only from the form that define the trigger.

e) Can cause other database triggers to fire.Can cause other database triggers to fire,but not other form triggers.

34. What is an UTL_FILE.What are different procedures and functions associated with it.

UTL_FILE is a package that adds the ability to read and write to operating system files
Procedures associated with it are FCLOSE, FCLOSE_ALL and 5 procedures to output
data to a file PUT, PUT_LINE, NEW_LINE, PUTF, FFLUSH.PUT, FFLUSH.PUT_LINE,FFLUSH.NEW_LINE. Functions associated with it are FOPEN, ISOPEN.


35. Can you use a commit statement within a database trigger.
No


36. What is the maximum buffer size that can be specified using the DBMS_OUTPUT.ENABLE function?
1,000,000
Google