MySQL
MySQL
In This Chapter
- A Brief History
- What Is MySQL?
- Installation
- Configuration for Use with IMP
- Database System Concepts
- The IMP Database Structure
- SQL Overview
- MySQL's License
- Onward!
In this chapter, I will give you a good overview of MySQL and a brief overview of database design.
I will walk you through installing MySQL on your system. You will be installing the freely available RPM package file, version 3.22. Because MySQL is always improving and changing, I strongly recommend you install the 3.22 version. After your project is up and working, you can experiment with different versions of MySQL. Later versions might introduce some features that will cause problems with your project.
How to Pronounce It
MySQL is officially pronounced "my ess queue ell." It is not pronounced "my sequel."
I will also introduce you to some database design concepts and give you some rules of thumb to use during database design and implementation. The concepts introduced will help you understand how IMP uses MySQL. (IMP uses MySQL to store user preference settings and an address book for each user.)
You will learn enough of MySQL to enable you to examine the tables and data that IMP uses on your machine. You will be given ideas to use in future enhancements of your system. As you work through these possible enhancements, you will be shown common problems in using MySQL and solutions to those problems.
A Brief History
MySQL started out as a tool to fulfill an internal requirement. The authors of MySQL wanted to use mSQL to connect to some tables using its very fast ISAM routines. However, mSQL turned out to be too slow. They started working on their own solution.
Note
ISAM is short for Indexed Sequential Access Method. Very simply, and very briefly, the data is stored sequentially in a file on the disk, with one piece of data following another. The retrieval of the data is through an index that specifies the offset in the data file to begin retrieving the data. If done correctly, the data retrieval routines can be very fast.
Mini SQL is the name of the mSQL database engine. The mSQL engine can be found at http://www.hughes.com.au/. It is not free for commercial use. The license can be found in the mSQL download. If you are an educational institution, a non-commercial research institution, a registered charity, a registered not-for-profit institute, or a full-time student, you can use mSQL without payment.
The result was an interface that had an API very similar to mSQL. This allowed easy porting of third-party tools and code. The developers of MySQL have continued stretching MySQL. It now has many more features than mSQL, and is typically much faster. According to benchmarks at http://www.mysql.com/information/benchmarks.html, MySQL can be over 10 times faster than mSQL. You will find benchmarks on that page that compare MySQL to many other databases. It per-forms quite well on all platforms.
MySQL has grown in popularity over the years. It is a very fast database. It implements a subset of SQL, so it might not be suitable for all applications. For most applications it is more than sufficient.
MySQL is also changing. It is being constantly improved. If the version you obtain today does not do what you need, check on the MySQL to-do list, and their expected completion date. It might well be that the MySQL crew is implementing the features you need very soon.
Where the name MySQL came from is a mystery, even to the authors. The most visible driving force behind MySQL, Michael "Monty" Widenius, had a daughter named My. However, MySQL has been around a little longer than his daughter, so even they are not sure of the connection.
Regardless of the source of the name, MySQL is very dependable. It is very fast. I have not yet had a loss of data because of MySQL in three years of use. I would be willing to use it in a mission-critical application. I have read some comments on the Web that indicate you should shut down and restart MySQL about once a month on heavily trafficked sites.