Home > Programming / tutorials > Introduction to NoSQL

Introduction to NoSQL

 

What is No SQL

No Sql are called as Next Generation database

Characteristics

  • —Non-relational
  • —Distributed
  • —Open-source
  • —Horizontally scalable
  • —No Predefined Schema

Horizontally scalable : Adding more machines to your resource. Vertical scaling is by adding more power.

NoSQL Database Types

There are 4 types of No Sql database

  • Document databases pair each key with a complex data structure known as a document. Documents can contain many different key-value pairs, or key-array pairs, or even nested documents. Couch DB, Mongo DB
  • Graph stores are used to store information about networks, such as social connections. Graph stores include Neo4J and HyperGraphDB.
  • Key-value stores are the simplest NoSQL databases. Every single item in the database is stored as an attribute name (or “key”), together with its value. Examples of key-value stores are Riak and Voldemort. Some key-value stores, such as Redis, allow each value to have a type, such as “integer”, which adds functionality.
  • Wide-column stores such as Cassandra and HBase are optimized for queries over large datasets, and store columns of data together, instead of rows. Hadoop/ Hbase, Cassnadra, Level DB (from Google), BigTable

Why No SQL ?

  1. Large columns of structured, semi structured data and unstructured data
  2. Efficient scale out architecture
  3. Helps in agile development

Example of data in mysql

{

“_id” : { “$oid” : “536ce8d1c25cf6e89fa7deeb”} ,

“name” : “USA” ,

“type” : “country” ,

“count” : “1” ,

“states” : { “1” : “MA” , “2” : “TX” , “3” : “CA”}

}

No SQL vs SQL

Some major differences between two

SQL Databases No SQL Database
Example Oracle , mysql Mondo DB, CouchDB, Neo4J
Storage Model Rows and tables Key-value. Data stored as single  document in JSON, XML
Schemas Static Dynamic
Scaling Vertical & Horizontal Horizontal
Transactions Yes Certain levels
Data Manipulation Select, Insert , Update Through Object Oriented API’s

Slide presentation at slideshare

Helpful Links

http://nosql-database.org/

http://www.mongodb.com/nosql-explained

http://couchdb.apache.org/

http://www.javacodegeeks.com/2013/03/a-3-step-guide-to-getting-started-with-nosql.html

Categories: Programming / tutorials Tags: