Chapter Nine. The PLSQL Environment


Chapter Nine. The PL/SQL Environment

9.1 A HELLO WORLD PROGRAM

9.2 REFERENCING ORACLE PACKAGES

9.2.1 Creation of the Environment

9.2.2 The API

9.3 USER_OBJECTS

9.4 DEPENDENCIES AMONG PROCEDURES

9.5 USER_DEPENDENCIES

9.6 USER_SOURCE

9.7 SHARING CODE

9.8 COMPILATION DEPENDENCY

9.8.1 Scenario 1

9.8.2 Scenario 2

9.9 USER_ERRORS

For traditional compiler languages, such as C, we write our source code and then compile it. We may choose from one of several compilers. The compilation produces a second file ”an object file. We then use a linker to link one or more objects into an executable. The compile and link process leaves us with our source, several object files, and an executable image that is executed under the control of the operating system. The finished program may use some system library functions that perform services such as file open , put line, and file close.

The PL/SQL model is different and simpler from traditional programming, as just described. With PL/SQL, you start with writing your own source using a "SQL" filename extension. Once you have the ASCII text file with a "SQL" extension you compile it, but think of Oracle as your compiler. Oracle compiles your code and checks for syntax errors. After the compile, you have no additional files ”there is no object file following the compile. The equivalent of the object and executable image is P-code that is stored in the database data dictionary. Additionally, Oracle stores the source code you just compiled in the data dictionary.

There are Interactive Development Environment (IDE) options to coding with a text editor, including Oracle Procedure Builder, which provides a graphical user interface (GUI) for creating, editing, and compiling both client- and server-side PL/SQL.



Programming Oracle Triggers and Stored Procedures
Programming Oracle Triggers and Stored Procedures (3rd Edition) (Prentice Hall PTR Oracle Series)
ISBN: 0130850330
EAN: 2147483647
Year: 2003
Pages: 111
Authors: Kevin Owens

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net