It's a weird, wild, wonderful world, and it's getting kookier by the minute. On the same day database expert Oracle (Nasdaq: ORCL) upped its bid for BEA Systems (Nasdaq: BEAS) and moved further into the application platform market, established platform specialist Sun Microsystems (Nasdaq: JAVA) ponied up $1 billion in cash and assumed options to buy privately held MySQL AB, taking its first step into the database sector.

It's easy to see what the Swedish database designer gains from being picked up by Sun. Besides making MySQL's founders vastly and instantly wealthy, Sun can now sell its own database with every Solaris-based system, even ones built by Dell (Nasdaq: DELL) or IBM (NYSE: IBM). Big Blue has its own DB2 database to promote, if Sun doesn't offer anything of its own.

MySQL software has been around for eons in Internet time, developed as an open-source community project albeit under the umbrella of the MySQL company. The JBoss Java engine works under a similar structure, remaining free and community-supported even after its acquisition by Red Hat (NYSE: RHT). The crimson fedora sucks revenue out of its free software through expensive tech support contracts, as Sun will presumably do with MySQL.

And the plot thickens even further. Oracle has acquired the developer studio behind InnoDB, a key storage engine in the MySQL application, creating a licensing relationship between the two database companies. But MaxDB, an alternative MySQL storage and retrieval engine, now gets development and support from middleware specialist SAP AG (NYSE: SAP), one of Oracle's fiercest rivals. Since MySQL co-developed both InnoDB and MaxDB, and ships licensed database formats from two bitter rivals, MySQL could put Sun in an awkward position from time to time.

Oh, what a tangled web they weave! It's now easy to set up a Web application that runs a database from Oracle and an IBM WebSphere presentation framework atop a Sun operating system on a Dell machine -- with support provided by SAP. Feel free to move the company names around as you please; it's probably workable with nearly any mix you like. And several of these companies have longstanding, bitter disputes with one another.

Maybe, eventually, we'll be left with two or three megamerger giants glaring at each other from mutually exclusive camps, safeguarded by antitrust laws if nothing else. Until then, the consolidation mania continues, and we just have to figure out which small fry will be up for grabs next.

Further Foolishness: