Content deleted Content added
m →Database System: clean up using AWB |
design of the physical disk Tag: Mobile edit |
||
Line 16:
Atomic commits in database systems fulfil two of the key properties of [[ACID]],<ref>{{cite book |last=Elmasri |first=Ramez |title=Fundamentals of Database Systems 5th Edition |page=620 |publisher=Addison Wesley |year=2006}}</ref> [[Atomicity (database systems)|atomicity]] and [[Consistency (database systems)|consistency]]. Consistency is only achieved if each change in the atomic commit is consistent.
As shown in the example atomic commits are critical to multistep operations in databases. Due to modern hardware design of the [[Data storage device|physical disk]] on which the database resides true atomic commits cannot exist. The smallest area that can be written to on disk is known as a sector. A single database entry may span several different sectors. Only one sector can be written at a time. This writing limit is why true atomic commits are not possible. After the database entries in [[Computer memory|memory]] have been modified they are queued up to be written to disk. This means the same problems identified in the example have reoccurred. Any algorithmic solution to this problem will still encounter the Two Generals’ Problem. The [[two-phase commit protocol]] and [[three-phase commit protocol]] attempt to solve this and some of the other problems associated with atomic commits.
The two-phase commit protocol requires a coordinator to maintain all the information needed to recover the original state of the database if something goes wrong. As the name indicates there are two phases, <u>voting</u> and <u>commit</u>.
|