Traditional Culture Encyclopedia - Traditional stories - How hbase deletes and modifies data, and what is the difference between traditional rdbms such as oracle

How hbase deletes and modifies data, and what is the difference between traditional rdbms such as oracle

Simply put, modification and deletion of traditional relational databases can quickly be physically deleted by locking directly to a row or rows via primary keys, columns, or indexes.

For Hbase, on the other hand, the limitations of the hdfs file system (which cannot be modified and is inconvenient to add) make it relatively complex to perform CRUD operations.

Hbase modification, is based on a line key to add a line of data, and this line of data to generate a newer timestamp to achieve, each line key will correspond to multiple timestamps of the data, then the latest timestamp is the final modified content.

Deletion is accomplished by marking, if you want to delete a row, Hbase will add a row with a deletion marker, and the deletion marker identifies whether the data built in the row is deleted.

The difference between Hbase and relational databases:

1. Scenarios

Hbase is a column-oriented database, suitable for a large number of inserts at the same time to have a good read function, while Oracle or other relational databases are suitable for dealing with more complex business relationships or transaction processing, and, in the data at a certain level of volume will have good performance, not all business data pressure will occur in a more extreme situation.

2, index

Hbase can only do the primary key index, and relational databases can be different according to the needs of the different indexing mechanisms to join the appropriate for users to query.

3. Bottleneck

The bottleneck of Hbase is the transfer speed of the hard disk, and the bottleneck of Oracle is the seek time of the hard disk (which can be regarded as the number of revolutions of the hard disk).

4, business

Hbase is suitable for business sorted by time, while Oracle or other relational databases are more widely used, such as OLTP or OLAP