Categories: "Databases"

mySQL & Oracle

(via Cédric) Jim Gray [Links gone]:

"Larry Ellison announced that Oracle is now running entirely on Linux. But he didn't say, "Incidentally we're going to run all of Oracle on MySQL on Linux." If you just connected the dots, that would be the next sentence in the paragraph. But he didn't say that, so I believe that Larry actually thinks Oracle will have a lot more value than MySQL has. I do not understand why he thinks the Linux problems are fixable and the MySQL problems are not."

Date Arithmetic With MySQL

MySQL offers pretty useful functions when you want to manipulate days:

  • You can add a time interval to a date value with ADDDATE() or DATE_ADD()
  • You can subtract a time interval from a date value witf DATE_SUB()
  • You can find the interval between two dates with  DATEDIFF()

It's often easier to compute this stuff directly in MySQL rather than in PHP.

For all date functions see the MySQL Manual.

Commodity databases getting serious (slowly)

mySQL has been planing to implement stored procedures and triggers in mySQL 5 for some time now...

But lately, it looks like it's just gonna get better than expected...

Via Simon Willison (great blog!), from chromatic's wrap-up of OSCON day 3:

Brian Aker, fresh on his new job as Senior Architect at MySQL, shocked the world (or, at least, me) when he announced that he'd embedded Perl in MySQL and was using it for stored procedures a couple of years ago. Of course, it did segfault rather often. Fortunately, it's highly mature now. In his talk on "Making MySQL Do More", Brian showed the embedded function API. You can write new functions for MySQL in Perl, Python, PHP, and Java. (Keep asking him about Ruby.) You can link to C libraries; he's used Image Magick and zlib. I'm excited about how easily you can modify queries — SELECT DIFF(foo) ... anyone?

However, if mySQL alone gets that interesting, I wonder what are they going to do with SAP DB ? Weren't they planing on merging both databases somehow?

Anyway, the real question is: how long is it going to take again for hosting companies to offer mySQL 5 as a standard feature on their hosting plans... :?: Most of them still run the ridiculously dumb 3.23 version! Even worse, most customers seem to be happy with it!

Isn't this ironic, on one side databases are becoming a commodity and on the other side, people think being able to INSERT / UPDATE / SELECT (if not just SELECT) is all you need to call something a DBMS...

Quote of the day - data access

Think of the history of data access strategies to come out of Microsoft. ODBC, RDO, DAO, ADO, OLEDB, now ADO.NET - All New! Are these technological imperatives? The result of an incompetent design group that needs to reinvent data access every goddamn year? (That's probably it, actually.)

-Joel on Software

mySQL 3.23 is making me sick!

  • No referential integrity
  • No transactions (at least not enabled by default so hosting providers would have them)
  • No subqueries in DELETE statements
  • No UNION statement (can you believe it?)
  • and of course no triggers of any kind...

Not that I think mySQL is a bad thing... just that I don't understand how this can be called 3.23! Actually, 0.3.23 would be more appropriate! :>>

I'm so close to making 0.4 (some call it 4.0 :>>) a requirement for b2evolution!