Two of the most popular database systems used by web developers today are MySQL and Microsoft’s MS SQL server. Both are similar in regards to being storage and retrieval systems. The two systems support primary keys, along with key indices which allow you to speed up queries and constrain input. Furthermore, both systems offer some form of support for XML.
Apart from price, which is the obvious difference, what distinguishes these two systems, and which one is right for you? We’ll overview both products, point out the major differences and explain the advantages and disadvantages of using them for your business.
Open-source vs. Proprietary
When it comes to these two databases, the differences begin with the open-source nature of MySQL vs. the closed, proprietary structure of the SQL Server. MySQL is an extensible, open storage database engine, offering multiple variations such as Berkeley DB, InnoDB, Heap and MyISAM. On the other hand, with the Microsoft product, you are limited to a Sybase-derived engine through both the good and bad times.
When considering how MySQL integrates seamlessly with a number of programming languages and other web-based technologies, it certainly has the advantage over MS SQL in the way of compatibility, as the SQL Server is known to work better with other Microsoft products.
Contrary to popular belief, the MySQL system isn’t always free. On the other hand, it is always more affordable. In regard to both products, licensing fees are based on a two-tiered scheme. With MS SQL, the best way to obtain a developer’s license is to buy a license for the Microsoft Developer or Microsoft Visual Studio suite. Both provide you with a free SQL Server license for development use. If you want to use the product in a commercial environment, you need to at least purchase the SQL Server Standard Edition – which could set you back over $1,000 for a few client connections.
Because MySQL is an open-source system under the GNU General Public License, developers can use it at no cost as long as the associated projects are also open-source. However, if you intend to sell your software as a proprietary product, you would need to purchase a commercial license, which costs about $400 for up to nine clients. Depending on the project and your funds, MySQL may have the advantage here.
The open-source vs. proprietary battle alone is a leading cause why some users choose one system over the other. However, there are a few differences from a technical aspect as well.
For instance, MySQL doesn’t offer full support for foreign keys, meaning it doesn’t have all the relational features of MS SQL, which is considered a complete relational database. Some versions of MySQL also lack full support for stored procedures – the biggest disadvantage being the MyISAM system, which doesn’t support transactions.
In the way of performance, MySQL is the clear leader, mainly due to the format of its default table, MyISAM. MyISAM databases leave a small footprint using little disk space, memory and CPU. While the system runs on the Windows platform without flaw, it tends to perform better on Linux and other UNIX-like systems. Because of its stability, many internet powerhouses such as Yahoo! use MySQL as their back-end database.
When it comes to performance, MS SQL’s strength of being packed with more features than other systems is perhaps its biggest disadvantage. Although most of these features are designed for performance tuning, they tend to sacrifice other essential elements. The cost here is complexity and the hogging of resources in the way of storage and memory, which leads to poorer performance. If you lack the knowledge and sufficient hardware to support an SQL server, you would be better off with another database management system.
These two database systems are pretty much deadlocked in regards to security. Both come with adequate security mechanisms by default, bearing you follow the directions and keep the software updated with security patches. Both operate over known IP ports which unfortunately attracts a wealth of intruders, a downside that can be attributed to both products. The good thing is that MySQL and MS SQL allow you to change ports just in case the default becomes too vulnerable.
As far as recovery goes, the SQL Server has a definite advantage over MySQL, which tends to fall a little short with its MyISAM configuration. A UPS system is mandatory with MyISAM as it assumes uninterrupted operation. If a power outage should occur, it could result in the corruption and loss of critical data. With the SQL Server, data corruption is more unlikely. The data travels through various checkpoints while passing from your keyboard to the hard disk and through the monitor. Additionally, the SQL Server keeps track of the process, even if the system unexpectedly shuts down.
The Best Choice
As you can see, both systems have their advantages and disadvantages. From our perspective, any product that allows you to be efficient is a good database; anything other than that isn’t worthy of your time and frustration. When it comes to MySQL and MS SQL, the decision all boils down to the situation and most importantly, what you’re looking to accomplish.