SQL or NoSQL?

What is SQL?

SQL, which stands for Structured Query Language is a method that is used to communicate with a database. Queries in SQL are used to perform tasks such as update data on a database, retrieve data or delete them.

RDBMS is considered to be the basis for SQL, and for all modern database systems such as MS SQL Server, Oracle, MySQL, and Microsoft Access. Here, every table is broken into smaller entities called fields. The database is most often contains one or more tables. Each table has many rows and each row can be identified using a unique key.

Pros

Cons

What is NoSQL?

NoSQL is a non relational, schema free, distributed database. This is horizontally scalable and serves easy replication so you can copy all or part of database and distribute it to one more servers.

NoSql renders eventual consistency. Eventual consistency means exactly that: the system is eventually consistent–if there are no updatesthat have been made to a given data item for a long enough period of time, sometime after hardware and network failures heal, then, eventually, all reads to that item will return the same consistent value.

NoSQL generally stands for “Not Only SQL” or “Non SQL” but it has not been provided a clear name.

Pros

Cons

When to use NoSQL?

  • To handle a huge volume of structured, semi-structured and unstructured data.
  • Where there is a need to follow modern software development practices like Agile Scrum and if it is needed to deliver prototypes or fast applications.
  • If it is preferred object-oriented programming.
  • If the relational database is not capable enough to scale up to your traffic at an acceptable costs
  • If it is needed to have an efficient, scale-out architecture in place of an expensive and monolithic architecture.
  • If there are local data transactions that need not be very durable.
  • If it is needed schema-less data and needs to be include new fields without any ceremony.
  • When the priority is easy scalability and availability.

Conclusion

Choosing a database needed for our work is upto our preferences and need. Although it has been used SQL in most of the primary instances, NoSql is now gaining more popularity and we can see the reasons from above mentioned topics.

--

--