InterviewSolution
| 1. |
State the advantages of PL/SQL? |
|
Answer» PL/SQL is an extension for SQL and Oracle. It enhances the CAPABILITIES of SQL. Therefore, with every release of the Oracle Database, the feature and functionalities of PL/SQL is enhanced. It is strongly integrated with SQL and supports both static and dynamic SQL. The following are the advantages of PL/SQL:
PL/SQL has both static and dynamic SQL. Static SQL with DML operations and transaction control from PL/SQL block. SQL allows embedding DDL statements in PL/SQL blocks in Dynamic SQL.
PL/SQL has exception handling that helps in EASIER debugging.
PL/SQL allows faster update of database. Therefore, beneficial for programmers.
With PL/SQL, we can easily perform faster execution of queries.
PL/SQL executes as a whole block i.e. sends entire block of statements to the database at once.
Since PL/SQL is an extension of SQL, you get access to predefined SQL packages.
PL/SQL also comes with the functionality of Triggers. Triggers are stored in a database and fired when some event occurs. The event here can be a Database Manipulation statement i.e. DELETE, INSERT, or UPDATE, or a Database Definition statement (CREATE, ALTER, or DROP).
PL/SQL and SQL brings optimal efficiency since it runs within the same server process.
Error Management in PL/SQL brings in internally defined, predefined, and user-define exceptions and process to handle them with error codes and messages. With that, PL/SQL also has RAISE statement for your own defined exceptions. |
|