- Learning PostgreSQL 11
- Salahaldin Juba Andrey Volkov
- 263字
- 2021-07-02 13:11:37
ACID properties
In a relational database, a single logical operation is called a transaction. The technical translation of a transaction is a set of database operations, which are create, read, update, and delete (CRUD). An example of explaining a transaction is a budget assignment to several projects in the company assuming we have a fixed amount of money. If we increase a certain project budget, we need to deduct this amount of increase from another project. The ACID properties in this context could be described as follows:
- Atomicity: All or nothing, which means that if a part of a transaction fails, then the transaction fails as a whole.
- Consistency: Any transaction gets the database from one valid state to another valid state. Database consistency is governed normally by data constraints and the relation between data and any combination thereof. For example, imagine if someone would like to completely purge his account on a shopping service. In order to purge his account, his account details, such as a list of addresses, will also need to be purged. This is governed by foreign key constraints, which will be explained in detail in the coming chapter.
- Isolation: Concurrent execution of transactions results in a system state that would be obtained if the transactions were executed serially.
- Durability: The transactions that are committed—that is, executed successfully—are persistent even with power loss or some server crashes. In PostgreSQL, this is done normally by a technique called Write-Ahead Logging (WAL). Another database refers to this as a transaction log such as in Oracle.
推薦閱讀
- VMware View Security Essentials
- Power Up Your PowToon Studio Project
- Oracle Database In-Memory(架構與實踐)
- Vue.js前端開發基礎與項目實戰
- Getting Started with CreateJS
- Apache Spark 2 for Beginners
- C語言程序設計學習指導與習題解答
- 算法訓練營:提高篇(全彩版)
- Learning Android Application Testing
- Flutter從0基礎到App上線
- Java Web入門很輕松(微課超值版)
- Mastering Unity 2017 Game Development with C#(Second Edition)
- Visual Basic程序設計
- Web前端開發實戰教程(HTML5+CSS3+JavaScript)(微課版)
- Unity3D高級編程:主程手記