In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)05/31 Report--
This article is about what the MySQL database infrastructure is like. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
1.Application Layer
The application layer of MySQL provides all kinds of users' access to the database, that is, it provides an access interface for the database to connect the outside world with the data and act as a bridge. In real life, we will encounter many different functional bridges, the first simple single-log bridge, now the street flyover, the highway bridge and railway bridge across the river, all of which do their own job. There are also three kinds of users in the MySQL application layer: administrators,clients and query users. Administrators can use administrative interfaces and tools to maintain the database; for example, only administrator users have the right to use mysqladmind to shut down the database service, and to create and delete the database completely, as well as some tools for analysis and tuning, isamchk and myisamchk, and mysqldump for backup and recovery of the database, which also need the permission of administrators. Clients uses MySQL APIs to access the database through some interfaces or tools. Query users is through the query interface, that is, the command mysql, to connect to the database, and issue some query requests.
2.Logical Layer
Logic layer is the core function layer of MySQL database. It mainly consists of three parts: query processing (Query Processor), transaction management (Transaction Management), recovery management (Recovery Management) and storage management (Storage Management).
2.1 Query Processor
When the user wants to view and process the underlying database, the queries that occur during this period will be extracted by the query processor and optimized to execute the output. Next, let's talk about the whole process.
When a user makes a request, the query processor (QueryProcessor) will first determine the type of request, that is, as we said earlier, who sent it? if it is admin, it will be compiled by the DDL compiler (DDL Compiler), and the underlying database will be operated directly by the execution engine (Excution Engine). If it is client, first convert the user's command into the corresponding query statement through the internal DML precompiler (DDL Precompiler), then the query analyzer (Query Parser) decomposes the statement into the structure of the parse book, so that the next component can understand it, and the pre-query compiler (Query Preprocesor) will check whether the sql statement is correct and valid. Then the security manager (Security/Integration Manager) will verify whether the user has access to the database. After these are confirmed, the query optimizer (Query Optimizer) will optimize the sql query. Because of this mechanism, the execution engine (Excution Engine) can complete the query processing as quickly as possible, which is why the performance of MySQL database is better than that of other database systems.
2.2 Transaction Management
Transaction processing is divided into two parts: transaction manager (Transaction Manager) and concurrency controller (Concurrency-Control Manager), each of which performs a variety of functions. TM is responsible for ensuring that transactions are automatically logged and executed, as well as resolving deadlocks and running COMMIT and ROLLBACK SQL commands; CCM ensures that transactions run independently through a locking mechanism.
2.3 Recovery Management
Reply management also consists of two parts: log manager (Log Manger) and recovery manager (Recovery Manager). These two functions are literally easy to understand. LM is responsible for recording every operation on the database, and RM is responsible for restoring the database to its last stable state.
2.4 Storage Management (Storage Management)
In storage management, buffer management (Buffer Manager) is responsible for buffering records in memory and virtual storage, and resource manager (Resource Manager) and storage manager (Storage Manager) cooperate with it to complete the operation of physical layer database.
3.Physical Layer
The physical layer is actually the place where the actual data is stored, such as data files, log files, statistics, original data, indexes and so on.
At this point, the above is the theoretical structure of the entire MySQL database, we have a preliminary understanding of the internal structure of the MySQL database, so this is it. Next, we can further understand the functional features of these parts in the MySQL database through some specific practical operations. 、
The following points are explained:
1. Functionally, MySQL is a modular design based on components, but in fact, MySQL is neither strictly based on components nor really modular.
2. The source code of MySQL uses a mixture of C and custom codes, and many classes are used in the process-oriented code, which are only responsible for the representation of data types and do not embody much of the idea of object-oriented programming.
3. The MySQL system integrates code based on function libraries and data structures.
4. The architect of MySQL is a structure similar to that of a subsystem, which cooperates closely and efficiently to form a reliable database system.
Thank you for reading! This is the end of this article on "what is the MySQL database infrastructure?". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.