H BASE and other column-oriented DATABASE are often compared to more traditional and popular relational database or RDBMS.
H Base | RDBMS |
1. Column-oriented | 1. Row-oriented(mostly) |
2. Flexible schema, add columns on the Fly | 2. Fixed schema |
3. Good with sparse tables. | 3. Not optimized for sparse tables. |
4. No query language | 4. SQL |
5. Wide tables | 5. Narrow tables |
6. Joins using MR – not optimized | 6. optimized for Joins(small, fast ones) |
7. Tight – Integration with MR | 7. Not really |
8. De-normalize your data. | 8. Normalize as you can |
9. Horizontal scalability-just add hard war. | 9. Hard to share and scale. |
10. Consistent | 10. Consistent |
11. No transactions. | 11. transactional |
12. Good for semi-structured data as well as structured data. | 12. Good for structured data. |
H Base (main):002:0>create ‘table name’, ’column family Name’
Ex:-H Base (main):002:0>create ‘Hadoop Table’, ’column1’, ’column2’
We can’t delete column family names.
To insert data, the commands are
hbase (main):002:0> put ‘Hadoop Table’, ’row1’, ’ Hadoop: HDRS’, ‘For storage’ h base (main):002:0> put ‘Hadoop Table’, ’row2’, ’ Hadoop: Map Reduce’, For Processing’ h base (main):002:0> put ‘Hadoop Table’, ’row3’, ’ Hadoop: Hive’,’ For Warehouse’ h base (main):002:0> put ‘Hadoop Table’, ’row4’, ’ Hadoop: H Base’,’ For Reads and write’
hbase (main):002:0> scan ‘Hadoop Table’, (like select stmt)
we can see the records of the table.
Hbase(main):002:0> get ‘Hadoop Table’, ‘row2’
h base (main):002:0> put ‘Hadoop Table’, ‘row4’ Hadoop: pig, hue, zookeeper’ ‘different components of hadoop’
hbase(main):002:0> Delete ‘Hadoop Table’, ‘row4’‘Hadoop:Hive’
We can delete the complete row, but cannot delete the individual value of the row.
Hbase(main):002:0> put ‘Hadoop Table’, ‘row2’‘Hadoop:New map reduce’ ‘New one’
hbase(main):002:0> count ‘Hadoop Table’
H base(main):002:0> Exist ‘Hadoop Table’
Hadoop Administration | MapReduce |
Big Data On AWS | Informatica Big Data Integration |
Bigdata Greenplum DBA | Informatica Big Data Edition |
Hadoop Hive | Impala |
Hadoop Testing | Apache Mahout |
Free Demo for Corporate & Online Trainings.