What is the acid test of the database __ database

Source: Internet
Author: User
The diamond is obviously a very valuable thing, because it is expensive, so we will seriously distinguish between genuine and counterfeit. Make sure the Diamonds are really fake a simple and (at least in the movies) popular test is to get it rolling on a piece of glass. Because diamonds are known as the hardest material, real diamonds can easily cut glass surfaces, and fakes, especially those made with glass itself, cannot.
For software developers, databases are also so valuable. If you use a database, you need to make sure that it stores the data securely and allows you to retrieve the data in the future. You also want the database to allow multiple programs to use the database without interfering with each other. For demonstration purposes, suppose you own a bank. The bank's database must have the following features: secure storage of appropriate data fast retrieval of appropriate data support for multiple concurrent user sessions these tasks can be called acid tests; acid is atomicity (atomic), consistency (consistent), is Olation (isolation) and durability (persistent) abbreviations.

Atomicity means that database operations can be grouped together and treated as a single unit.

Consistency guarantees that all operations in this single unit (or transaction) are either executed successfully or not. In other words, the database cannot be in an incomplete state. To understand why these features are so important, consider the banking business: the transfer of money from a savings account to a checking account. If the transfer fails after deducting the money from the savings account and adding it to the checking account, you will become poor and the bank will have an angry (former) customer. Atomicity makes these two operations--from savings accounts and money to checking accounts--treated as a single transaction. Consistency guarantees that both operations in the transaction succeed at the same time or fail simultaneously. In this way, your money will not be lost.

Isolation refers to a separate set of database transactions executed in a manner that does not conflict with each other. Still using this banking analogy, consider two customers to transfer funds between accounts at the same time. The database must track two transfers separately, otherwise the money may go into the wrong account, and the bank may have two more angry (former) customers.

The persistence guarantee database is secure and does not terminate abnormally. When the power is off, if the TV or computer does not work, this may be a small problem, but the same thing for the database is not the same. You won't be a happy customer if the bank computer loses power when it transfers money, causing the transaction to be lost. Persistence guarantees if the database terminates abnormally during the transfer of funds, it will be able to resume transactions and continue normal operations when the database is restarted.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.