0% completed
A transaction in a database represents a single, logical unit of work. It ensures that a series of operations either completes successfully as a whole or fails entirely, leaving the database unchanged. This concept is fundamental to maintaining the database's integrity, ensuring consistency, and allowing safe retries without side effects.
A transaction can either be:
These characteristics are often referred to as the ACID properties.
Imagine a scenario where Person A transfers $10 to Person B's account. The following steps are required:
Without transactions:
With transactions:
While traditional relational databases implement strict ACID properties, some systems provide weaker guarantees to improve performance or scalability:
These weaker guarantees are designed to optimize specific use cases but do not offer the same level of reliability as full transactions.
.....
.....
.....