SQL and NoSQL: Programmer’s Note

        Structured Query Language and NoSQL or in another way they can be called as Relational Database and Non-relational Database. Both does the same, store data. The difference between these two main type of databases are determined according to how they are built, the type of information they store, and how they store it. While both types are viable options it’s important to know the differences, so you’d know which one suits better when you get your hands on creating a database.

Here is a little post I found on Stackoverflow that might interest you,

SQL databases are like automatic transmission and NoSQL databases are like manual transmission. Once you switch to NoSQL, you become responsible for a lot of work that the system takes care of automatically in a relational database system. Similar to what happens when you pick manual over automatic transmission. Secondly, NoSQL allows you to eke more performance out of the system by eliminating a lot of integrity checks done by relational databases from the database tier. Again, this is similar to how you can get more performance out of your car by driving a manual transmission versus an automatic transmission vehicle.

                                                                                                          – Dare Obasanjo

        SQL store data like a phone book (form of tables) that stores addresses and numbers while NoSQL stores data like a document folder which will hold information that’s required. MySQL, Oracle, Postgres and MariaDB are some popular SQL databases and MongoDB, Oracle NoSQL, Apache’s CouchDB and Redis are few popular NoSQL databases out there. The question is which database you should use with your project? like Dare  Obasanjo’s explanation both got the recipe to  make unique databases which will archive the same object with its distinctive ingredients.

Reasons to use SQL database.

  • Emphasizes on ACID compliance (Atomicity, Consistency, Isolation, Durability) which will reduce anomalies and will protect integrity of the database.
  • Good fit for the complex query intensive environment .
  • Tools come with better support, product suites and add-ons to manage these databases. NoSQL lacks reporting tools.

Reasons to use NoSQL database.

  • Designed to be seamless, fast and cost effective.
  • Ability to handle large traffic easily by adding few more servers. (High scalability)
  • Database fits better for the hierarchical data storage.
  • Ability to store huge amounts of data with little to no structure.

        While SQL is a strong choice for any business database NoSQL database is getting widely adopted to solve various business problems nowadays but NoSQL comes with a price. At the end of the day it will be up to the database designer to dictate the choice by analyzing the needs of the system and plan of growth.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s