This is not my own writing. Instead, I am assembling useful resources into a blog for my own understanding. Reference of resources will be present at the end of the blog.
A transaction is a collection of read/write operations succeeding only if all contained operations succeed. In order to maintain consistency in a database, before and after the transaction, certain properties are followed. These are called ACID properties.