relational database vs nosql code example

Example 1: difference between nosql and sql

SQL						|    NoSQL
  relational			| non-relational
  						|
use structured query	| NoSQL databases have 
language and have a		| dynamic schemas for 
predefined schema.		| unstructured data.
						|
are vertically scalable | are horizontally scalable.
are table based			| are document, key-value,
						| graph or wide-column stores.
                        |
are better for multi-row| are better for unstructured 
transactions			| data like documents or JSON.

Example 2: relational database vs non relational

Relational Database =
-Tables are structured related to each other
-Each specific type of domain data is strored
 it's own table

Non-Relational Database =
-There is no relation at all between tables
-Mostly key+value pair : like jSon

Example 3: nosql vs sql

A SQL Database follows a table like structure which can have an 
unlimited number of rows and every data present inside the database 
is properly structured with Predefined Schemas, it is basically used 
to manipulate Relational Databases Management Systems.

A NoSQL Database is a Distributed Database where the data is very 
unstructured with Dynamic Schema. Unlike SQL it cannot have unlimited 
rows but it follows a Standard Schema Definition and can store all 
sorts of data models with large distributed data in the form of 
key-value pairs, graph databases, documents or wide-column stores.

Example 4: sql vs nosql

/* KEY DIFFERENCE
SQL pronounced as "S-Q-L" or as "See-Quel" is primarily called RDBMS or Relational Databases whereas NoSQL is a Non-relational or Distributed Database.
SQL databases are table based databases whereas NoSQL databases can be document based, key-value pairs, graph databases.
SQL databases are vertically scalable while NoSQL databases are horizontally scalable.
SQL databases have a predefined schema whereas NoSQL databases use dynamic schema for unstructured data.
SQL requires specialized DB hardware for better performance while NoSQL uses commodity hardware.*/

Example 5: sql vs nosql

-----------------
key differences |
-----------------
SQL databases are usually RDBMS or DBMS
(Relational DataBase Management Systems) and are table based,
NoSQL uses unstructured data (like graphs)

-----------------
Examples        |
-----------------
SQL Databases:
MySQL
SQLite
Oracle DB

NoSQL:
MongoDB
DynamoDB

Tags:

Sql Example