Monday Technology Series

SQL vs. NoSQL Simplified

Definition

SQL Databases – These are relational databases.

NoSQL Databases – These are non-relational or distributed databases.


Data Storage Types

SQL Databases – Single way to store data.

NoSQL Databases – Multiple ways to store data – key-value stores, document stores, wide-column stores, graph stores.


Data storage models

SQL Databases – Data is stored in a table where individual records are stored in rows with each column storing a specific piece of data about that record.

NoSQL Databases – A key-value database stores data similar to an SQL database but has only two columns (key and value).

Document databases have no row-column structure. They store all the data in a single ‘document’ which can be in JSON, XML or any other format.


Schemas

SQL Databases – Data types and the structure of data is fixed and pre-defined. The data inserted must adhere to that structure. To enter any new field to the schema or to modify the table structure, the entire table or database must be altered.

NoSQL Databases – These are more flexible and dynamic. New fields can be added on the fly and it can store structured as well as unstructured data.


Data Manipulation

SQL Databases – Uses SQL (Structured query language) which supports select, insert and update queries.

NoSQL Databases – Through object-oriented APIs.


Scaling

SQL Databases – These can scale vertically. A single server supports an entire database and should be powerful enough to manage all the data and heavy transactions.

NoSQL Databases – These scale horizontally among multiple servers. New commodity servers can be added easily in its distributed setup to increase capacity. Data is spread across the servers.


Examples

SQL Databases – MySQL, Oracle,Postgres, Microsoft SQL Server

NoSQL Databases – MongoDB, HBase, Casandra, DynamoDB, Neo4j, CouchDB


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 )

Facebook photo

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

Connecting to %s