In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-03-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >
Share
Shulou(Shulou.com)06/01 Report--
Terms such as "transaction", "index" and "instance" are often heard when learning databases, so what exactly do they mean?
Business
Transaction: refers to a complete operation process. If there is an "accident" in any part of the process, the operation will be rolled back. Transactions are often used by databases in banks.
For example, if user A transfers 100 yuan to user B, a transaction is needed. First, the system will deduct 100 yuan from user A's account, and then add 100 yuan to user B's account. If the whole operation is successful, then the transaction is completed and the transfer is successful. If an "accident" occurs at a certain step, the transaction will be rolled back to its original state. For example, if user A deducts 100 blocks-success, user B increases 100 blocks-fails, then the transaction will be rolled back and the 100 blocks deducted by user A will be returned (in fact: the transaction is in progress, and when no results are returned, there may be no real operation on the data).
Indexes
In fact, the database records the data to the disk, when querying a data, it needs to be scanned on the hard disk, so the data query speed will be slower and slower when the amount of data increases. How to improve the query ability of data, it is necessary to use the index, which is similar to the catalog of a book and records the location of the data storage. What the index does is to improve the read performance of the database as much as possible.
Note: although the index can improve the read performance of the database, the index can not be abused, because when a large amount of data is written to the hard disk, the index needs to be generated once, then the database performance will be greatly reduced.
Example
The instance consists of a set of processes and memory that manage the database in the background. Database and instance are two separate concepts. Database refers to recording data to a file system or disk. Then the example is to manage how (multi-user) users transfer the data to the data and in what format it is recorded to the database (actually recorded to the file system or hard disk).
The use of instances is more often used in Oracle databases. In RAC of Oracle, one instance can only open one database, but one database can be opened by multiple instances at the same time. You can refer to the following picture for an Oracle database example.
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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.