www .Just SQL. com  

a site for the SQL*Plus specialist

Site Map

 Home  Intro Remarks  Tutorial  Rules  The Scripts

 Introductory Remarks...


At its most simple, SQL is written and submitted to Oracle, which results in a further SQL script being the output of that first script.

In fact, the structure can be extended infinitely, such that a sucession of SQL scripts all produce scripts in their turn, until the final script represents the culmination of complex and sophisticated logic.

It is important to recognise that two things are happening here - on the one hand pure set-based processing is being initiated (each SQL statement is a set-based operation). But because the output of one script feeds to the input of the second script, one has realised the ability to apply sequential processing within the SQL environment. This is the combination which makes the technique so powerful, and enables one to achieve very terse, very complex scripts which in only a few lines can achieve what can often takes pages of conventional 3GL programming.

There are other benefits here - by avoiding use of a 3GL, one can (with experience) build solutions much faster. No compilation is required. These scripts will operate against any version of Oracle, so long as one takes account of enhancements Oracle makes to their implementation of SQL.

If one takes care to build SQL using only standard SQL (which includes avoiding the use of that silver bullet 'decode'!), these scripts can be expected to run against any database system. Here it is - complex database programming which is trully independent of the SQL-DBMS product!

Well, that is the theory - I would be very interested to hear from anyone able to run any of these scripts against database systems other than Oracle.

One cannot pass without a brief comment on PL/SQL. Although there is an overlap in some functionality, the code generation represents a much more 'open' environment. System files are easily accessible, both for creation and subsequent implemetation. No compilation is required. The full suite of SQL*Plus set controls are also available. Further, PL/SQL is specific to Oracle. It is also the author's belief that one should only move to PL/SQL when SQL itself cannot provide a timely solution. SQL is, after all, the PRIMARY route into the database.


[Home] [Inspiration] [About this Site] [Scripts Intro] [Publications]

e-Mail Connection