HBase and RDBMS

Source: Internet
Author: User
Tags zookeeper

The difference between hbase and traditional relational databases

HBase is suitable for databases with unstructured data stores. A data storage method between the map Entry and the DB row.

1. Data type: HBase only the simple string type, it only saves the string all types are handed to the user to handle. Relational databases can select types

2. Data manipulation: HBase operation only very simple insert, query and other operations, the table is separated from the table, there is no join

3. Storage mode: HBase is based on column storage, each column family is saved by several files, and the files of different column families are separated. The traditional relational database is saved based on the table structure and the row pattern.

4. Data maintenance: When the HBase update operation, the old version is still retained, and the new data is actually inserted. Traditional relational databases are substitution modifications

5. Scalability: HBase can easily increase or decrease the number of hardware

HBase Mode Design

Eg: the student selection table structure is in the RDBMS as follows:

Student Table (Student):

S_No S_name S_sex S_age
School Number Name Gender Age

Timetable (course):

C_no C_name C_credit
Course Number Course Name Credits

Selected timetable:

Sc_sno Sc_cno Sc_score
School Number Course Number Results

In HBase:

Student

Row key Column Family Column Family
Info Value Course Value
S_No

Info:s_name

Info:s_sex

Info:s_age

Name

Sex

Age

Course:c_no1

Course:c_no2

Course:c_no3

Sc_score1

Sc_score2

Sc_score3

Course

Row key Column Family Column Family
Info Value Student Value
C_no

Info:c_name

Info:c_credit

Name

Sex

Student:s_no1

Student:s_no2

Sc_score1

Sc_score2

Working principle

1) HBase Client side Connection Zookeeper

2) which server management is acquired through the Zookeeper component client-root-region

3) Client Access Management-root-server

4) Get management by-root-. Meta. Regionserver

5). Meta. All table information in HBase is recorded, based on. Meta. Get region distribution information (after getting the client will cache this information), Access Hregionserver

(Because the client caches region information, the number of accesses is so much that even if you do not access the. Meta., you can also know which hregionserver to visit)

-root-,.meta. The table relationship is as follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.