SQL Validator
clever writes: "Since open standards are good for pretty much everyone except closed source, multi billion, software companies that try to lock their customers into their proprietary technology I thought that the Slashdot readers might welcome a chance to help shape the next SQL-standard. The Mimer SQL Validator lets you validate any given SQL-statement against SQL-92, SQL-99 and, get this, SQL-200x (Draft spec, 2002-01-11). It stores your statement, if you'll allow it, and it will be used by the ISO SQL-200x standards committee to make statistics on commonly used features and errors to be used in the standards work. So, don't ask what SQL can do for you. Ask what you can do for SQL. In the process you will find out the proprietary features that you are already using."
I looked at the examples on their site, and several of them gave results showing syntax used which is outside the core SQL 99 standard, and they mentioned Mimer SQL several times. I can't figure this out: are they trying to get you to use their version, or what? What's this Mimer SQL stuff?
Sig (appended to the end of comments you post, 120 chars)
select * from
pretty much conforms to most SQL standards, so now we only need to stop developers from writing bad, albeit conforming, SQL.
Oh, I can't help quoting you because everything that you said rings true
I remember at the last company I worked for, we had one battered copy of the SQL92 standard (which is basically just an annotated BNF grammar) that we shared among the whole office.
This reminds me of the HTML/CSS validators that the W3 (w3.org) set forth since HTML and CSS were concieved. However, since they set for the standards, it seems everyone should follow them. Obviously, this is not true. IE support for CSS2 is almost non-existant, with Mozilla coming in with the most support.
:)) and some companies who honestly try to support all of the standards they can (Mozilla).
I think that this will become the same way. There will be many databases out there that support some of the standards, but not all of them. Some databases will be far ahead of others in standards support.
I am what you would call a standard zealot for just about any standard. Standards help any programmer (or any person for that matter) when doing anything. Standards (or at least what they _should_ do) set out a group of rules that everyone should follow in order to make portability extremely easy (again, this is from a programmers POV). However, you have different companies who want to create their own standards (and then not even follow them, MS comes to mind
I hope that DB's start to support the most current standard and fast. That way, writing abstracted DB code in any language will become *extremely* easy.
-Vic
... If you write lots of SQL it might do you some good to check out a data modelling language like Xplain. You can even get software that will take your modelling scripts and convert them to various SQL dialects.
SELECT * FROM comments
WHERE article='this one'
AND has_been_modded_up=true
^ this should obviously return 0.
MARIJUANA, SHROOMS, X: ONLINE?! - E
ANSI charges for all the standards. This, in my opinion, sucks badly.
However, you often CAN find a DRAFT (working version) of the standard available for free.
I'm not going to get into why support is so bad (my glib answer: databases suck). But I don't know of any other major standard that is so routinely disregarded. It's been a fond hope of mine that PostgreSQL would commit to standards support and (slowly) pull the rest of the industry along. But I see no indication of that.
I program SQL with two books at my side: "SQL Instant Reference" (Gruber) and "A Guide to the SQL Standard" (Date and Darwen). To me, they are lone voices of sanity! (It's hard to find a book that covers SQL the standard, not some implementation.) When I can't write a portable SQL statement because of product infidelities, I add a workaround with a big comment full bile and invectives. It's good for the soul. :-)
I hope this project helps build some momentum for SQL standards support. I'm not doing an SQL projects right now, but when I do, I'll definitely support this effort.
The evaluation of an action as 'practical' . . . depends on what it is that one wishes to practice.
With PostgreSQL, you must escape backslashes in strings. In standard SQL you must not. This is one point where PostgreSQL is as bad as MySQL.
The large syntax difference between INSERT and UPDATE. They should be interchangable. It makes it hard to reuse SQL strings in code. What the fwlk were they thinking?
It would also be nice if there was a way to have it replace if already there, otherwise insert.
Table-ized A.I.