Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How does the database work

2025-01-27 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)05/31 Report--

This article mainly explains "how the database works". The content of the explanation in the article is simple and clear, and it is easy to learn and understand. let's follow the editor's train of thought to study and learn how the database works.

What is the database?

In a nutshell, a database is a collection of data that can be easily accessed and modified.

The main job of all database management systems is to store data reliably and make it available to users.

Even a simple pile of files can be easily accessed and modified. In fact, a simple database like SQLite is really just a pile of files. However, SQLite is a well-designed file because it allows these operations to be performed:

Ensure data security and consistency through transactions

Can quickly process millions of magnitude of data

In a nutshell, a database can be seen as composed of the following parts:

In many books or papers, the description of the database has its own way. For example, the illustration of the component of the book "inside Database Technology" looks like this:

So don't pay too much attention to how we organize these components or how the process is named, because we have made some choices to suit the writing of this article. What you need to focus on are these different components.

The overall understanding is that the database can be divided into multiple interactive components.

Core component

Process manager: most databases have a "pool" to manage to organize processes, threads, and so on. Even, in order to achieve extreme performance such as nanosecond, some modern databases use their own threads instead of operating system-based threads.

Network manager: the Istroke O of the network has always been an important part, especially for distributed databases. This is why some databases implement their own network managers.

File system Manager: the first bottleneck encountered by the database is disk Ihop O. It is important to have a file system manager that can handle the operating system file system perfectly or even replace it.

Memory manager: a large amount of memory is needed to avoid the impact of disk Ibank O. But when you need to manage a lot of memory, you need an efficient memory manager. Especially if you have multiple queries querying in memory at the same time.

Security Manager: used to manage authentication and authorization for users

Client Manager: used to manage client connections

Tools

Backup Manager: used to back up and restore databases

Recovery Manager: used to restart the database in a consistent state after a database crash

Monitoring Manager: used to record the activity log of the database and provide monitoring data

Manage Manager: provides tools to manage databases, tablespaces, schemas, and metadata for databases such as the name and structure of tables

Query Manager

Query parser: check whether the query is legal, such as lexical and grammatical errors in SQL statements

Query rewriter: pre-optimized query

Query optimizer: optimize queries so that they can be executed more efficiently

Query executor: compiling and executing queries

Data Manager

Transaction managers: processing transactions

Cache manager: as we often understand caches, put them in memory before use and in memory before data is written to disk

Data access Manager: accessing data on disk

In later articles, we will focus on how SQL queries are managed and performed in the database through the following processes:

Client Manager

Query Manager

Data Manager

Thank you for your reading, the above is the content of "how the database works". After the study of this article, I believe you have a deeper understanding of how the database works, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

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.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report