Skip to main content

A head start for working with NoSQL

What is this 'NoSQL'? If you already have heard of NoSQL, then you'll probably might have heard of MongoDB as well. Why is that? Because these two terms are kind of interrelated with each other, as MongoDB is the most widely used application of the NoSQL technology. But, before peeping our heads into MongoDB, lets have a look at what NoSQL is. 

To understand about NoSQL, we should have at least a basic understanding about SQL. SQL stands for Structured Query Language. If you ever had worked with databases ,specifically relational databases , then you might already have had hands on experience in SQL. A relational database is a data store where data is organized into relations or tables. Basically SQL is used to manage and query data from relational databases. 

As the name itself suggest NoSQL , means 'non SQL' or 'non relational'. A NoSQL database allows us to store and retrieve data from a data store which is modeled in means other than the tabular representation used in relational databases. NoSQL became increasingly popular in the early 21st century , with its use in popular companies like Facebook, Google and Amazon.com . NoSQL databases were mainly developed to overcome the clustering/horizontal scaling problem encountered  by relational databases. Several other properties of NoSQL databases contributed to its popularity and wide usage:
  1. Schema free
  2. Distributed
  3. Easy replication
  4. Simple
  5. Finer control over availability
  6. Open source
Some of the above mentioned features are very useful in some applications, while at the same time it might be a disadvantage in certain applications. For an example, being schema free makes NoSQL databases simple and easy to use, however at sometimes this might cause issues in consistency and integrity of data. 

It's a widely known fact that NoSQL databases are "eventually consistent". What does the adjective "eventually" imply? The actual meaning of the phrase "eventually consistent" means that these databases are consistent typically within milliseconds, which means that there is a very small chance that a read from the database might return inaccurate updates. Actually many NoSQL databases compromise consistency in favor of  availability, partition tolerance and speed. 

A major disadvantage of NoSQL is that it does not support ACID (Atomicity, Consistency, Isolation, Durability) transactions. Despite all the advantages of NoSQL databases ,the banking domain is still reluctant to use these databases for this reason. But, currently developers are working on improving the ability of NoSQL databases to support transactions, therefor soon this won't be a problem for NoSQL.

Now let's have a quick look at the main categories of NoSQL databases along with examples :
  • Key-Value                                                                                                                                   ex: Redis, Riak, Memcached 
  • Document                                                                                                                                    ex: MongoDB
  • Column-family                                                                                                                                ex : Cassandra
  • Graph                                                                                                                                             ex: Neo4j


I hope that the above information helped you to get a clear idea about NoSQL databases . As I mentioned in the introductory paragraph, MongoDB is the most widely used NoSQL DB. So its useful to know how to work with MongoDB . In my next post I'll meet you all with how get hands on experience in working with MongoDB.

Comments

Popular posts from this blog

How to get started with MongoDB

In my last post I gave you all a brief introduction about NoSQL databases and its uses. As I mentioned in my last post , in this blogpost I'll give you all an overview of MongoDB and how to get started using MongoDB. Basically MongoDB is a document-oriented, NoSQL database and it can be rated as the most popular and widely used NoSQL database. MongoDB is free and open source , therefore anyone can simply download it from their site and start using it in their applications. It stores data as JSON(JavaScript Object Notation) like documents with schemas. In fact, data is actually stored in MongoDB as BSON objects. BSON is very much similar to JSON except that it is the binary representation of JSON. Unlike JSON, BSON is optimized for performance and navigational abilities. Typically data will be stored in the format shown on the following picture.  Key features that had contributed to the huge popularity of MongoDB are as follows: Support Ad hoc queries together JavaScript ...

A comparison between Node and Express

If you are programmer who have worked a long time with JavaScript you might know that , earlier JavaScript was just a scripting language used in the client side. However now the story is different. With many libraries like Node js and Express js being added to the JavaScript family JavaScript have evolved beyond, just being a scripting language in the client side. With these new libraries being added, now it is possible to build entire sites on JavaScript, extending it from front to back-end seamlessly. So what is Node and Express? Let's  clear this out step by step! What is Node js? Node js is an open source JavaScript runtime environment that executes JavaScript code server side. Node enables developers to use JavaScript for server side scripting. Node uses an event driven, non-blocking I/O model that makes it light weight and efficient. Because of this model Node js is particularly useful in web application that have many input/output operations and for real time web appli...

Difference between callback functions and promises in javascript

If you have ever worked with JavaScript you might have the experience that it is a quite confusing language to understand at first. This is because  in JavaScript there are many ways to do the same thing, and also unlike most other programming languages, if you do a small mistake in JavaScript instead of giving any errors, the program would behave in a totally different way than what you expect. Therefore, without understanding the basic concepts of JavaScript, it's quite difficult to work with it. In this post I'll be explaining about callback functions and promises, what they are used for and the difference between the two methods. Actually callback functions and promises are 2 different ways of doing the same thing. By default JavaScript is an asynchronous programming language. Which means that JavaScript does not execute instructions line after the other as in many programming languages. Whenever JavaScript come across an operation that takes relatively a long time, typic...