Mindmajix

Difference between H Base and RDBMS – Hadoop

H Base Vs RDBMS:-

Capture 15 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.

Basis CRUD Operations in H Base:-

Capture 15 If you want any CRUD Operations in H Base, H Base should be  up and running otherwise the operations will not be successful.

Capture 15 Running the child instance, but not running the master instance is not same as the running master instance as creating the child instance.

Capture 15 The initial sets of basic operations are often referred to as CRUD which stands for Create, Read, Update and Delete.

Capture 15 These are provided by the HTable class.

Capture 15 Whenever we are creating a table name in  H Base, we must follow the below steps:

Capture 15 For creating a table, syntax is

h base (main):002:0>create ‘table name’, ’column family Name’

Ex:-h base (main):002:0>create ‘Hadoop Table’, ’column1’,     ’column2’

Capture 15 We can’t delete column family names.

Screenshot_1827

Capture 15 To inset 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 Ware house’
h base (main):002:0> put ‘Hadoop Table’, ’row4’, ’ Hadoop: H Base’,’ For Reads and write’

To see the data, command is

hbase (main):002:0> scan ‘Hadoop Table’, (like select stmt)

we can see the records of the table.

Capture 15 To get the particular row, cmd is

Hbase(main):002:0> get ‘Hadoop Table’, ‘row2’

 Capture 15 To insert the multiple columns at a time, cmd is

h base (main):002:0> put ‘Hadoop Table’, ‘row4’ Hadoop: pig, hue, zookeeper’ ‘different components of hadoop’

Capture 15 To delete the row, cmd is

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.

Capture 15 To insert the new row with same row key i.e with no over ride concept and it will append, Example as below

Hbase(main):002:0> put ‘Hadoop Table’, ‘row2’‘Hadoop:New map reduce’ ‘New one’

Capture 15 Based on the version ID, we will insert the values in H Base.

Capture 15 To check the count of records, cmd is

hbase(main):002:0> count ‘Hadoop Table’

Capture 15 To check whether the table is exist or not

H base(main):002:0> Exist ‘Hadoop Table’

 

 

 


 

0 Responses on Difference between H Base and RDBMS – Hadoop"

Leave a Message

Your email address will not be published. Required fields are marked *

Copy Rights Reserved © Mindmajix.com All rights reserved. Disclaimer.
Course Adviser

Fill your details, course adviser will reach you.