Subject | Re: [Firebird-general] OT:Bye-bye SQL? (opinion) |
---|---|
Author | Ann W. Harrison |
Post date | 2003-05-24T15:26:25Z |
At 03:28 PM 5/20/2003 +0300, Marius Popa Adrian wrote:
alternatives. As a language it lacks symmetry - assignments in insert
are done one way, in an update differently - it promotes bad habits
- relying on the order of fields in the stored record with the *
and implicit assignment lists - and has general warts like referencing
context variables before they are defined.
In it's original form, it was completely inappropriate for stored
procedures having no conditional or looping expressions. Unlike
some of the alternatives it requires variable declarations which it
did not support. Note that you can't put any of those extensions
into a query.
problem with the SQL standard is that it does not provide any
plausible standard mechanism for passing queries from the client
to the database or passing data back.
join orders o on c.cust_id = o.cust_id
join orders oh on c.cust_id = oh.cust_id
where o.item = 'patio furniture'
and oh.item = 'barbecue'
and oh.date <= o.date + 7
and oh.date >= o.date - 7
Ok, so it's not select * from customers, but it's not rocket science
either.
In the absence of jdbc, odbc, or another intermediate transport layer,
I defy you to write even the simplest SQL in a C program that will
run against any two of Oracle, Sybase, and Firebird.
the best part of relational databases - the separation of the logical and
physical database representations.
Regards,
Ann
>Although it may seem a no-brainer today, SQL took some time to getI am one of those who was not enamored of SQL when there were still
>established with by no means all vendors subscribing to the notion of a
>common database query language. That, remember, is what SQL was originally
>designed to do - provide set-based query processing - the fact that it was
>soon appreciated that it could be used for other purposes, such as writing
>stored procedures, was a bonus.
alternatives. As a language it lacks symmetry - assignments in insert
are done one way, in an update differently - it promotes bad habits
- relying on the order of fields in the stored record with the *
and implicit assignment lists - and has general warts like referencing
context variables before they are defined.
In it's original form, it was completely inappropriate for stored
procedures having no conditional or looping expressions. Unlike
some of the alternatives it requires variable declarations which it
did not support. Note that you can't put any of those extensions
into a query.
>However, by the middle of the decade there was a real sense that newReally? I must have been in the bath. Seriously, the fundamental
>versions of the ANSI standard would subsume most of the differences
>between the different versions, and we would actually get a genuine SQL
>standard that was widely deployed and only minimally extended.
problem with the SQL standard is that it does not provide any
plausible standard mechanism for passing queries from the client
to the database or passing data back.
>"Who bought a barbecue within seven days of purchasing patio furniture?").select c.name from customers c
join orders o on c.cust_id = o.cust_id
join orders oh on c.cust_id = oh.cust_id
where o.item = 'patio furniture'
and oh.item = 'barbecue'
and oh.date <= o.date + 7
and oh.date >= o.date - 7
Ok, so it's not select * from customers, but it's not rocket science
either.
>If companies are introducing hundreds of proprietary extensions to SQL hasNo change there.
>it actually gone so far away from the standard that to talk about it as if
>it were a common language is absurd?
>The short answer to this question will depend on how you look at it. ForAnyone who thinks that is either very naive or completely delusional.
>all practical purposes, we should now be thinking about SQL as a language
>with a standard kernel and potentially unlimited extensions. However, the
>market has a vested interest in making us believe that SQL still remains a
>truly portable language.
In the absence of jdbc, odbc, or another intermediate transport layer,
I defy you to write even the simplest SQL in a C program that will
run against any two of Oracle, Sybase, and Firebird.
>There are some signs that suppliers are moving away from SQL. InBut java extended with SQL.
>particular, it is no longer the only language you can use for writing
>stored procedures. Vendors like Oracle and FirstSQL allow you to use Java
>as an alternative.
>Yet the language is clearly inadequate, ... in the way that it allows theActually, that's one thing I consider a strength and an important part of
>execution of very poorly formed code (which is why database optimisers
>have SQL rewrite capability).
>Arguably this is a good thing - it allows novice programmers to still
>create useful queries - but it leads to bad habits and can hardly be
>considered a sound premise.
the best part of relational databases - the separation of the logical and
physical database representations.
Regards,
Ann