mysql Chapter One (Introduction)
Documentation Version: 0.75
mysql Version: 3.20.11
This manual is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
This manual may be used freely if it is not sold. If you want
to include it as part of a commercial product you must contact
me (Michael J. Miller Jr, mke@netcom.com)
for terms and conditions.
Now that we've gotten past that, to the good stuff.
I've created a tutorial/sample database that is used in the examples
listed throughout this manual. You can find it in Appendix B.
The latest version of this manual will always be available at
HTTP://terrapin.turbolift.com/mysql.
I want to thank Michael Widenius for writing mysql and providing much of the
information in this manual, and TcX DataKonsulter AB for letting him :-)
I want to thank David Axmark for maintaining the excellent mysql FAQ
from which much of the content of this manual has been taken.
I also want to thank all the mysql users who have sent in corrections
and suggestions. This sort of help makes a BIG difference. I want to
especially thank Bert Vermeulen for extensive help in the formatting
of this manual.
mysql was created by Michael Widenius,
(monty@analytikerna.se). It
is a small, fast and capable relational database in the tradition of
Hughes Technologies Mini SQL database. (NOTE that the mysql database
package contains no Mini SQL source code, it does however share some
of the same look and feel both in the C API and in the names and
function of many of it's programs. This has been done to make it
relatively easy to port Mini SQL applications and utilities to mysql.)
The client portion of mysql has been placed in the public domain
while the rest of mysql is distributed under the license listed in
appendix A of this document.
David Axmark created and maintains the autoconf portion of mysql, along
with maintaining the mysql FAQ.
The latest version of mysql can be found at
HTTP://www.tcx.se.
The following are amongst the features that mysql supports.
- Multi-threading. (Supports multiple simultaneous querys.)
- A Join Optimizer with one pass multi-join.
- Fixed and variable length records.
- An ODBC driver. (With source)
- A flexible privilege and password system.
- Up to 16 keys per table. Each key may have up to fifteen fields.
- Support for primary key fields, key fields and unique fields in CREATE.
- Support for the one to four byte ints, float, double, fixed and
variable length strings, time stamps, variable length strings and
blobs.
- C and Perl API.
- Supports Sun Solaris 2.5+ and Linux 2.0+ and possibly others.
- A fast thread based malloc system.
- A fast table check and repair utility. (isamchk)
- All data saved in ISO8859_1.
- All string comparisons for normal string fields are case insensitive.
(Binary strings supported.)
- Aliases on tables and columns.
- All fields have default values. INSERT may be used on any subset
of fields.
- The capability to easily redefine tables; including adding and deleting keys and
fields.
SQL stands for Structured Query Language. SQL is a language designed
for interacting with relational databases. It does this by allowing
users to describe the data they wish to see. It is also possible to
define and manipulate data in a database by using SQL. The SQL used
in mysql follows entry level ANSI 92 SQL specification fairly closely.
For more information see Chapter 3.
The most basic way to communicate with the mysql database engine is by
use of the mysql program. The mysql program is the client portion of
the mysql database system. It offers the capability to execute SQL
commands either on the Unix command line or from within mysql's
interactive mode. For more information on the mysql client program please
see chapter 2.
The mysql database system also provides a C library API. You can
use the C library API to query a database, insert data, create tables,
etc. The C API supports all mysql functionality. For more information
on the C programming API please see chapter 4.
PERL is supported in two ways. First of all there is a port of the
perl mini-SQL interface written by Andreas Koenig
(a.koenig@mind.de). There
is also a perl DBD module available. For more information on
the PERL API's see chapter 5.
There is also a 32bit ODBC drive available for the mysql database
system. This driver will enable you to load and retrieve data from
other data sources that support ODBC. For more information on the
ODBC driver see the mysql home page.