Wow, shocking really…

 http://www.mysql.com/news-and-events/sun-to-acquire-mysql.html

I have a lot of questions.  What will this mean for MySQL’s sometimes serious lack of SQL standards compliance?  What will happen to LAMP?  Will linux support take a back seat?  Did MySQL jump ship because Oracle ate their InnoDB, and thus their transactional lunch with their recent buyouts?

This is going to be a turbulent time for MySQL based solutions, but if we’re lucky MySQL will proceed with Falcon to replace InnoDB, Sun will throw some resources into making MySQL more ready for the general enterprise(1) and we’ll see some kind of interesting integration with Java development ala Rails, but hopefully we’ll get something a little more DBA compliant than that!  I’d love to see something that can handle mid level tasks in both the language support and the engine, without requiring expert level support!

Also, Lynn brought up the possibility of  someone grabbing the MySQL source and branching it into another project altogether.  While the majority of this can’t be done due to licensing issues with the most viable engines…it would be quite interesting to see if a community startup could handle a project of this size.

Lastly, does SQL even matter anymore for the projects running MySQL…can something like SQL Lite give people using DB automation layers like Rails what they need?

(1) I’m not saying that MySQL isn’t ready for the enterprise, I’m just saying that to get it to work you have to know the product inside and out, and do quite a bit of work to make it happen.

Bookmark and Share

A fun SQL project for beginners!

 If you want to rank your results in order by frequency of occurrence, you can use COUNT() in any major RDBMS to get your results.

 Try using a query like below :

SELECT name, COUNT(id) FROM table

WHERE type=’User’ AND id<>3 AND id IN (116,18,28) GROUP BY (id) ORDER BY COUNT(id) DESC;

Note that all you have to do is add GROUP BY to the counted column, and order by that count!  I like to set DESC to make sure they’re descending (largest items on top) and adding LIMIT 20 in MySQL will only show you the top 20.

 Cool stuff for noobs!

Bookmark and Share

A friend of mine just asked me, and the solution is to use bulk copy (the command line utility)

Run this at the command prompt from your bin directory :

bcp “SELECT * FROM TABLE FOR XML RAW” queryout c:\table.xml -Sserver -Uusername -Ppassword -c -r -t

Quick, and dirty!

Bookmark and Share