Вы находитесь на странице: 1из 15

SQL VS

NoSQL
What is
Database???

• Database is an organized collection of


information.

• Manages data efficiently and allows users to


perform multiple tasks with ease.

• Allow other software, or users, to store and


retrieve data in a structured way.
What is SQL???
 Structured Query Language

 It is the most commonly used relational


database language today.

 A tool to retrieve the required


information from database.

SQL Language statements

DDL DCL
DML TCL
CREATE ALTER GRAN BEGIN
INSERT DROP REVOKE TRAN
UPDATE COMMIT

Free presentation PowerPoint - SLIDESELLER.COM


Features of SQL
 A relational database is a set of tables containing data fitted
into predefined categories.
 Each table contains one or more data categories in column.
 Each row contains a unique instance of data for the
categories defined by the columns.

FACTORS

TYPE LANGUAGE SCALABILITY STRUCTURE PROPERTY


SQL EXAMPLE
MYSQL
 It is very popular open source database.
 MySQL is generally stacked with Apache, PHP and
nginx.

ADVANTAGES
Replication
 It reduces the work load and heavily increasing the
scalability and availability of business application.

Maturity
 This database has been around for a long time and
tremendous community input and testing has gone
into this database making it very stable.

Free presentation PowerPoint - SLIDESELLER.COM


What is
NoSQL???
 Not only SQL TYPES OF NoSQL
 NoSQL databases are especially useful for
working with large sets of distributed data.

 The basic quality of NoSQL is that it may


not require fixed table schemas, usually Column Key value XML/Object Graph
avoid join operations, and typically scale store store store store
horizontally.
Advantages of NoSQL

1 It process data faster than relational databases.

NoSQL databases are also often faster because their data


2 models are simpler.

Major NoSQL systems are flexible enough to better


3 enable developers to use the applications in ways that
meet their needs.
Why NoSQL???

In today’s time data is becoming easier to


access and capture through third parties such
as Facebook, Google+ and others.

Personal user information, social graphs, geo


location data, user- generated content and
machine logging data are just a few examples
where the data has been increasing
exponentially.

To avail the above service properly , it


is required to process huge.

Free presentation PowerPoint - SLIDESELLER.COM


MongoDB
 MongoDB is one of the most popular document based
NoSQL database as it stores data in JSON like
document
 It is non relational database with dynamic schema.

ADVANTAGES
NoSQL SPEED
Example  For simple queries, it gives good performance, as all the
related data are in single document which eliminates the
join operations.

SCALABILITY
We can reduce the workload by increasing the number of servers
in our resource pool.
Free presentation PowerPoint - SLIDESELLER.COM
Comparison between SQL and NoSQL
1. TYPE
 SQL databases are primarily called as
Relational Database (RDBMS); whereas
 NoSQL database are primarily called as non-
relational or distributed database.

SQL NoSQL
2. The Structure
 SQL databases are table- based on the other
hand NoSQL databases are either key value
pairs, document – based, graph databases or
wide- column stores.
Property
followed by SQL
and NoSQL
o SQL follow ACID properties which means atomicity,
consistency, Isolation and Durability.

o It is a concept that Database Professionals generally look


for when evaluating databases and application
architectures. For a reliable database all these four
attributes should be achieved

o NoSQL database follows the Brewers CAP theorem which


means consistency, Availability and Partition tolerance.

o In addition, the process of normalization is not mandatory


in NoSQL.

Free presentation PowerPoint - SLIDESELLER.COM


Format for SQL Table
• SQL databases provide a store of related data table.

• For example; if you run an online book store, book


information can be added to a table named book.

ISBN TITLE AUTHOR FORMAT PRICE

97809912435 JavaScript Darren Jones eBook 29.00

97809914537 Jump start Git Shaumik eBook 29.00


Daityari
Format for
NoSQL
 NoSQL databases store JSON- LIKE field value pair
documents.
м
 For example; if you want to store a book
information in NoSQL which are as follows

ISBN: 97809912435,

Title: “ JavaScript”,

Author: “Daren Jones”,

Format : “eBook”,

Price: 29.00

}
Quick comparison of
SQL and NoSQL
.

.
SQL NoSQL
To insert a new book record
db. book. Insert({
INSERT into book(‘ISBN’, ’title’, ‘author’)
ISBN: “9780990345”,
VALUES(‘ 9780990345’, ‘ Full Stack
title: “Full Stack JavaScript”,
JavaScript’, ‘ Colin Ihrig’);
author:” Colin Ihring”})
Update a book record
UPDATE book db. Book. update({
SET price = 19.99 ISBN: ‘9780990345’},
WHERE ISBN= ‘9780990345’ { $ set : { price:19.99}
});
Delete all site point books
DELETE FROM book WHERE db. book. Remove({
publisher_id= ‘SP001’; “Publisher. name”: “site point”});
QUICK
REVISION

Free presentation PowerPoint - SLIDESELLER.COM

Вам также может понравиться