Databases Reference
In-Depth Information
CHAPTER 1
MySQL Architecture and History
MySQL is very different from other database servers, and its architectural characteris-
tics make it useful for a wide range of purposes as well as making it a poor choice for
others. MySQL is not perfect, but it is flexible enough to work well in very demanding
environments, such as web applications. At the same time, MySQL can power embed-
ded applications, data warehouses, content indexing and delivery software, highly
available redundant systems, online transaction processing (OLTP), and much more.
To get the most from MySQL, you need to understand its design so that you can
work with it, not against it. MySQL is flexible in many ways. For example, you can
configure it to run well on a wide range of hardware, and it supports a variety of data
types. However, MySQL's most unusual and important feature is its storage-engine
architecture, whose design separates query processing and other server tasks from data
storage and retrieval. This separation of concerns lets you choose how your data is
stored and what performance, features, and other characteristics you want.
This chapter provides a high-level overview of the MySQL server architecture, the major
differences between the storage engines, and why those differences are important. We'll
finish with some historical context and benchmarks. We've tried to explain MySQL by
simplifying the details and showing examples. This discussion will be useful for those
new to database servers as well as readers who are experts with other database servers.
MySQL's Logical Architecture
A good mental picture of how MySQL's components work together will help you un-
derstand the server. Figure 1-1 shows a logical view of MySQL's architecture.
The topmost layer contains the services that aren't unique to MySQL. They're services
most network-based client/server tools or servers need: connection handling, authen-
tication, security, and so forth.
The second layer is where things get interesting. Much of MySQL's brains are here,
including the code for query parsing, analysis, optimization, caching, and all the
 
Search WWH ::




Custom Search