Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

HBase-1.0.1 Learning Notes (2) HBase data Model

2025-02-23 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Database >

Share

Shulou(Shulou.com)06/01 Report--

Lu Chunli's work notes, who said that programmers should not have literary style?

For an introduction to NoSQL Database, please see: http://www.nosql-database.org/

The main categories include:

A, Wide Column Store / Column Families, such as HBase, Cassandra, Cloudata, Apache Flink, IBM Informix, etc. B, Document Store, such as Elasticsearch, MongoDB, etc. C, Key Value / Tuple Store, such as Redis, Oracle NoSQL Database, Berkeley DB, etc. D, Graph Databases, such as Neo4J, Sparksee, etc. E, others

HBase-Hadoop Database is a highly reliable, high-performance, column-oriented and scalable distributed storage system. Large-scale structured storage clusters can be built on cheap PC Server by using HBase technology.

HBase uses Hadoop HDFS as its file storage system, Hadoop MapReduce to deal with massive data in HBase, and Zookeeper as a coordination tool. In addition, Pig and Hive provide high-level language support for HBase, which makes statistical data processing on HBase very easy. Sqoop provides RDBMS data import function for HBase, which makes it very easy to migrate traditional database data to HBase.

HBase access interface

HBase shell:HBase command line tool, the simplest interface, suitable for HBase management.

Native Java API: a conventional and efficient access method, suitable for parallel batch processing of HBase data through MR.

Hive: access HBase in a SQL-like way, simplifying access to HBase.

Pig: similar to Hive, it is finally parsed into MR to deal with HBase table data, which is suitable for data statistics.

1. Logical model

1.1 Table

The logical organization of table,HBase data, there is no concept of data type in HBase, and all data is stored as a byte array. In HDFS, the table name of each table is treated as a separate directory structure.

HBase provides a command line to create a table that requires a table name and at least one column family to be created. Unlike relational databases, where columns and column definitions must be specified when creating tables, there are no column definitions and no data types in HBase. You don't need a user name and password to access HBase, and there's no Schema.

1.2 Lin

Row key, a unique identification line, is stored as an array of bytes.

The rows in the table are sorted according to the dictionary order of Row Key, that is, 1, 10, 2, 3.

There are only three ways to access rows in HBase table, through a single row key, through row key's range scan, and through a full table scan.

1.3 column families

Column Family, you must specify at least one column family when creating a table.

Create table 'test',' cf'; # Note when operating hbase shell, table names and column families and columns need to be enclosed in single quotation marks

1.4 column qualifier

Unit 1.5

1.6 time version

2. Physical model

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Database

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report