Free Programming E-Books
Free download ebooks on computer and programming | |||
Free Ebook "Pro MySQL" Sample Chapter
Pro MySQL
Download chapter
Free download Chapter 4: MySQL System Architecture Pro MySQL is the first book that exclusively covers intermediate and advanced features of MySQL, the world's most popular open source database server. Whether you are a seasoned MySQL user looking to take your skills to the next level, or you're a database expert searching for a fast-paced introduction to MySQL's advanced features, this book is for you. The first part of this book discusses topics related to design and development. Topics include transaction processing and indexing theory, benchmarking and profiling, and advanced coverage of storage engines and data types. The authors also delve deep into the MySQL source code and system architecture at a level you won't find anywhere else. Essential advanced SQL is also covered, with discussion of subqueries, derived tables, and joins. These concepts are demonstrated in a range of situation-specific examples-from dealing with hierarchical data to performing Geographic Information System (GIS) examples with just MySQL. This section also covers MySQL 5's new enterprise features like stored procedures, triggers, and views. The latter part of this book devotes itself to administration topics. Topics include MySQL installation and upgrading, user administration, database backups, replication, and clustering. You'll also learn about the new data dictionary features available in MySQL 5. MySQL System ArchitectureIn this chapter, we're going to take a look at MySQL internals. It will be a fun, informative examination of how all the different pieces and parts of the MySQL server operate together. MySQL's implementation is a fascinating mix of technology that is truly a remarkable achievement-an achievement born from the sweat and inspiration of numerous developers over many years. One of the joys of open-source technology is just that: it's open source! On a system as large as MySQL,1 taking a look at the source code gives you a true understanding of the dilemmas faced by the developers over the course of the software evolution. In this chapter, we'll investigate the source code of the server itself, so put on your hard hat. We encourage you to take a look at the source code, even if you have no intention of making any changes. You will gain an appreciation of the enormity of the tasks undertaken by the development team at MySQL AB, as well as gain a much deeper understanding of how the software works, and thus how you can optimize your programs to best utilize MySQL's strengths and avoid its weaknesses. The information presented in this chapter comes from an analysis of both the internal system documentation and the actual source code for the MySQL database server system. Because MySQL is an evolving code repository, since press time, some of the design features explained here have likely changed and will continue to do so over time. If you look at the source code from one version to the next, you'll notice variations in the implementations of subsystems and how they interrelate; however, much of the way in which the system generally functions has persisted over the evolution of the software. Even if you're not a C programming guru, you should be able to follow most of what we'll cover here. The focus will be less on the code itself and more on the structure and flow of operations within the server, and how the different code libraries interact with each other. Our intention is to provide a basic road map from which you can navigate the source code and documentation yourself. However, there are a few sections of this chapter that require a significant knowledge of C and C++ programming, and are meant for more advanced readers. If you don't have a whole lot of experience in C programming, just do your best to follow along, and don't worry about it too much! In this discussion, we'll cover the following topics:
| |||