The HBase data model terminology is listed as follows:
Table
Row
Column family
Column
Cell
Let's have a look at each of them in detail.
This is a unique key for each record in an HBase table. It is represented as a byte array internally. No matter what data (string, long, date, or serialized) we choose as the row key, internally, on the disk, or in memory, it will be converted to byte arrays, and then stored. For example, Emp_ID
can be the row key for an employee
table.
This entity of an HBase table groups different columns of the table. Suppose we have columns such as name
, dob
, salary
, city
, phone
, pin
, and landmark
in an employee
table. We can group these columns as Basic_Detail(name, dob, salary)
and Address(city, phone, pin, landmark)
as two column families. The benefit is that you can retrieve the columns faster as column families are stored separately in HBase on the disk.