The four basic properties of a Transaction Processing System are referred to as the ACID properties. Atomicity, Consistency, Isolation and Durability. These properties are used to test that a transaction is never unfinished, the data held in the system is always consistent, concurrent transactions are independent and the effects of a transaction continue after the transaction is completed.
Atomicity – The transaction must happen completely or it should be undone completely. If a transaction fails, the effects of all operations that make up the transaction need to be cancelled and the data needs to be returned to its original previous state. If we look at the first part of the word “Atomicity”, atom, the term suggests its meaning at the time the concept was first used. An atom is considered the smallest item of matter that can exist.
An example of how a transaction processing system handles atomicity is a student making a purchase from the school canteen. Money changes hands and the student later realises that the drink is past its use by date. As there are no other drinks available, the student returns the drink and the canteen refunds the purchase price. This transaction is not recorded and so, no transaction occurred.
Consistency – For a successful transaction to take place, all parties must agree on the facts of the exchange. When a successful transaction is completed, the data should be in a consistent state. This means that all data should be able to be accounted for and that each step of the transaction is carried out in the same way each time. This ensures that data is correct for each part of the transaction.
An example of this property would see the sale of two drinks in the canteen should increase the takings by the canteen and decrease the stock held in the canteen by two drinks. The steps are to exchange the drinks for money. The two should balance so that the data is consistent.
Isolation – Transaction must be independent of each other. This doesn’t actually happen. The user just believes that it does. Isolation involves the appearance of treating each transaction separately and keeping the data for each transaction separate.
The aim of isolation is to prevent the same data being treated twice. For example, an organisation selling tickets to rock concerts such as Ticketek need to ensure they do not sell the same seat to more than one person. There may be many outlets selling tickets as well as the online booking website. Customers who access the online booking site need to be sure that their transaction is separate. It is vital that no one else can book the same seat through another agent. Isolation is a bigger issue as the Transaction Processing System becomes larger as it becomes difficult to make it appear as if each transaction is being handled sequentially.
Durability – The effects of a completed transaction should always be durable. In a large organisation, transactions need to be recorded so that they can be checked at any time in the future. Backups need to be kept of this data. This is also part of an organisations responsibility to pay tax and meet other obligations.