Copyright

ACID Properties in Data Base Management Systems (DBMS)

Instructor: Temitayo Odugbesan

Temitayo has 11+ years Industrial Experience in Information Technology and has a master's degree in Computer Science.

In this lesson we are going to examine the ACID properties of a database management system. We will examine the properties of atomicity, consistency, isolation, and durability, which when adhered to constitute an accurate, robust, and stable database.

Database Transactions

Database management systems do not just serve as a repository of data for our libraries, student records, or doctor's offices. They can be the backbone to real world transactions such as buying a product, making a bank deposit, or registering for a university course. A transaction is any process that causes a 'read from' or a 'write to' action in a database. In the real world, a transaction consists of a group of tasks, with a single task being the minimum unit of a transaction. Each related task much be completed successfully to ensure the continued integrity of the database.

Transaction Properties

Let's consider John, a college student. For John to receive a pass or fail grade in a subject (transaction):

  1. He must complete the subject exam. (task)
  2. His script needs to marked. (task)
  3. The marks need to be recorded in a department master file. (task)
  4. The master file data must be extracted to generate his final report. (task)

Then, he is granted a grade report. If any one of these tasks fail, John cannot be awarded his grade.

Similarly, in database transactions, in order for the integrity of the database to be maintained, transactions must possess certain properties. Each individual transaction must display Atomicity, Consistency, Isolation, and Durability, abbreviated as ACID.

Atomicity

Atomicity comes from the word atom. (In science it is the basic unit of an element.) For our database transaction to demonstrate atomicity, every task related to that transaction must be successfully completed. Atomicity requires that all operations related to that transaction are either successfully completed or the entire transaction aborted. For example, in a transaction consisting of 4 tasks/requests, each task must be completed successfully or the entire transaction is aborted. The transaction is treated as a single, logical unit. In the case of our student, John, if the examination is taken and the script marked, but the script is misplaced before the marks are recorded to the master file, there will be no grade because one of the tasks failed.

Consistency

Consistency signifies the constant ability of the database to retain valid data (valid by all defined rules). The processing of transactions must take the database from one consistent state to another. When a transaction is completed, meaning all related tasks have been successfully completed, the database must remain in a consistent state. If at any point any of the related transactions violates integrity rules, the entire transaction is aborted.

Example: A 'date' transaction takes place in the database. We want the video membership validity of a new member to be 3 months. The new member start date is October 1, 2016, so we expect the member's expiration date to be January 1, 2017.

If the transaction should read 01/01/2017, but instead the expiration date transaction reads 13/01/2016, clearly some predefined rules for date calculations within the database have been violated. The calendar does not have 13 months. The transaction should be aborted as data inconsistency as occurred.

To unlock this lesson you must be a Study.com Member.
Create your account

Register to view this lesson

Are you a student or a teacher?

Unlock Your Education

See for yourself why 30 million people use Study.com

Become a Study.com member and start learning now.
Become a Member  Back
What teachers are saying about Study.com
Try it risk-free for 30 days

Earning College Credit

Did you know… We have over 200 college courses that prepare you to earn credit by exam that is accepted by over 1,500 colleges and universities. You can test out of the first two years of college and save thousands off your degree. Anyone can earn credit-by-exam regardless of age or education level.

To learn more, visit our Earning Credit Page

Transferring credit to the school of your choice

Not sure what college you want to attend yet? Study.com has thousands of articles about every imaginable degree, area of study and career path that can help you find the school that's right for you.

Create an account to start this course today
Try it risk-free for 30 days!
Create an account
Support