Help a reader decide on SQL Server versus MySQL
Andrew asks:
I have inherited a website that runs on CF7 and about 6 MS-Access databases. It is getting more and more traffic and is hanging more and more often, and it seems to be MS-Access (no surprise there).
I have the choice of upgrading them to MySQL or SQL Server (MSSQL) and was wondering what I should consider when making this choice, or if there is a clear cut favorite for ColdFusion.
I saw an old post where you posted ways to go from SQL Server to MySQL and was wondering if that's because you prefer MySQL.
So in general, I'm not sure there is a clear cut favorite for ColdFusion. My gut says more people use SQL Server just because I think I've seen it more in the field, but that doesn't make it the favorite. I can also say that the database used for a project has very rarely been something I've had any input on. Typically the database was chosen some time ago and we have to work with whatever it is.
But what should you pick given a choice? That's a big question and here are some things to consider. The number one thing to remember is that - most likely - ColdFusion will only be one user of this database. You may have to (or should have to) ensure everyone in the organization is part of the decision making process. If the entire organization is just the web site than I guess it really is just you, but you want to check that.
Other factors that may impact this decision are features and operating system support. MySQL definitely supports more operating systems than SQL Server. We use it at Broadchoice in our Linux production environments and on our Mac development environments. I also use it on Windows for RIAForge. You can't beat the price either, although SQL Server has a free development version now, you still need to shell out some money for production (as far as I know).
I find the MySQL environment friendlier to work with as well. I've had a long hatred for Enterprise Manager, and while I had hoped the last update would have improved the experience, I was sadly disappointed. I've seen some bad MySQL clients as well, but there is definitely more choices out there so you can probably find one more to your liking. Of course, even if you don't find any visual clients you like, the command line support works really well.
Feature-wise, I'm probably not the best person to ask which one is better. Like a lot of ColdFusion developers I only scratch the surface of what is available. Again I tend to be able to do more with MySQL, but I actually spent the time to read a good MySQL book.
So - this morning's coffee talk - all things considered - which platform would folks recommend?
Comments
SQL Server - For use in Windows/Microsoft shops where everything need to play nice. Especially if they are also doing any .NET/VB/C# dev work that will need to talk to the same database (as SQL now uses Visual Studio to replace the old Enterprise Manager)
MySQL - for everything else.
I work on a fairly busy site that is fairly db intensive.
We have 8 db schemas and over 40 tables, the biggest of which holds over 10 million rows. The whole thing runs on MySql - I love it.
The site was set up back in 2005 before MySql had stored procedures in place so our development machine had Sql Server installed to process all the raw data that comes in from a 3rd party.
Using both products has certainly been enlightening for me and my preference for ease of use, performance and price is MySql every time. The MySql GUI tools make it so easy to do stuff I often get frustrated when I have to switch over to Sql Server. The ONLY reason we have kept Sql Server on our development machine is because we also need the connectivity it has with a mapping application that populates spatial information for some of our tables.
I hope that helps.
Cheers
Marty
Down the road - if the need arises you can always migrate to SQL Server... or run both!
MySQL *may* be missing some features of MSSQL, but if you're just doing CRUD with your tables, it wont matter.
Both will scream along fine, performance wise.
MySQL is much, much, much cheaper, and you don't have to worry about it waking up one day, phoning home, deciding your licence key is invalid and shutting down.
Good luck!
Also mssql has some data mining / visualization tools that are top notch. I haven't seen very many mining tools for MySQL.
Personally, I default to MySQL or Postgres unless there is a compelling external reason to use mssql, oracle etc.
There is a tool called Navicat that converts Access (and lots of other formats) to MySQL in about 3 or 4 clicks for less than $100.00. It also has a job scheduler, data exporter, report builder and some other decent stuff too (some of those features might require the enterprise version - not really sure because I just use it for design and backups). I'm still kind of playing with ERD stuff for MySQL but I recently eval'd a package called ModelRight. It seems great for modeling but not quite as seamless as other diagram tools that I've seen for ORACLE and SQL Server.
I love being able to move data around between database servers with just one command.
BUT if you really want to take full advantage of all of the features you really need to have a trained and dedicated DBA.
I suppose that could be said for MySQL too.
In case you go for MySQL, there are MySQL client tools (download from the MySQL web site) that contain a Migration Toolkit (at least in the Windows version) that'll help you convert databases to MySQL.
http://dev.mysql.com/downloads/gui-tools/5.0.html
Blast your faster posting skills!
As others have said, I think one has to sit down and evaluate ones needs and the strengths of the competing technologies. But for basic CRUD stuff, if you already have the OS license, cost isn't necessarily a factor.
If you've got no money your choice is clear, and using MySQL is not as bad as it used to be.
Since this is all happening because traffic on your site is growing, I'd say this is a good problem to have =)
And, Tomas Fjetland is right, we have a client using SQL Server 2005 Express running in production. They're grumbling at the moment because they wish they had understood the limitations a little better, but they chose they chose that path because of their budget issues (despite our warnings). They could always upgrade, but they're dragging their feet on the decision.
Back ups, data transfer, data conversions, connecting to databases on your remote servers, etc., have all been a breeze so far. They have a 30 day trial which is worth checking out.
If you are just doing CRUD, as someone mentioned above, MySQL is a cheap solution to your problems.
MSSQL I find is oftentimes easier to get things done more efficiently. This depends on specifically what you are doing... but the product has simply been around longer, and has the benefits of familiar windows gui'ing. There are also some powerful features in MSSQL that MySQL just doesn't have yet. The same could be said from MSSQL to Oracle I suppose too though.
My choice between the two is heavily product specific anyhow...
Not to call you out, well ok I guess I'm calling you out, but anyway what "powerful features" does SQL Server have that MySQL does not?
However, I am disappointed in the sheer number of bugs that are in SQL Server 2005. 2000 was pretty stable and the DTS designer worked well. 2005's SSIS designer tries too much to enforce Microsoft's vision of what a DB should be like (all unicode tables, the Oracle driver is broken).
I'd say hold out for 2008 if you're going to go the MS route.
http://www.postgresonline.com/journal/index.php?/a...
Comparison of SQL Server 2005, MySQL 5 and PostgreSQL 8.3.
Surprised I haven't heard anyone using PostgreSQL w/ CF...
Off the top of my head:
- SSIS. MYSQL's implmentation can be described, at best imho, as SSIS-lite.
- All the business intelligence tools in 08.
- SSRS (the reporting services). These were really stepped up in sql 08. They even added a scaled down ssrs to the express version.
- As of mysql 5/mssql 2005 (not sure if this is different now?), mysql was still using very distinctive architecture types. This causes headaches if you have the need for advanced options like replication across your databases.
- mssql 2008 (and to some extent 05) added a more significant tie-in to the .NET framework. This one is kind of parallel and not a big sql feature itself, but similar to CF 8.x adding it. The additional capabilities you add under the hood without needing to get your hands messy in advanced sql coding is great!
- I'll disclaim this next one I heard third hand and never fully investigated. Around the timeline of sql 05 vs mysql 5, sql server supported column level security unlike MySQL. It wasn't a concern for me a the time, so I didn't think much of it.
There are a few others, but like I said above, it really just depends on the scale of your apps. Use the right tools for the job. BI tools aren't for everyone heh. I'm not bashing MySQL, the performance of the MyISAM had always been traditionally superior to MSSQL.
Some of the tools that ship with SQL Server are great and some of them aren't. I played with the last few releases of Reporting Services and I really liked it. SSIS however has been nothing but non-intuitive and flat out crap every time I've used it.
In regards to the "scale" part of your arguments I would strongly caution you on starting a Windows Server vs. Linux/UNIX pissing contest in terms of scalability. I guess I don't really have a problem with anything that you're saying and I don't have a problem with SQL Server - but I'm just so tired of people treating MySQL like it is a small, desktop class database. It isn't Paradox or FoxPro or Access or any other toy database and saying things like "it really just depends on the scale of your apps" leads people down the path of incorrect thinking when it comes to MySQL. Go ahead and find the best 64 Bit Windows data center on earth and put it in the ring against any Linux or UNIX cluster running ORACLE or MySQL and it will lose hands down every time.
Bottom line - MySQL is a scalable and reliable platform that should be treated just like any of the fully commercial rdbms platforms such as Microsoft, ORACLE, IBM, etc.
@Ray
Where is Sean Corfield when you need him? I asked him for SQL Server help once and he laughed at me and championed MySQL.
I have a theory as to why you don't see much PostgreSQL usage in the ColdFusion community. Its pretty simple. PostgreSQL didn't have a Windows installer until 8.0 was released. Before that, it was pretty much Unix only. And the overwhelming majority of ColdFusion users come from a Windows world. Sure, some have migrated to OS X or even Linux, but most came from Windows or are still on Windows. And MySQL has had a native Windows version since it came out.
When you on the Unix side of things, PostgreSQL definitely has a much larger following. While its still not as much as MySQL, it is definitely much closer. And almost everyone on the Unix camp agrees that PostgreSQL is a much more robust database.
Another reason for MySQL's popularity is that it came out right around the same time as PHP. And every book about PHP in the late '90s used MySQL for the database. So PHP and MySQL became synonymous with one another.
Questions to ask:
Who and what else will need access to this data? (Developers, applications, etc.)
How are they using the data?
What availability do they expect?
Are there specific expectations for data recovery?
These questions won't necessarily tell you which DB to choose, but they may guide you with respect to the setup you need when you do choose one. (Of course, if you have an in-house application that is already using a DB, it may make more sense to use it for your site as well. That's my situation: we have two off-the-shelf apps that use SQL Server, so that's what I use.)
How much can you spend on the DB environment?
How much on support?
How much on training?
How much on DBA services?
You're going to be spending money one way or another, even if it's indirectly (by spending time on one or more of these activities). If you have a limited budget, make sure you get the best value you can for your money.
What do you have experience with?
Are there other developers in the company/group/house that have DB experience? What have they used?
Do you get a chance to talk to peers regularly (locally, online)? What do they use?
This is about expertise: sure, you can use online resources, books, etc., but there's nothing quite like getting help directly from someone like you who might know what you're trying to do.
The whole point of my ramblings is that Coldfusion gives you flexibilty to test the waters and see what works best for you :)
In fact I believe there is a way to hook mssql SSRS into MySQL, it just requires you to have a working mssql installed on the box which is obviously redundant.
What do you mean by:
"
I'm still kind of playing with ERD stuff for MySQL but I recently eval'd a package called ModelRight. It seems great for modeling but not quite as seamless as other diagram tools that I've seen for ORACLE and SQL Server.
"
We're using ModelRight for Oracle and MySQL and we like it a lot.
Thanks.
Um, it looks a lot like English to me. I "mean" exactly what I said. Well ok, let me give you a scenario of what it is like to use ModelRight and I will try to articulate exactly what I mean...
---
Finally came a moment of synchronicity that took them both by surprise and swept them into their first ModelRight encounter. It was a Cartesian firestorm.
Neither had ever before experienced anything remotely similar. They were equally matched in both strength and quickness, but SQL Server Diagram Toolkit was particularly shocked by ModelRight's aggressive nature. ModelRight had a no-holds-barred approach that was a direct parallel to SQL Server's skills as a fighter pilot. ModelRight was able to make SQL Server fly ModelRightly with the same gusto that ModelRight brought to all data design adventures. ModelRight's subtlety in the handling of SQL Server's control surfaces would confound SQL Server to the very razor edge of an unhandled exception (which is actually quite common for Windows species), anyway then ModelRight would back off as mere hair's breadth to hold SQL Server trembling at that pre-compiled level for astonishingly long moments. When they were finished a small midget named MySQL entered the room riding on a Unicorn named ORACLE.
---
So anyway, that's what I meant.
We use MySQL for all of our sites (including some transaction-heavy sites that are mission critical for our clients) and to back-end our e-mail server (the excellent hMailServer.) Our web servers are IIS on Win2003.
We're currently running MySQL 5.0. It's rock solid, performance is exceptional, and administration is straightforward.

http://www.adobe.com/go/6ef0253