If transaction management is likened to a brick, then database management is a house, visible, transaction management is the basis of data management and they are closely related. Let me introduce the management of transaction management and database in the macro.
First, the macro control of the guide map
A transaction is a set of work that makes up a single logical unit, either completely or completely out of execution. It has four properties, isolation, which is related to concurrency control of data management; persistence, which is related to the recovery of database management; atomicity and consistency, they are prerequisites for security and integrity in the database. The four nature of things tightly linked to data management, from the macro to the operation of the data is a database of four properties of the operation, from the microscopic point of view of the things four nature, the following in-depth database management operation instructions.
Second, database Management Guide map
Security PK Integrity
Security: Protect the database against illegal use, so as to avoid the disclosure, alteration or destruction of data. Integrity: Data correctness, validity, compatibility, and preventing erroneous data from entering the database.
Difference: Security ensures that users are limited to doing what they want to do, and that integrity ensures that the user is doing the right thing.
Contact: Protect data.
Concurrency control is to solve the problem of a single execution of multiple transactions, if a number of things on the same piece of data operation, which brings the data update lost, non-repeatable read, read dirty data and so on, then how to solve this problem? So the concept of "lock" was introduced, and the blocked level three protocol accompanied with the problem.
Database recovery is the last barrier to data management, if the data in the database is compromised, we can use the recovery database method to resolve, but the premise of recovering the database is that we dump and build the log, and then at the level of the database destroyed by a selective recovery database.
Third, summary
The operation of a transaction is a subdivision of the data management, if we control the transaction, processing good data, then the management and maintenance of the data has played a good role, the transaction is small but its set up to form the overall operation of the data. The so-called do not accumulate Kuibu, no even thousands of miles, do not accumulate small stream, no has become a river!
Management of databases and transactions