About Links Archives Search Feed Albums of Note

SQL is a Standard, so why…

Why oh why can’t vendors can’t agree that when there is a standard they should implement it in a standard way? I suppose it’s their prerogative to add features over and above the standard but get the other thing right first. Case in point - data types for fields in SQL Tables. All the string-based types have different maximum lengths. In SQL Server, the char type has a max length of 8000. In MySQL it’s 255. Quite a shift. Then MySQL also implements the tinytext, mediumtext and longtext types as well which are all the same thing but with different maximum lengths. I like this but SQL server doesn’t support that idea. Boo.

Now take the datetime value. SQL Server believes that valid values should begin on Jan 1 1753. MySQL starts them on Jan 1 1000. Rather annoyingly, neither of these actually cater for the .NET date type whose valid values begin back on Jan 1 0000, and so presents a lot of quite invalid values if you want to store its value in a database, regardless of whichever one you choose.

Finally, let’s take the timestamp value. Now its SQL Server’s turn not to play ball with the standard. Even the help file says ’oh yeah, totally dude, we may change it to match the standard if, like, we have time before the next version is released.’ Given that MS have been working on Yukon since 2000 and probably wont finish until next year, who’s betting that in five years work, they will have ’forgotten’ to put this right. Given that MySQL has point releases every month or so, how come no-one has queried this? I can’t be the first person to want to use SQL Server and MySQL interchangeably, can I?

Posted on February 10, 2004   #Geek Stuff  

← Next post    ·    Previous post →