O'Reilly logo

Managing & Using MySQL, 2nd Edition by Hugh E. Williams, Randy Yarger, George Reese, Tim King

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

MySQL Features

We have already mentioned multithreading as a key feature to support MySQL’s performance design goals. It is the core feature around which MySQL is built. Other features include:

Openness

MySQL is open in every sense of the term. Its SQL dialect uses ANSI SQL2 as its foundation. The database engine runs on countless platforms, including Windows 2000, Mac OS X, Linux, FreeBSD, and Solaris. If no binary is available for your platform, you have access to the source to compile to that platform.

Application support

MySQL has an API for just about any programming language. Specifically, you can write database applications that access MySQL in C, C++, Eiffel, Java, Perl, PHP, Python, and Tcl. In this book, we cover C, Java, Python, Perl, and PHP.

Cross-database joins

You can construct MySQL queries that can join tables from different databases.

Outer join support

MySQL supports both left and right outer joins using both ANSI and ODBC syntax.

Internationalization

MySQL supports several different character sets, including ISO-8859-1, Big5, and Shift-JIS. It also supports sorting for different character sets and can be customized easily. Error messages can be provided in different languages as well.

Above all else, MySQL is cheap and fast. Other features of MySQL may attract you, but cost and performance are its greatest benefits. The other relational databases fall into two categories:

  • Low-cost database engines such as mSQL, PostgreSQL, and InstantDB

  • Commercial vendors such as Oracle, Microsoft, and Sybase

MySQL compares well with other free database engines. It blows them away, however, in terms of performance. In fact, mSQL does not compare with MySQL on any level. InstantDB compares reasonably on a feature level, but MySQL is still much faster. PostgreSQL has some cool SQL3 features, but it carries the bloat of commercial database engines. If you are looking at low-cost database engines and are using advanced SQL3 features, you probably want PostgresSQL; use MySQL if you are doing anything else.

Oddly enough, comparing MySQL with Oracle or some other commercial database is a lot like comparing MySQL with PostgreSQL. The commercial database engines support just about every feature you can think of, but all those features come at a performance cost. None of these database engines can compete with MySQL for read-heavy database applications. They certainly cannot compete on price. They really compete only in terms of SQL3 feature set and commercial support. MySQL AB is working to close the gap on both counts.

Like many applications, MySQL has a test suite that verifies that a newly compiled system does indeed support all the features it is supposed to support without breaking. The MySQL team calls its test suite “crash-me” because one of its features is to try to crash MySQL.

Somewhere along the way, someone noticed that crash-me was a portable program. Not only could it work on different operating systems, but you could use it to test different database engines. Since that discovery, crash-me has evolved from a simple test suite into a comparison program. The tests encompass all of standard SQL as well as extensions offered by many servers. In addition, the program tests the reliability of the server under stress. A complete test run gives a thorough picture of the capabilities of the database engine being tested.

You can use crash-me to compare two or more database engines online. The crash-me page is http://www.mysql.com/information/crash-me.php.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required