Apache HBase uses a data model that is similar to Bigtable to store users' data in the form of tables. The table has rows and an arbitrary number of columns.

Apache HBase is not an ACID-compliant database but it provides some specific properties.

Let us see the definition of ACID.

  • Atomicity: If an operation is completed entirely or not at all completed is called Atomicity.
  • Consistency: It represents the consistent view of data for example if a row is getting updated with a new value and same time use is accessing that row then the old image should be shown to the user.
  • Isolation: It represents that a transaction is completed successfully.
  • Durability: If a user has received the message "successful" that means there won't be any loss.
  • Visibility: If a user has updated a row and committed it then it should be visible to others.

Let us see each ACID in detail.


Atomicity

The Atomicity rule of the database represents that if there are many database operations are running so once it will finish it should be completed with the success message or it should be completed with the error message. Atomicity prevents partial operation on the database.


Consistency and Isolation

Consistency and Isolation refer to the condition in which if an update transaction is running on the database then it should update only defined rows or based on the logic defined in the query. The application error will not break the rules which are defined at the database level.


Consistency of Scans

In Apache HBase, a scan is not a consistent view of a table. It does not display snapshot isolation.

Scans have below listed properties.

  • If a scan is returning any row that will be a consistent view.
  • A scan will always show a view of the data at least as new as the beginning of the scan.

As an example, if user A writes data XYZ and then communicates via a side-channel to user B, any scans started by user B will contain data at least as new as XYZ. A scan must reflect all changes committed before the construction of the scanner and may reflect some changes committed after the construction of the scanner. Scans must include all data written before the scan (except in the case where data is subsequently mutated, in which cases it may reflect the change).


Visibility

Visibility indicates that when a client receives a "success" response for any change, that change is immediately visible to all clients.


Durability

Durability indicates that any operation that returns a "success" will be made durable on disk and any operation which returns a “failure” message will not be made durable.