Hurry! 20% Off Ends SoonRegister Now

HBase Vs RDBMS

Both HBase and RDBMS, both are column-oriented database management systems. HBase is a column-oriented dbms and it works on top of Hadoop Distributed File System (HDFS). RDBMS uses tables to represent data and their relationships. 

H Base Vs RDBMS

H BaseRDBMS
1. Column-oriented1. 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 language4. SQL
5. Wide tables5. Narrow tables
6. Joins using MR – not optimized                                                            6. optimized for Joins(small, fast ones)                                     
7. Tight – Integration with MR7. 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. Consistent10. Consistent
11. No transactions.11. transactional
12. Good for semi-structured data as well as structured data.12. Good for structured data.                                                                        

[Read these latest Hadoop Interview Questions that help you grab high-paying jobs!]

Basis CRUD Operations in H Base

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

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

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

  • These are provided by the HTable class.

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

  • For creating a table, the syntax is

Want to become a Hadoop Developer? Check out the Big Data Hadoop Certification Training course and get certified today.
H Base (main):002:0>create ‘table name’, ’column family Name’

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

 [Do Wish to learn more about Hadoop? Check out our comprehensive Hadoop Tutorial]

We can’t delete column family names.

Example for HBase

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’
To see the data, a command is
hbase (main):002:0> scan ‘Hadoop Table’, (like select stmt)

we can see the records of the table.

  • To get the particular row, cmd is
Hbase(main):002:0> get ‘Hadoop Table’, ‘row2’
  •  To insert multiple columns at a time, cmd is
h base (main):002:0> put ‘Hadoop Table’, ‘row4’ Hadoop: pig, hue, zookeeper’ ‘different components of hadoop’
  • 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.

  • To insert the new row with the same row key i.e with no overriding concept and it will append, for Example as below
Hbase(main):002:0> put ‘Hadoop Table’, ‘row2’‘Hadoop:New map reduce’ ‘New one’
  • Based on the version ID, we will insert the values in H Base.
  • To check the count of records, cmd is
hbase(main):002:0> count ‘Hadoop Table’
  • To check whether the table exists or not

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

MindMajix Youtube Channel

Explore MapReduce Sample Resumes! Download & Edit, Get Noticed by Top Employers!Download Now!

List of Other Big Data Courses:

 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

 

Job Support Program

Online Work Support for your on-job roles.

jobservice

Our work-support plans provide precise options as per your project tasks. Whether you are a newbie or an experienced professional seeking assistance in completing project tasks, we are here with the following plans to meet your custom needs:

  • Pay Per Hour
  • Pay Per Week
  • Monthly
Learn MoreGet Job Support
Course Schedule
NameDates
Hadoop TrainingDec 24 to Jan 08View Details
Hadoop TrainingDec 28 to Jan 12View Details
Hadoop TrainingDec 31 to Jan 15View Details
Hadoop TrainingJan 04 to Jan 19View Details
Last updated: 10 Apr 2023
About Author

Yamuna Karumuri is a content writer at Mindmajix.com. Her passion lies in writing articles on IT platforms including Machine learning, PowerShell, DevOps, Data Science, Artificial Intelligence, Selenium, MSBI, and so on. You can connect with her via  LinkedIn.

read less