This simple little feature has solved the most troublesome problem for countless businesses
Let me share a common case. A certain customer has nearly ten million registered users nationwide, with an average daily transaction volume of hundreds of thousands of transactions. The company uses the MySQL database to store core business data, including user information, order information, product information, etc. One day, the company's operations team received feedback from users that orders could not be queried, and some pages displayed errors. The technical team immediately started to restore data and launched an investigation. By analyzing the application logs, they found a large number of error messages about "order data does not exist". However, the application did not have any exceptions, so they turned to the DBA team for processing. The DBA, by querying the order data table, found a large number of missing order data. Analyzing the Binlog logs, they found a large number of DELETE operations at a certain point in time.
Due to the inability of Binlog to locate the operating entity, it took some effort to find the development personnel who performed the DELETE operation. It was eventually discovered that the employee mistakenly took the production environment as the test environment during testing and executed the script to clear test data, resulting in the deletion of nearly 30% of the order data, involving nearly a million records, and causing a large number of user complaints.
Due to the significant impact of this incident on the company, to prevent similar incidents from happening again, the company decided to standardize the internal data change process through NineData's database DevOps and completely eliminate the problem of accidental deletion.
Currently, in the Internet industry, there are not many companies that can truly standardize the use of databases. A large part of the companies are not aware of this issue, and some development personnel even make changes directly in the production environment, which can lead to a series of problems, such as inability to track operations, unreviewed changes, data security issues, etc.
Why not standardize database management?
Some friends may say, everyone knows that standardizing database management is necessary, but it's not that easy to do! The main problem is that it's not easy to find a handy database management tool. The drawbacks of the current open-source tools are very obvious, such as: not supporting commercial databases, not supporting the latest version of the database, no one to support when problems arise... and so on.
Indeed, the above problems do exist. If you need to standardize database management, the first thing to do is to find a good tool. The risks and potential losses brought by non-standard database management are not something all companies can afford.
Here, I recommend a tool, NineData Database DevOps. Using the case in this article, NineData can identify and prevent faults from occurring at the very beginning:
- SQL Standardization: Automatically intercept any changes initiated to the production environment to prevent risks before they happen.
- Audit Logs: Even if a fault occurs, all operations performed by everyone in the company on the database can be quickly traced back through the audit log feature, and the responsible person can be located in just a few seconds.
More importantly, for small and medium-sized enterprises, if the number of data sources in the company does not exceed 10, NineData can be used for free permanently, with almost zero investment cost.
Next, let's understand how to use NineData to standardize corporate database management.
What can NineData do?
NineData can do too much, such as visual IDE, visual table structure design, data import and export, data tracking and rollback, data archiving and cleaning, SQL code review, slow query analysis, batch database changes, etc. Here we only talk about how to solve the problem of corporate database standardization management at the lowest cost.
One-stop database DevOps platform for development personnel
First, you can enter all the company's data sources into the NineData platform for one-stop management of all your data sources. There is no longer a need for a variety of database management tools, such as clients, command line tools, etc. NineData provides a unified interface and operation method, allowing you to easily manage different types of data sources, whether relational databases, NoSQL databases, or data warehouses.
Automated change management
Then, you can set your change rules on the platform, which operations can be executed directly, which operations need to be approved before execution, and which operations are not allowed...
After setting the rules, invite all your development personnel to log in to NineData and configure permissions for each person. The granularity of permissions can be as fine as the column level.
After doing this, you can take back all the direct database connection accounts and require all development personnel to access data sources through the platform.
Operational Audit
Finally, for which employee performed what operation on which database object at what time, as a system administrator, you can manage it at a glance through the platform's audit log page. Under the permanently free 10 data source professional version, you can trace back to operations up to 3 months ago, such as the fault in this article's case, and it can be easily investigated in a few seconds.
Summary
After the above simple operations, if you are pleasantly surprised to find that changes to the database have become more orderly, non-standard operations are automatically intercepted by NineData, and the operations published to the database are all approved by yourself, the entire database management process has become more transparent and controllable. Then you are even more pleasantly surprised to find that you haven't spent a penny, so congratulations, you have achieved zero-cost corporate database standardization management.