The process of an RDBMS
The entire process of RDBMS processing user requests is as follows:
650) this.width=650; "title=" Rdbms.png "src=" http://s3.51cto.com/wyfs02/M00/4F/E8/ Wkiom1rh9q7duc4eaaii8vr5skm680.jpg "alt=" Wkiom1rh9q7duc4eaaii8vr5skm680.jpg "/>
1, when the user requests data query and other operations, the first to establish a connection with the database server. Therefore, the Connection Manager is preferred and the connection is established.
2, the Connection manager in the request to the thread manager, MySQL is a multithreaded system, therefore, a user's SQL request will use a thread to respond. When the request processing is complete, the thread manager destroys the thread or turns it into an idle thread to process subsequent requests
3. The thread Manager gives the control permission to the user module to verify that the specified user account and password are correct, and returns the client if it is incorrect
4, after the verification pass, the client can send the SQL request, the request will be processed by the command distribution module, first in the cache module to find out whether there is the result of the request. Returned to the client if there is one. If not, give it to the parser to handle. Of course, if a record is required, the request is recorded in the log module.
5. After the parser accepts the request, it generates the resolution number and submits it to the appropriate module for processing.
The optimizer is used to process the SELECT statement, which is used to determine the optimal query method with minimal overhead.
Table modification Modules: Actions to create, delete, rename, remove, update tables, and insert
Table Maintenance module: Used to check tables, modify tables, backup tables, restore tables, optimize tables (defragmentation) and parse operations
Replication modules: Modules related to copy operations
Status module: Used to record the status of the request after processing
6, after the above processing, in the control to the access control module. This module is mainly used to control whether the user has query, delete, copy and other related permissions.
7. After the access control permission is passed, the request is submitted to the table manager for processing. The Table Manager is responsible for creating, reading, and modifying the table structure definition file, as well as maintaining the table descriptor cache and the ability to manage table locks.
8, the request will eventually reach the storage engine to the specified disk or file system loading the corresponding data, and eventually return to the client.
Where the table manager is divided into data query manager and data Storage Manager
The query Manager also includes:
DML Interpreter
DDL interpreter
Query execution engine
The storage Manager includes:
Permissions and integrity Manager
Transaction manager
File Manager
Buffer Manager
This article is from the "Linux Learning path" blog, so be sure to keep this source http://xslwahaha.blog.51cto.com/4738972/1575499
Introduction to the approximate process of RDBMS processing data requests