2009/4/9 Boris Zbarsky <bzbar...@mit.edu>: > Giovanni Campagna wrote: >> >> We have a standard SQL, and we have DBMS-specific extensions (for >> SQLite, for MySQL, for SQLServer, etc.). > >> The latest version is "ISO/IEC 9075:2008 Information technology -- >> Database languages -- SQL", released in 2008, but actively being >> revised, according to the ISO page. > > Sort of. "Extensions" implies that as long as you write a query to the ISO > standard in question the behavior will be the same in all databases and that > you have to go out of your way to write non-interoperable queries.
Yes. With extensions I mean writing "start transaction" instead of "begin", using the backquotes instead of double quotes for identifires, using INET and spatial data types, using table options... > This is > not the case. A query written based on that ISO standard has different > behavior in different databases, in many cases. This is obviously an implementation bug, and should be corrected in the DBMS, not in the browser or in the web page. > So just telling web authors "write queries based on this standard and they > will work" is not sufficient. Let's ignore the fact that most web authors > wouldn't be able to even get their hands on this standard to see whether > their query complies with it without paying a fairly hefty sum [1]. We have tutorials and guides for that > You could also require UAs to implement queries exactly per this standard. > Vladimir mentioned as a possible option in his original post. This is > definitely the way forward (with either this SQL definition or some subset > thereof) But some extensions are useful (like spatial data types or non-transactional database engines): I don't see why we should not allow them, in a vendor (browser or dbms) specific form. >> As usual, if you want interoperability, you use the existing, >> implemented, standard (or you ask the ISO to produce an updated >> standard with new features), else you use extensions. > > Use of the existing standard by authors doesn't give interoperability. Again, this is an implementation bug, not something that should affect authors > -Boris > > > [1] > http://www.iso.org/iso/search.htm?qt=9075&searchSubmit=Search&sort=rel&type=simple&published=on > tells me that to get just the parts of ISO 9075:2008 that are obviously > necessary to be able to do anything whatsoever will cost me either about > $290 or $770 depending on what's in part 2 of the spec. I'm assuming none > of parts 3,4,9,10,11,13,14 are relevant to our use case; this is probably a > good assumption for most of them. That's for getting a PDF, of course; the > PDF on CD prices are somewhat higher, and there seem to be no other > provisions for looking at this specification. Unfortunately, these are the problems of ISO standards. We cannot change that. Giovanni