Why Use MySQL?
MySQL is an excellent database server product. There are many reasons you should consider using MySQL for your database server.
MySQL is fast and stable. This is the key to its success. In February 2002, eWeek (www.eweek.com) performed a benchmarking study of the major database systems including Oracle, Microsoft SQL Server, DB2, and MySQL. The study rated MySQL and Oracle 9 as the best overall performers. This study was done using only the alpha of MySQL 4.0, but MySQL 4.1 is even faster.
MySQL is available as free software and as commercial software. It is available under a dual licensing scheme. All MySQL software is available under the GNU General Public License (GPL), but in situations in which you need or want a commercial license, you can buy one.
MySQL supports the vast majority of features considered important by the database community, such as transactions, row-level locking, foreign keys, subqueries, and full text searching. Version 5.0 will add stored procedures to the list.
MySQL scales well. It is used by some very demanding customers including Yahoo! Finance, Slashdot, and the U.S. Census Bureau.
MySQL is a great tool for learning about databases in general due to the ease of installation and use and the small hard disk and memory footprint.
Overall, MySQL is an excellent choice for your database application.
Why MySQL Instead of Another Database?
Too many databases are available to compare MySQL to each one in detail, but MySQL offers a combination of performance, price, and features that others will find hard to match.
Performance
MySQL is undeniably fast. Oracle, Microsoft, and IBM all claim to sell the fastest database in the world, which, depending on your level of credulity, demonstrates either that a benchmark can be made to prove anything its sponsor requires or that different products excel under different conditions.
On the MySQL Web site, you can read benchmarks comparing MySQL and various other databases. These benchmarks generally show MySQL solidly outperforming competitors. Although you are probably wise to take all benchmarks, especially vendor-designed benchmarks, with a grain or two of salt, all available evidence including independent tests indicates that MySQL is among the fastest products available.
The benchmark results can be found at
and the tests are included in the source download in case you want to make comparisons in your own environment.
The benchmarking exercise undertaken by eWeek magazine in 2002 showed MySQL performing as well as Oracle in backing a Web-based Java application running on a quad processor Windows machine. These two products outperformed IBM's DB2, Microsoft's SQL Server, and Sybase's ASE. We will come back to price in a moment, but it is worth noting that in this benchmark, one of the leading performers was free, whereas the other had a price of $160,000 ($40,000 per processor). See www.eweek.com/article2/0,3959,293,00.asp for details.
Speed has always been a key MySQL design consideration. New features are added to MySQL only when this can be done without harming performance. Sometimes this means that features are added more slowly than users would like, but it has ensured that MySQL has always been fast. Your own testing or experience will probably confirm this assertion.
Price
Price is perhaps the easiest point to compare. For many purposes, MySQL is a free application. The GPL allows you to use the software, alter the source code, and redistribute MySQL to other people who will also be bound by the GPL. Under some circumstances, such as if you want to redistribute MySQL as part of a commercial product, you will need to purchase a commercial license. A single server license costs $220 or $440 (at the time of writing), depending on whether you want to use the InnoDB table type. In other words, MySQL uses a dual licensing scheme where the free use is channeled through the GPL and the commercial use is channeled through industry-standard EULAs (End-User License Agreements) and OEM (Original Equipment Manufacturer) agreements. MySQL AB's general rule is, "if you are free, so are we; if you are commercial, so are we."
The major competitors are commercial, with complex pricing schemes that depend on the intended use, number of processors in each server, and number of users that will connect. The Oracle Database, Microsoft SQL Server, and IBM DB2 Sybase can all cost tens of thousands of dollars in moderate scenarios and hundreds of thousands of dollars on a server with many processors and many connected clients.
MySQL is sometimes compared to other Open Source databases, such as PostgreSQL and Firebird. Of these Open Source databases, MySQL is the only product with one company behind it, owning all intellectual property rights and offering full commercial licenses including liability and indemnifications required by large user organizations.
Another category of software that MySQL is at times compared with are the inexpensive non-client-server databases, targeted at home or small business users (such as Microsoft Access and Filemaker Pro). While often having an easy-to-use graphical user interface (GUI), the programs in this category lack important functionality, as well as the stability, scalability, and speed needed for mission critical applications.
Stability
The developers at MySQL have always regarded stability to be of prime importance. All MySQL versions released in binary form—even alpha releases—must pass the MySQL Test Suite. This process tests functions and other features, as well as the results of operations where a bug has been fixed in the past; thereby, ensuring that bugs can never be accidentally re-introduced.
Developers must also give the fixing of a bug higher priority than their other development tasks. Basically, their other work stops until any bugs related to their field of expertise are fixed. The rule is that MySQL releases should be free of all known and reproducible bugs. Naturally, some things cannot be resolved without causing problems elsewhere. This is particularly the case with production versions that should not be subject to major changes that can influence their stability. In these instances, the issue is documented and fixed in all later versions.
Finally, quality is ensured through the MySQL customers and community. With over four million users around the world working in a wide variety of environments, this provides unparalleled opportunity for finding bugs even in early stages of development. The bug reporting and handling system at MySQL is public, so people can see what others have reported and add their own comments.
Ease of Use
Another key feature of MySQL is its ease of use. No complicated configuration procedure is required in order to get started. MySQL Server works adequately straight out of the box. The defaults are set for minimal use of disk and memory resources. For optimal performance and for specific production requirements such as logging, tuning of this default setup will naturally be required. Sample configuration files are included to help with this.
Features
Feature comparison depends greatly on which features you regard as important. MySQL has some features, such as full text search, replication, and support for massive tables, that are missing or immature in other low-cost offerings. It is, however, missing features such as stored procedures and views that are standard in the high-cost options and available in some of the low-cost products. Some of these omissions are planned for upcoming versions (such as stored procedures); others (such as views) will take longer. Some MySQL features (such as row level locking) are missing even from most of the top-priced systems.
The feature comparison page on MySQL's Web site at http://www.mysql.com/information/features.html allows you to do a very fine-grained comparison between MySQL and around 20 competitors to see what is supported in different offerings. What follows, though, is a brief list of features MySQL has that are not offered by all competitors, as well as a list of features MySQL lacks that exist elsewhere.
MySQL 4.1 offers
- ACID-compliant transactions
- Cross-platform support
- Replication
- Support for huge tables and databases
- Full text search
- Subqueries
- Support for most SQL 92 syntax
MySQL does not currently include
- Views
- Stored procedures
- Triggers