On 15.07.2008 22:41, Mads wrote:
Quote:
Am I just "in the wrong circles" when I consider embedded SQL mostly
confined to the mainframe world? |
Probably not.
Quote:
And if not, why do people think ODBC/JDBC is so much more popular than
embedded SQL? |
Nowadays many seem to be using some or another form of persistence
framework (e.g. OR mapper) which hides SQL (completely) from the
application. So there is no room for embedded SQL in the application as
well as the framework, as that has to generate SQL statements typically
based on some meta data.
Then there is also the issue of compatibility: If you try to write a
multi DB application you might make your life much harder with
preprocessing since you potentially need multiple preprocessors for each
database type and consequently multiple applications. (Cross DB is a
myth most of the time anyway but in some cases it can be done). In Java
it is more common to do such distinctions at runtime which would be
harder with multiple preprocessors. There is a standard called "SQLJ"
for embedded SQL in Java which focuses on syntax and there seem to be
multiple implementations available.
I personally also would rather use plain JDBC instead of adding one more
step to a build process. Syntax and type errors should be caught during
testing anyway. And needing a preprocessor for Java code can actually
make working with an IDE harder. See also
http://en.wikipedia.org/wiki/SQLJ
Just my 0.02 EUR...
Kind regards
robert