HBase Basics

Posted Posted in Hadoop, Hadoop

Difference between HBase and RDBMS? Hbase RDBMS Column Oriented Row Oriented Flexible schema, add columns on the fly Fixed Schema Good with sparse table Not optimized for sparse table Join using MapReduce not optimized Not Applicable Horizontal Scalability (Add hardware) Hard to shard and scale Good for structured and semi structured data Good for structured […]

Data Manipulation Language in Cassandra

Posted Posted in Cassandra, Hadoop

Data Manipulation Language in Cassandra: Insert data to KeySpace: Syntax: &lt;INSERTSTATEMENT&gt; ::= INSERT INTO &lt;TABLENAME&gt; '(' &lt;IDENTIFIER&gt; ( ',' &lt;IDENTIFIER&gt;)* ')' VALUES'(' &lt;TERM -OR- LITERAL&gt; (',' &lt;TERM -OR- LITERAL&gt;)<em>')'(IF NOT EXIST)?( USING&lt;OPTION&gt; (AND&lt;OPTION&gt;)</em> )?&lt;TERM -OR- LITERAL&gt; ::= &lt;TERM&gt; | &lt;COLLECTION-LITERAL&gt; &lt;OPTION&gt; ::= TIMESTAMP &lt;INTEGER&gt;|TTL&lt;INTEGER&gt; Update data in KeySpace: Syntax: &lt;UPDATE-STMT&gt; ::= UPDATE&lt;TABLE-NAME&gt; (USING &lt;OPTION&gt; (AND […]

Data Definition Language in Cassandra

Posted Posted in Cassandra, Hadoop

Data Definition Language in Cassandra: You can create,alter,drop,truncate table/keyspaces in Cassandra. Create KeySpace: It is used to create a new keyspace Syntax: CREATE KEYSPACE &lt;NAME&gt; WITH STATEGY_CLASS = &lt;STATEGY_NAME&gt;[AND STRATEGY_OPTIONS;&lt;OPTION&gt;=&lt;VALUE&gt;[…]]; USE: It is used to switch to a keyspace to perform work Syntax: USE &lt;KEYSPACE&gt; Alter KeySpace: To change the existing keyspace Syntax: &lt;CRETAE-KEYSPACE-STMT&gt;::= ALTER […]

Cassandra Query Language (CQL)

Posted Posted in Cassandra, Hadoop

Cassandra Query Language:(CQL) CQL is the SQL interface in Cassandra.CQL is intended to privide a simple,common and easier interface in Cassandra. Cassandra was originally developed with a Thrift RPC based approach and it was difficult to work with. So CQL was developed to overcome the Thrift RPC approach. It is similar to SQL but all […]

Cassandra Data Model

Posted Posted in Cassandra, Hadoop

Data model determines the logical model of a database and the manner by which the data is stored, organized and manipulated. Data model Keywords in Cassandra: Cluster is the database server and keyspace is the database in cassandra.ROws and columns are the way data organized in a table in Cassandra.You can create primary and secondary […]

Snitches in Cassandra

Posted Posted in Cassandra, Hadoop

Snitch is used to determine the relative host proximity. Snitches gather information on network topology for cassandra to efficiently route requests. For a single data center cluster, simple snitch is sufficient. Types of Snitches: Simple snitches This is the default snitch used and uses a simple strategy of placing the copy of the row on […]

CRUD Operations in Cassandra

Posted Posted in Cassandra, Hadoop

CRUD is nothing but Create,Read,Update and Delete operations in Cassandra. Cassandra Query Language:(CQL) CQL is the SQL interface in Cassandra.CQL is intended to privide a simple,common and easier interface in Cassandra. Cassandra was originally developed with a Thrift RPC based approach and it was difficult to work with. So CQL was developed to overcome the […]