DEV Community

Cover image for First NoSQL For SQL Developers
Ravindra Shivdas
Ravindra Shivdas

Posted on

First NoSQL For SQL Developers

Overview

  • Understand what is SQL and NoSQL Databases are
  • High level difference between SQL and NoSQL Database

Introduction

As a developer of Microsoft Technologies, I am aware about what is SQL Database and how best it can be used in our applications to perform day to day operations on data e.g., store data in multiple tables which are linking through various keys. We can retrieve data from multiple tables and operate it using Stored Procedure, Triggers and Views.

One day during technical discussion, I heard about MongoDB from my colleague and he told me that MongoDB is NoSQL. After this, I started exploring about these two terminologies i.e. What is MongoDB and Why it is called NoSQL. So, if you are having similar question in your mind and wanted to know more about this, this could be good post for you.

Content

  • What is SQL Database
  • What is MongoDB
  • What is NoSQL Database
  • Difference between SQL and NoSQL Database
  • Limitations of NoSQL
  • When you will choose MongoDB NoSQL
  • Conclusion

What is SQL Database

SQL Database are relational, uses structured query language for our predefined schema. This is vertically scalable, uses tabular design to store data and supports ACID.

What is MongoDB

MongoDB is a source-available cross-platform document-oriented database program. Classified as a NoSQL database program, MongoDB uses JSON-like documents with optional schemas. MongoDB is developed by MongoDB Inc

What is NoSQL Database

NoSQL databases are non-tabular databases and non-relational in nature with its document-based design, data is stored as document. Generally used for storing big data. Horizontally scalable and it supports CAP.

Difference between SQL and NoSQL Database

Here is the basic difference for Concept or Terms

SQL-NoSQL-1

Limitations of NoSQL

In Relation Databases, e.g., Microsoft SQL Server, we do have a provision to write a Stored Procedure, Triggers and Views and supports for ACID properties. We can design our database up to micro level where we can store our application data in multiple tables with the help of Normalization.

On the other hand, MongoDB doesn’t support ACID properties and it’s not going to have Stored Procedure, Triggers, Views etc. Like SQL Server, MongoDB is not relational database, however, like relational database one to one, one to many etc can be represented by using different models. There are two different models. Embedded document model and Reference model.

When you will choose MongoDB NoSQL

As per the project requirement, if the data is not structured and doesn’t require to be ACID compliance then MongoDB would be a good choice. It provides high scalability and it will be faster as data stores in Key value format.

Conclusion

Follow a simple rule, if your data is structured and ACID compliance go for SQL. If your data is unstructured and doesn’t require ACID compliance then go for MongoDB.

Reference: https://www.mongodb.com/

Top comments (1)

Collapse
 
paresh4734 profile image
Paresh Awashank

Very useful information for those who are new to NoSQL database... thanks!