-
20
pages
-
English
-
Documents
Description
4 Application Programming4.1 PL/SQL4.1.1 IntroductionThe development of database applications typically requires language constructs similar to thosethat can be found in programming languages such as C, C++, or Pascal. These constructs arenecessary in order to implement complex data structures and algorithms. A major restrictionof the database language SQL, however, is that many tasks cannot be accomplished by usingonly the provided language elements.PL/SQL (Procedural Language/SQL) is a procedural extension of Oracle-SQL that offers lan-guage constructs similar to those in imperative programming languages. PL/SQL allows usersand designers to develop complex database applications that require the usage of control struc-tures and procedural elements such as procedures, functions, and modules.The basic construct in PL/SQL is a block. Blocks allow designers to combine logically related(SQL-) statements into units. In a block, constants and variables can be declared, and variablescan be used to store query results. Statements in a PL/SQL block include SQL statements,control structures (loops), condition statements (if-then-else), exception handling, and calls ofother PL/SQL blocks.PL/SQL blocks that specify procedures and functions can be grouped into packages. A packageis similar to a module and has an interface and an implementation part. Oracle offers severalpredefined packages, for example, input/output routines, file handling, job scheduling etc. ...
-
Publié par
-
Langue
English