The MySQL server is built in a modular fashion:
Figure 15.1. MySQL architecture
The storage engines manage data storage and index management for
MySQL. The MySQL server communicates with the storage engines
through a defined API.
Each storage engine is a class with each instance of the class
communicating with the MySQL server through a special
Handlers are instanced on the basis of one handler for each thread
that needs to work with a specific table. For example: If three
connections all start working with the same table, three handler
instances will need to be created.
Once a handler instance is created, the MySQL server issues
commands to the handler to perform data storage and retrieval
tasks such as opening a table, manipulating rows, and managing
Custom storage engines can be built in a progressive manner:
Developers can start with a read-only storage engine and later add
DELETE operations, and even later add
support for indexing, transactions, and other advanced operations.