Oh, my--MySQL!

Do you have a hosted Web site? If you do, chances are you have access to a MySQL database. MySQL is a relational database management system (RDMS) that is great for energizing your Web site, managing personal data, or any of the average everyday uses of a database.
Written by Shelley Doll, Contributor
Do you have a hosted Web site? If you do, chances are you have access to a MySQL database. MySQL is a relational database management system (RDMS) that is great for energizing your Web site, managing personal data, or any of the average everyday uses of a database. Read this article to learn more about this system, and discover when, where, and why you should use MySQL.

Dirty deeds, done dirt cheap
MySQL (pronounced my-ess-q-ell) is hugely popular with both the open source and Web-based communities and can essentially be considered the de facto standard for free-ish database software. One reason could be that it’s a real down-and-dirty solution, appealing to various kinds of database users and administrators, as we’ll discuss a little later.

Another reason for MySQL’s success is that it is widely accessible. The Gnu Public License (GPL) is a standard licensing agreement for participating open source software; it dictates that software (in this case, MySQL) can be used at no cost, as long as any source code containing the GPL product is also made available under GPL. Translation: You can download it for free.
This does not mean that if you use MySQL for your database you have to release your source. That’s necessary only if the MySQL code is required for your software to function, or if you distribute the RDMS with your software. There are no stipulations for businesses vs. individuals under those terms, but many companies using MySQL choose to privately license the software anyway to keep their source code closed. Private licenses can be acquired on a per-database server basis, starting at $200 for a single unit (or less, if you plan to license any kind of volume).

One of the most frequent gripes about MySQL is that it doesn’t completely conform to the ANSI SQL standard. If this is a major concern of yours, read this article by Michael M. Gorman. It discusses the validity of the ANSI SQL standard, because seemingly no one database system conforms to SQL99.
Standards aside, MySQL is designed to be developer-friendly but easy to use. Additionally, it continues to grow and mature, maintaining its appeal to existing users, and continuously expanding its user base, with ever-increasing sales success. Measures have been taken to improve accessibility, with the introduction of a graphical user interface (the MySQLGUI), support for user-defined table types, and a published API (MySQL++).
With these and other features, MySQL’s popularity is justified; it appeals to a wide range of users. Read on to learn more about who can benefit the most by using this system.

And justice for all
Although MySQL claims to be “the world's most popular Open Source Database, designed for speed, power and precision in mission critical, heavy load use”, you should be sure to evaluate your specific needs before deploying it. If you’re really using the system for a large-scale, mission-critical system requiring high-availability, be prepared to get your hands dirty. There is free support via user groups and mailing lists, and support can be purchased; but the product tends to grow organically, like a lot of open source software efforts, so feature development is driven by demand.
For just about any other use, however, MySQL is great. The system is ideally suited for C and P-letter developers (PHP, Perl, Python, and Pascal) due to syntax support that is familiar to those languages. If you have the inclination, you can take advantage of having access to the source code to make the system do whatever you need.
Also, if you’re just getting into databases, you’ll find that MySQL will do nicely—it’s widely supported, supports forgiving syntax, and has decent error messaging. The manual is accurate and up to date, and, again, a variety of GUIs is available, including phpMyAdmin, MySQLdb for Python, MySQL Ruby, and many more. To get you started, you can find tutorials at the MySQL Web site, Developer Shed, and FreeWebMasterHelp.com, to name only a few.

MySQL is geared toward selecting and updating data over inserting and deleting. It is a good choice for data storage and reference, but it is not necessarily the best for creating and deleting tables on the fly. For Web, that’s pretty much perfect for tracking users and creating dynamic pages.

Some databases gear toward specific deployment sizes, but if you’re looking for a personal database, MySQL is good for that too. You get all the functionality you need without unnecessary overkill. I recommend this system for small to large deployments, and for everything from basic content management, to driving company information—with the already-stated warning about gear-head requirements.

Intro to reality
Not only is MySQL great for all kinds of users, but it's supported by all major server platforms. MySQL’s current version is 3.23, released early in 2001. The current development version is 4.01, which significantly changed the code architecture to facilitate support of planned functionality. The next major release is 4.1, expected in the fourth quarter of 2002.

Several products are available, which are worth an explanation:

  • MySQL—RDMS optimized for speed (doesn’t support transactions)
  • MySQL-max—Full-featured RDMS, with additional platform and table type support, and symbolic link support for Windows
  • MySQL AB—The company from which you can purchase licenses
  • MySQL++—The MySQL API
  • MyODBC—ODBC-compliant RDMS
  • Recent major additions to MySQL include joins, foreign key constraints, transactions, and XML-formatted dumps. New features planned for version 4.1 include the much-anticipated cascading delete, unions, and stored procedures. With these additions, MySQL will again be able to compete with other similar systems, such as PostgreSQL.

    My last words
    MySQL is very popular and prevalent. It’s a great tool for a variety of uses, and it's free, making it easy to learn without a financial commitment. Additionally, discussions, tutorials, and help groups are plentiful, helping to make it the most widely used open source RDMS available.

    With all of this going for it, there’s no reason not to check into your hosting facility and find out if you already have access to MySQL. With a little effort, you could easily enhance your Web site with this great product.

    Editorial standards