Sunday 5 June 2016

Introduction to NoSQL world

Before start discussing about MongoDB, first let's see what are all the things we know so far about database.

Database categories:



Fig : Database categories

The very first block is about traditional RDBMS system (Oracle, MYSQL, MS SQL and DB2). As we know that, we have been using these traditional systems through out these years for OLTP (On-Line Transaction Processing) kind of things, like Retail Applications, Banking Applications etc. Below figure shows the same.


Fig : OLTP Database


The second block says about OLAP (On-Line Analytical Processing), nothing but Data Warehouse. DW is the main core of the Business Intelligence environment. It is mainly for offline data processing. Here we run lot for queries/aggregation queries to come-up with analytical results which can drive our business further.


Fig : OLAP with ETL tools


And finally the last thing which came into picture recently, it's a kind of boom in the software industry, called as NoSQL/New SQL/BigData. NoSQL databases have become alternative to traditioanl RDBMS systems. There are over 200 NoSQL databases are available as of now. Some of the popular NoSQL databases are MongoDB/HBase/Cassandra/counchDB. There are broadly 4 categories of NoSQL databases are vailable. Just FYI, 'MongoDB and CouchDB' comes under "Document based store" and 'Cassandra and HBase' comes under "Column based store". Let's discuss in detail about NoSQL DB categories bit later in this post.


Fig : NoSQL databases

With the help of NoSQL databases it is possible to connect traditional RDBMS systems and OLAP systems also. The above figure says the same.

Why NoSQL :

We don't have any problem with traditional RDBMS systems to store the upto Giga (10^9) byte level. We are kind of okay to store up to Tera(10^12) byte level. But, the main problem comes when we try to process the data. We can't the read the data from traditional RDBMS system in an efficient manner (with high velocity and different kind of data). If we simply store the data means that there is no value out of it.

 In late 90's or early 2000, we have started seeing some of the applications gaining popularity, where we have minimal WRITE operations and READ operations are huge. Some of these applications are wikipedia, stackoverflow, LinkedIn etc.

From the above figure it is clear that we are getting more and more unstructured data starting from the year 2006. As we said already traditional systems can't read the large amount data in an efficient manner. One bottle-neck for traditional systems is system I/O. Even though we are using high-end configuration processor and memory, the system I/O is limited.

Vertical and Horizontal scaling : 

The process of improving system hardware is called scaling-up (or) vertical scaling. There are some of limitations of vertical scaling. First one is, we can't bear the cost, since we are using high-end configuration processor and memory. And the second one is, even though we are using high-end configuration machine, the system I/O is limited.

Alternatively, can we try to use low-end configuration (commodity) machines in parallel to improve system I/O?..The answer is YES, we can do that. This mechanism is called Horizontal scaling or scaling-out.

Fig : Distributed architecture

First let's see how much amount of time will take to read 1TB of data. Consider the left side one from the above figure, where we have only one machine with 4 I/O channels and each channel capacity with 100 MBPS. Now, let's calculate how much time it will take to read 1TB of data. It will approximately take 44 minutes ((1024*1024)/(4*100*60)) to read the data. If we use 10 machines in-parallel with the same configuration, then it will take only 4.4 minutes to read 1TB of data. This is the main advantage of distributed architecture. There several dis-advantages we have in distributed architecture. Some of them are, point of failure, network latency etc.

What is NoSQL ?

  • Next generation database
  • Not Only SQL (NoSQL)
  • Non-Relational
  • Distributed architecture
  • Open source
  • Horizontal scaling
  • Flexible/Dynamic schema
  • easy replication
  • Simple APIs
  • Commodity hardware is enough
  • Manage huge amount of data

Benefits of NoSQL :

We mostly use traditional RDBMS to store structured data, of course, we can store images, pdf using BLOB (Binary Large Objects), but that is not an efficient one. With the help of NoSQL, one can store structured, semi-structured and un-structured data in an efficient manner. 

Categories of NoSQL DB :

There are broadly 4 types of NoSQL databases available :

  1. Key-Value store : It has a Big hash table for keys & values. (Eg : Memchached and Dynamo)
  2. Document base store : Document base store is something where mongodb falls. It stores documents made up of tagged elements. (Eg : MongoDB and CouchDB)
  3. Column base store : Each storage block contains data from only one column. (Eg : HBase and Cassandra)
  4. Graph base store : A network database that uses edges and nodes to represent and store the data. (Eg : Neo4J and HyperGraphDB)


Fig : Types of NoSQL databases



** Next Post : "ACID and CAP"












11 comments:

  1. Valuable post useful for everyone.Keep on sharing.
    Mern Stack Online Training

    ReplyDelete
  2. Nice article I was really impressed by seeing this blog, it was very interesting and it is very useful for me.Informative blog! it was very useful for me.Thanks for sharing
    Mongodb Development Company

    ReplyDelete
  3. Hello, Such a nice article. Great Share. Also, if You Are Looking for similar article then visit our website, We are technology/news/smartphone company, If you want to read such useful news then, Visit us: https://techmie.com/

    ReplyDelete
  4. Thank you for sharing this amazing information. Looking forward to read more.
    Best Web Development Company

    ReplyDelete
  5. If you are Looking for the best mern stack development? Then must visit arka softwares. We are one of the leading IT companies in the USA, UK, Australia, and India.

    ReplyDelete
  6. This was an authentic and useful piece of information. Thank you for giving this useful content.
    Ethical Hacking Training in Chennai
    Hacking Course Online
    Ethical Hacking Course in Coimbatore

    ReplyDelete
  7. Thanks for sharing this informative article on Introduction to NoSQL world. If you want to hire mean stack developers for your project. Please visit us.

    ReplyDelete
  8. In today’s fast-paced tech world, the demand for skilled full-stack developers is rising. If you’re looking to boost your career in web development, enrolling in a MEAN Stack course is an excellent decision. APTRON Gurgaon, a leading training institute, offers a comprehensive Mean Stack Course in Gurgaon designed to equip students with the knowledge and hands-on skills required to excel in full-stack development.

    ReplyDelete