About the meaning of the database "transaction" "Index" "instance"

Source: Internet
Author: User

In the learning database, often hear "transaction" "Index" "instance" and other terms, then what exactly do they mean?


Transaction

Transaction: Refers to a complete operating procedure. This process will be rolled back if there is an "accident" at any one of these steps. Transactions are often used by databases in banks.

For example, if User a transfers 100 dollars to User B, then the transaction needs to be used. First, the system will deduct 100 blocks from user A's account and then add 100 to User B's account. If the entire operation succeeds, the final transaction is completed and the transfer is successful. If an "unexpected" step occurs, the transaction will be rolled back to its original state. For example, if User a deducts 100 blocks-Success, User B increases by 100-failure, then the transaction rolls back, and the 100 blocks deducted by User A are returned (in fact: the transaction is executing and the data may not be actually manipulated when the result is not returned).


Index

The database is actually to record data to disk, when querying a data, you need to scan the hard disk, so that the data volume increases when the data query speed will be more and more slow. How to improve the query ability of the data, you need to use the index, the index is similar to a book directory, records the location of the data storage. The index is made to "maximize read performance of the database."

Note: Although indexes can improve the read performance of the database, the indexes still cannot be abused because, in addition to writing to the hard disk when a large amount of data is written, the database performance will be greatly reduced.


Instance

An instance is composed of a set of processes and memory that manages the database in a background. The database and the instance are two independent concepts, the database refers to records the data to the file system or the disk, then the instance is manages does (multi-user) How the user transmits the data to the data, in what format records to the database (actually is the record to the file system or the hard disk).

Instances are used more in Oracle databases, where one instance can open only one database in an Oracle RAC, but a database can be opened and used by multiple instances at the same time. Refer to the following picture for an Oracle DB instance.


650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/8C/43/wKioL1hne-OQf7T3AANgBmEAWYE199.png-wh_500x0-wm_3 -wmp_4-s_1538274266.png "title=" 12333.png "alt=" Wkiol1hne-oqf7t3aangbmeawye199.png-wh_50 "/>




This article is from the "Road Difficult" blog, please be sure to keep this source http://xln1229.blog.51cto.com/12460242/1887914

About the meaning of the database "transaction" "Index" "instance"

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.