DEV Community

Cover image for SQL vs NoSQL
Brittan Fairchild
Brittan Fairchild

Posted on

SQL vs NoSQL

As a recent convert to the tech field, I really only have had exposure to SQL, or Structured Query Language. SQL is a language used to communicate with a database through a variety of statements that are used to perform tasks such as retrieving, updating, and deleting data. As I began branching out from the languages that I have a firm grasp on, I was quick to encounter systems classified as NoSQL, or 'not only sql', such as MongoDB, CouchDB, and Cassandra. Being a forever student, i quickly dug into as many documents as I could to discover the difference between the SQL systems that I was familiar with and their NoSQL counterparts.

Firstly, knowing what a NoSQL database is would be important. A NoSQL database is an approach to database design that lends a more flexible schema for data storage and retrieval. NoSQL encompasses structured, semi-structured, unstructured, and polymorphic data and is designed to iterate more quickly though data, as it is not built upon the concept of tables and does not use SQL to manipulate data. Instead, NoSQL databases are either document based, key-value pairs, graph databases, or wide-column stories. These simpler designs means more scalability and ease when using larger sets of frequently evolving, disparate points of data. An example of such a data-set would be anything related to the ever shifting realm of economics.

So when should you use SQL, and when should you use NoSQL? SQL is the best fit for a complex, query intensive environment, as the queries in NoSQL are not as powerful as SQL query language. An unstructured, simpler database would be better if you need to store large amounts of unstructured data, when using cloud computing and storage, when a hybrid data environment makes more sense, and when you need to develop at a more rapid pace. When performance, availability, and scalability matter, it's best to work with NoSQL.

REFERENCES

https://www.couchbase.com/resources/why-nosql

https://www.ibm.com/cloud/learn/nosql-databases

https://www.thegeekstuff.com/2014/01/sql-vs-nosql-db/

Top comments (0)