MySQL
File:MySQL.png | |
Developer(s) | MySQL AB |
---|---|
Stable release | 5.0.18
/ December 30, 2005 |
Repository | |
Operating system | Cross-platform |
Type | RDBMS |
License | GPL or Commercial License |
Website | www.mysql.com |
MySQL is a multithreaded, multi-user, SQL (Structured Query Language) Database Management System (DBMS) with an estimated six million installations. MySQL AB makes MySQL available as free software under the GNU General Public License (GPL), but they also dual-license it under traditional proprietary licensing arrangements for cases where the intended use is incompatible with the GPL.
Unlike projects such as Apache, where the software is developed by a public community, and the copyright to the codebase is owned by its individual authors, MySQL is owned and sponsored by a single for-profit firm, the Swedish company MySQL AB, which holds the copyright to most of the codebase. The company develops and maintains the system, selling support and service contracts, as well as proprietary-licensed copies of MySQL, and employing people all over the world who collaborate via the Internet. Two Swedes and a Finn founded MySQL AB: David Axmark, Allan Larsson, and Michael "Monty" Widenius.
Programming languages
There are APIs available that allow applications written in numerous programming languages to access MySQL databases, including: C, C++, C#, Eiffel, Smalltalk, Java (with a native Java driver implementation), Lisp, Perl, PHP, Python, Ruby, REALbasic and Tcl; each of these uses a specific API. An ODBC interface called MyODBC allows additional programming languages that support the ODBC interface to communicate with a MySQL database, such as ASP. MySQL is mostly implemented in ANSI C, and, that being a common "lingua franca" for system libraries, tends to use that as its "native" language.
Uses
MySQL is popular for web applications like MediaWiki and PHP-Nuke and acts as the database component of the LAMP platform (Linux-Apache-MySQL-PHP/Perl/Python). Its popularity as a web application is closely tied to the popularity of PHP, which is often combined with MySQL and nicknamed the Dynamic Duo. It is easy to find many references that combine the two in websites and books (PHP and MySQL for Dummies, PHP and MySQL Bible, Beginning PHP and MySQL, etc.) The claim made in many books is that MySQL is easier to learn and use than many other database applications. An example from the Dummies book is that you can quit MySQL with an obvious command of either exit or quit, although this is true for many other database applications.
Administration
To administer MySQL databases one can use the included command-line tool (commands: mysql
and mysqladmin
). Also downloadable from the MySQL site are GUI administration tools: MySQL Administrator and MySQL Query Browser.
A widespread and popular alternative, written in PHP, is the free software web application phpMyAdmin.
Program specifications
Platforms
MySQL works on many different platforms—including AIX, BSDi, FreeBSD, HP-UX, GNU/Linux, Mac OS X, NetBSD, Novell NetWare, OpenBSD, OS/2 Warp, QNX, SGI IRIX, Solaris, SunOS, SCO OpenServer, SCO UnixWare, Tru64, Windows 95, Windows 98, Windows NT, Windows 2000, Windows XP and more recent versions of Windows. A port of MySQL to OpenVMS is available here.
The latest production version
As of October 2005, MySQL offers production version 5.0.16. It includes the following features:
- A broad subset of ANSI SQL 99, as well as extensions
- Cross-platform support
- Stored procedures
- Triggers
- Cursors
- updatable Views
- True VARCHAR support
- INFORMATION_SCHEMA
- Strict mode
- X/Open XA distributed transaction processing (DTP) support; two phase commit as part of this, using Oracle's InnoDB engine
- Independent storage engines (MyISAM for read speed, InnoDB for transactions and referential integrity, Archive for storing historical data in little space)
- Transactions with the InnoDB, BDB and Cluster storage engines; savepoints with InnoDB
- SSL support
- Query caching
- Sub-SELECTs (or nested SELECTs)
- Replication with one master per slave, many slaves per master, no automatic support for multiple masters per slave.
- Full-text indexing and searching using MyISAM engine
- Embedded database library
- Full Unicode support
- ACID compliance using the InnoDB, BDB and Cluster engines
- Shared-nothing clustering through MySQL Cluster
Future releases
The MySQL 5.1 roadmap outlines support for:
- Partitioning
- Online backup for all storage engines
- Fail-safe replication
- Column-level constraints
Foreign key support for all storage engines will likely be released with MySQL 5.2 (although it has been present since version 3.23 for InnoDB).
Distinguishing features
The following features are implemented by MySQL but not by some other RDBMSes:
- Multiple storage engines (MyISAM, Merge, InnoDB, BDB, Memory/heap, Cluster, Federated, Archive, CSV, Blackhole and Example in 5.x), letting you choose the one which is most effective for each table in the application.
- Commit grouping, gathering multiple transactions from multiple connections together to increase the number of commits per second.
Source code specifics
MySQL is written in a mixture of C and C++. The SQL parser uses yacc and home-brewed lexer. A document describing some of the internal structures of the code and the coding guidelines is available from the MySQL web site.
Support
Via MySQL Network MySQL AB offers support itself, including 24/7 30 minute response time, with the support team having direct access to the developers as necessary to handle problems. In addition it hosts forums and mailing lists and employees and other users are often available in several IRC channels providing assistance.
Licensing
Both the MySQL server software itself and the client libraries are distributed under a dual-licensing format. Users may choose the GNU General Public License [1], or they may choose a proprietary license
Some users have independently continued to develop an earlier version of the client libraries, which was distributed under the less-restrictive Lesser General Public License. [2]
Pronunciation
"MySQL" is officially pronounced as "My Ess Queue Ell" [maɪ ɛs kjuː ɛl], not "My sequel" [maɪ siːkwəl] [3]. However, the company doesn't mind if others use either the "My sequel" form or other local variations if they are preferred by the speaker.
The "My" portion of the name comes from the name of Monty's child, spelled "My" but pronounced in the local language as "Me".
The "SQL" portion uses the fully spelled-out pronunciation of the initialisation, S-Q-L, not the "sequel" pronunciation, which conflicts with the earlier IBM database of that name.[4]
The Swedish (MySQL AB is a Swedish company) word "Myskväll" (cozy evening, or even My's evening, "Mys kväll") is pronounced in a similar way but this might be a coincidence. Nevertheless this pronunciation is quite usual in Sweden.
Criticisms of MySQL
Early versions of MySQL included few standard relational database management system (RDMS) features, and the current production version still lacks many properties found in other SQL RDBMSs. This has led some database experts, such as Chris Date and Fabian Pascal, to criticize MySQL as falling short of being an RDBMS.
Many of the early criticisms have been remedied in later versions of the software, including the lack of transactions and relational integrity constraints. These are features necessary to support the "ACID properties" for relational databases, which allow the DBMS to ensure that client applications cannot interfere with one another or insert inconsistent values. [5] Other criticisms include MySQL's divergence from the SQL standard on the subject of treatment of NULL values and default values. Its handling of dates allows storing a date with a day beyond the last day of a month with less than 31 days, and arithmetic operations are vulnerable to either integer overflow or floating point truncation ([6]). These values are treated according to the SQL standards in MySQL version 5 through the use of special SQL Modes.
Earlier versions of the MySQL manual included claims that certain missing features (considered essential for SQL-compliant RDBMSs) were useless or even harmful, and that users were better off without them. One section, entitled "Reasons NOT to use Foreign Keys constraints" (sic), advised users that relational-integrity checking was difficult to use and complicated a database application, and that its only useful purpose was to allow client software to diagram the relationships between database tables. [7] Another section claimed that a DBMS lacking transactions can provide as reliable of data-integrity assurances as one supporting them—conflating the issue of transactional integrity with that of saving data when the database server loses power. [8] Since these claims contradicted basic principles of relational database design, they caused MySQL to be ridiculed by some database experts. Regardless of whether they were right or not, these claims are omitted in more recent versions of the manual. MySQL today allows some support for previously-dismissed features of relational integrity checking and transactions.
When the beta version of MySQL 5.0 was released in March 2005, David Axmark, a co-founder of MySQL, said that "People have been criticising MySQL since we started for not having stored procedures, triggers and views," and "We're fixing 10 years of criticism in one release." [9] MySQL 5.0's 13 October build 5.0.15 was released for production use on 24 October 2005, after more than two million downloads in the 5.0 beta cycle.
Critics find MySQL's popularity surprising in the light of the existence of other open source database projects with comparable performance and in closer compliance to the SQL standards. MySQL advocates reply that the program serves its purpose for its users, who are willing to accept the program's limitations (which decrease with every major revision) in exchange for speed, simplicity and rapid development. Another, perhaps simpler, explanation for MySQL's popularity is that it is often included as a default component in low-end commercial web hosting plans, so that for application developers (mostly using PHP and Perl) MySQL is the only DBMS choice unless they want to operate their own web hosts.
Some users have also criticized MySQL AB's position on the licensing of the software. A few open source projects, such as Asterisk PBX, have reduced support for MySQL because of licensing difficulties. Further, there was some controversy generated regarding the distribution of GPL'd MySQL library files with other open source applications (the biggest controversy arising with PHP, which has a license incompatible with the GPL). This was later resolved when MySQL made an exception for inclusion in open source projects.
In September 2005, MySQL AB and the highly controversial company SCO joined forces for "joint certification, marketing, sales, training and business development work for a commercial version of the database for SCO's new OpenServer 6 version of Unix". Various MySQL employees gave what appeared to be the company's position, that it was committed to serving end users of the database, regardless of their operating system choice, that the company would leave it to the courts to resolve the SCO licensing controversy and that other common open source databases have also been ported to and support OpenServer users.
In October 2005, Oracle Corporation acquired InnoDB Oy Inc, the company responsible for the InnoDB storage engine that allows MySQL to provide such functionality as transactions and foreign keys. This will presumably lead to changes in the arrangements in its availability as, according to the press release, the contracts that make the company's software available to MySQL AB come up for renewal (and presumably renegotiation) some time in 2006.
Trivia
- The dolphin symbol in the MySQL logo was given the Swazi name Sakila in October 2002 after a naming contest. [10]
- MySQL was first released internally on May 23, 1995
Prominent users
- Yahoo! for some data management functions
- Cox Communications, the fourth largest cable-television provider in the United States, has more than 3,600 tables and two billion rows of data in their databases and handles approximately four million inserts every two hours.
- Sabre, and its travel reservation system Travelocity
- LJFind search engine well over 110 000 000 livejournal posts and 4 000 000 regular users stored and indexed for full text searching
- LiveJournal, around 300 million page views per day
- Slashdot, the poster child of high-traffic sites, with around 50 million page views per day.
- 2005 MySQL Application of the Year winners:
- CNET Networks
- Friendster, more than 85 million dynamic page views per day, able to support more than 1.5 billion MySQL queries per day
- Wikipedia, more than 200 million queries and 1.2 million updates per day with peak loads of 11,000 queries per second
See also
- List of relational database management systems
- Comparison of relational database management systems
- MySQL Cluster
- ODBC
- LAMP / WAMP
External links
- MySQL Website
- FreeSQL - A free MySQL host.
- Documentation:
- MySQL Manual
- MySQL Roadmap
- #mysql channel documentation wiki
- MySQL Gotchas description of many features in MySQL, which work as advertised, but not as those used to other databases may expect
- Third party tools
- phpMyAdmin administration tool
- mytop monitoring tool for unix-like operating systems
- fabFORCE.net DBDesigner 4
- MySQL for OpenVMS
- MySQL Manager
- phpMyBackupPro MySQL database backup tool
- passcracking.ru free MySQL hash cracking by database
- Press
- 2003 Database Journal roadmap of MySQL's expected feature development
- Database Journal articles on MySQL
- Database Corner articles on MySQL
- Guides
- Blogs
- PlanetMySQL PlanetMySQL.org (MySQL Community Blogs)
- MySQL MySQL Database Administration Blog