Ushini Avindika
3 min readMar 5, 2021

SQL is a Structured Query Language for defining and manipulating data. It is used for storing and managing data in relational database management system(DBMS).NoSQL is known as non SQL or non relational database that provides a mechanism for storage and retrieval of data.

Differences between SQL vs NoSQL

  • SQL database is a Structured Query Language while NoSQL is an Unstructured Query Language.
  • SQL database are relational while NoSQL are non-relational.
  • SQL database have a pre-defined schema while NoSQL have dynamic schema.
  • SQL have a Table based database while NoSQL have a document based databases, key value stores, graph stores and wide column stores.
  • SQL is good for complex queries while NoSQL is not good for complex queries.
  • SQL databases are vertically scalable while NoSQL are horizontally scalable.
  • SQL databases have a specific language while NoSQL have no specific language.
  • SQL databases is not a good fit for hierarchical storage while NoSQL fits better for hierarchical storage

When to use SQL?

  • When we want to perform flexible queries
  • When we want to perform relational queries
  • When we want to enforce field constraints
  • When we want to use a well documented access language

When to use NoSQL?

  • When the access pattern is defined
  • when the primary key is known
  • when the data model fits(graphs)
  • When we need high performance and low latency (delay)

Advantages of SQL

  • High speed
  • No need of coding skills
  • Has a standardised language due to following ISI and ANSI standards which is approved across the globe
  • Use for analytical queries
  • Write intergration scripts
  • Helps to retrieve the subsets of information within a databases

Disadvantages of SQL

  • Process of interfacing is complex
  • Since SQL structure is complex it is difficult for certain users to access it
  • High cost
  • Has only a partial control because there are certain hidden rules and conditions therefore programmers don’t have the power over the database.

Advantages of NoSQL

  • It is non relational. They vary from SQL databases therefore they provide the ease of management while ensuring a high level of flexibility with data models which are new.
  • Low cost
  • Scalability is easier

Disadvantages of NoSQL

  • Community support is relatively less as its new.
  • It lacks a standardized platform like SQL which prevent it from further expanding.
  • Interfaces and interoperability is present therefore fixing immediately is needed.