0% found this document useful (0 votes)
10 views8 pages

SQL Vs Nosql

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
0% found this document useful (0 votes)
10 views8 pages

SQL Vs Nosql

Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
Download as pdf or txt
Download as pdf or txt
You are on page 1/ 8

SQL VS.

NoSQL
By: Maila Jerrielyn D. Caliao
What is a SQL database?
➢“Structured Query Language,” is the programming
language that’s been widely used in managing data
in relational database management systems
(RDBMS) since the 1970s.
➢In the early years, when storage was expensive, SQL
databases focused on reducing data duplication.
➢These relational databases, which offer fast data
storage and recovery, can handle great amounts of data
and complex SQL queries.
What is a NoSQL database?
➢NoSQL is a non-relational database, meaning it allows
different structures than a SQL database and more
flexibility to use a format that best fits the data.
➢The term “NoSQL” was not coined until the early
2000s. It doesn’t mean the systems don’t use SQL, as
NoSQL databases do sometimes support some SQL
commands.
➢More accurately, “NoSQL” is sometimes defined as
“not only SQL.”
SQL Databases NoSQL Databases
Document: JSON documents, Key-value: key-
Tables with fixed
Data Storage Model value pairs, Wide-column: tables with rows and
rows and columns
dynamic columns, Graph: nodes and edges
Developed in the
Developed in the late 2000s with a focus on
1970s with a focus
Development History scaling and allowing for rapid application change
on reducing data
driven by agile and DevOps practices.
duplication
Oracle, MySQL,
Document: MongoDB and CouchDB, Key-value:
Microsoft SQL
Examples Redis and DynamoDB, Wide-column: Cassandra
Server, and
and HBase, Graph: Neo4j and Amazon Neptune
PostgreSQL
Document: general purpose, Key-value: large
amounts of data with simple lookup queries,
Primary Purpose General purpose Wide-column: large amounts of data with
predictable query patterns, Graph: analyzing and
traversing relationships between connected data
Schemas Rigid Flexible
Vertical (scale-up
Horizontal (scale-out across commodity
Scaling with a larger
servers)
server)
Multi-Record
ACID (Atomicity, Most do not support multi-record ACID
Consistency, Isolation, and Supported transactions. However, some — like
Durability.) MongoDB — do.
Transactions
Typically
Joins Typically not required
required

Requires ORM Many do not require ORMs. MongoDB


Data to Object (object- documents map directly to data
RIGHT JOIN Syntax

SELECT column_name(s)
FROM table1
RIGHT JOIN table2
ON table1.column_name = table2.colu
mn_name;
LEFT JOIN SYNTAX
SELECT column_name(s)
FROM table1
LEFT JOIN table2
ON table1.column_name = table2.column_name
;
FULL OUTER JOIN SYNTAX

SELECT column_name(s)
FROM table1
FULL OUTER JOIN table2
ON table1.column_name = table2.column_name
WHERE condition;

You might also like