Book creator (disable)

MySQL/Introduction

From Wikibooks, the open-content textbooks collection

< MySQL
Jump to: navigation, search

Contents

[edit] What is SQL?

For a more general introduction see the SQL Wikibook.

Structured Query Language is a third generation language to query Databases. Being a 3G language it is closer to human language than machine language and therefore easier to understand and work with.

  • Dr. E. F. Ted Codd who worked for IBM described a relational model for database in 1970.
  • In 1992, ANSI (American National Standards Institute), the apex body, standardized most of the basic syntax.
  • Its called SQL 92 and most databases (like Oracle, MySQL, Sybase, etc.) implement a subset of the standard (and proprietary extensions that makes them often incompatible).

[edit] Why MySQL?

  • Free as in Freedom - Released with GPL version 2 license (though a different license can be bought from Sun Microsystems, see below)
  • Cost - Free!
  • Support - Online tutorials, forums, mailing list (lists.mysql.com), paid support contracts.
  • Speed - One of the fastest databases available. (http://www.mysql.com/why-mysql/benchmarks/)
  • Functionality - support most of ANSI SQL commands.
  • Ease of use - less need of training / retraining.
  • Portability - easily import / export from Excel and other databases
  • Scalable - Useful for both small as well as large databases containing billions of records and terabytes of data in hundreds of thousands of tables.
  • Collaboration - selectively grant or revoke permissions to users.

[edit] The MySQL license

MySQL is available under a dual-licensing scheme:

  • Under the GNU General Public License, version 2, ("or later" allowed in versions released before 2007): this is a Free (as in freedom), copyleft software license that allows you to use MySQL for commercial and non-commercial purposes in your application, as long as your application is released under the GNU GPL. There is also a "FLOSS Exception" which essentially allows non-GPL'd but Free applications (such as the PHP programming language, under the PHP license) to connect to a MySQL server. The exception lists a set of free and open-source software license that can be used in addition to the GNU GPL for your MySQL-dependent Free application.
  • A so-called "commercial" [1], paid license, that is, a license where MySQL grants you the right to integrate MySQL with a non-FLOSS application that you are redistributing outside your own organization. [2]

[edit] MySQL and its forks

MySQL is Free Software, so some forks and unofficial builds delivering contributions from the community exist.

[edit] MariaDB

In 2008 Sun Microsystems bought MySQL. After the acquisition, the development process has changed. The team has started to release new MySQL versions less frequently, so the new code is less tested. There were also less contributions from the community.

In 2009 Monty Widenius, the founder of MySQL, left the company and created a new one, called The Monty Program. He started a new fork called MariaDB. The scopes of MariaDB are:

  • import all the new code that will be added to the main MySQL branch, but enhancing it to make it more stable;
  • clean the MySQL code;
  • add contributions from the community (new plugins, new features);
  • develop the Maria storage engine;
  • adding new features to the server.

There are no public releases of this fork, still. Its license will be the GNU GPLv2 (inherited from MySQL).

[edit] Drizzle

In 2008 Brian Aker, chief architect of MySQL, left the project to start a new fork called Drizzle. Sun Microsystems is funding the project. Its charateristics are:

  • only a small part of the MySQL code has survived in this fork, the rest being removed: only essential features are implemented in the Drizzle server;
  • the survived code has been cleaned;
  • Drizzle is modular: many features are or can be implemented as plugins;
  • the software is optimized for multiCPU and multicore 64 bit machines;
  • only GNU/Linux and UNIX systems are supported.

There are no public releases of this fork, still. Its main license will be the GNU GPLv2 (inherited from MySQL), but where possible the BSD license is applied.

[edit] OurDelta

OurDelta - Builds for MySQL is another fork. It's based on the MySQL main branch and it adds some patches contributed by the community. Some of these patches will be used by MariaDB, too.


[edit] Notes

  1. Calling it "commercial" is misleading, because the GNU GPL can be used in commercial (but non-proprietary) projects.
  2. Proprietary projects still can connect to a MySQL server without purchasing this license by using old versions of the MySQL client connection libraries (under the GNU Lesser General Public License). However, these libraries cannot connect to the newest versions of the MySQL server.