SlideShare a Scribd company logo
SQL VS NOSQL
OUTLINE
• DBMS
• RDMBS
• Difference: SQL and NoSQL
• Application
• Conclusion
DBMS
databas
e
DBMS
App
User
Ap
p
API
WHAT IS A DATABASE?
A database is a set of data stored in a computer. This data is usually structured
in a way that makes the data easily accessible, and organizes the data in the
form of tables, views, schemas, reports etc.
Database Management System: The software which is used to manage
database is called Database Management System (DBMS) For Example,
MySQL, Oracle etc.
WHAT IS A RDBMS?
A relational database management system (RDBMS) is a program that allows
you to create, update, and administer a relational database. Most relational
database management systems use the SQL language to access the
database.
A relational database is a type of database. It uses a structure that allows us to
identify and access data in relation to another piece of data in the database.
Often, data in a relational database is organized into tables.
WHAT IS A RELATIONAL DATABASE?
DBMS
Technology
SQL NoSQL
SQL AND NOSQL
• Structured Query Language (SQL)
• More rigid and structured way of storing data
• Consists of two or more tables with columns and rows
• Relationship between tables and field types is called a schema
• A well-designed schema minimizes data redundancy and prevents tables from
becoming out-of-sync
• fit naturally into many venerable software stacks, including LAMP and Ruby-
based stacks
CREATE: to create a database and its objects like (table, index, views, store
procedure, function, and triggers)
ALTER: alters the structure of the existing database
DROP: delete objects from the database
TRUNCATE: remove all records from a table, including all spaces allocated for
the records are removed
COMMENT: add comments to the data dictionary
RENAME: rename an object.
DDL: is short name of Data Definition Language, which deals with database
schemas and descriptions, of how the data should reside in the database.
Example: CREATE, ALTER,DROP, TRUNCATE, COMMENT, RENAME etc.
DML is short name of Data Manipulation Language which deals with data
manipulation and includes most common SQL statements such SELECT,
INSERT, UPDATE, DELETE, etc., and it is used to store, modify, retrieve,
delete and update data in a database.
SELECT: retrieve data from a database
INSERT: insert data into a table
UPDATE: updates existing data within a table
DELETE: Delete all records from a database table
MERGE: UPSERT operation (insert or update)
EXPLAIN PLAN: interpretation of the data access path
LOCK TABLE: concurrency Control
Relational Model
• MySQL
• Oracle
• IMB DB2
• MS SQL Server
• PostgreSQL
• Sybase
• Microsoft Azure
• Not only SQL
• Greater flexibility than their traditional
counterparts
• Unstructured data from the web
• NoSQL databases are document-oriented
• Ease of access
• Key-value model Column store
• Document database Graph database
• MongoDB
• Apache’s CouchDB
• Apache’s Cassandra DB
• HBase
• Oracle NoSQL
SQL NOSQL
• RELATIONAL DATABASE
MANAGEMENT SYSTEM (RDBMS).
• These databases have fixed or static
or predefined schema.
• These databases are not suited for
hierarchical data storage.
• Non-relational or distributed
database system.
• They have dynamic schema.
• These databases are best suited for
hierarchical data storage.
Sql vs no sql
DATABASE SCHEMA
• A database schema is the skeleton structure that represents the logical
view of the entire database. It defines how the data is organized and how
the relations among them are associated. It formulates all the constraints
that are to be applied on the data.
• A database schema defines its entities and the relationship among them.
It contains a descriptive detail of the database, which can be depicted by
means of schema diagrams. It’s the database designers who design the
schema to help programmers understand the database and make it
useful.
Sql vs no sql
A database schema can be divided broadly into two categories −
•Physical Database Schema − This schema pertains to the actual
storage of data and its form of storage like files, indices, etc. It defines
how the data will be stored in a secondary storage.
•Logical Database Schema − This schema defines all the logical
constraints that need to be applied on the data stored. It defines tables,
views, and integrity constraints.
SQL NoSQL
• Ensure ACID compliancy
• Data is structured and
unchanging.
• Do not make the most of cloud
computing and storage
• SQL databases are best suited
for complex queries.
• Do not comply
• Data is un-structured and
changing
• Make the most of cloud
computing and storage
• NoSQL databases are not so
good for complex queries
because these are not as
powerful as SQL queries.
ACID
Atomicity: All changes to data are performed as if they are a single
operation. That is, all the changes are performed, or none of them are.
For example, in an application that transfers funds from one account to
another, the atomicity property ensures that, if a debit is made
successfully from one account, the corresponding credit is made to the
other account.
Consistency: Data is in a consistent state when a transaction starts
and when it ends.
For example, in an application that transfers funds from one account to
another, the consistency property ensures that the total value of funds
in both the accounts is the same at the start and end of each
transaction.
Isolation: The intermediate state of a transaction is invisible to other
transactions. As a result, transactions that run concurrently appear to be
For example, in an application that transfers funds from one account to another,
the isolation property ensures that another transaction sees the transferred funds
in one account or the other, but not in both, nor in neither.
Durability: After a transaction successfully completes, changes to data persist
and are not undone, even in the event of a system failure.
For example, in an application that transfers funds from one account to another,
the durability property ensures that the changes made to each account will not
reversed.
Application of SQL and NoSQL
• SQL Application:
Data need to be structured as in Bank database, University
Database, Company’s database, etc.
• NoSQL Application:
Lots of unstructured data as in Social blogs like WordPress,
Facebook, twitter, Instagram, etc.
Store Procedures
In a DBMS, a stored procedure is a set of SQL statements with an
assigned name that's stored in the database in compiled form so that it
can be shared by a number of programs. for simple, Stored
Procedure are Stored Programs, A
program/function stored into databaseCREATE PROCEDURE <owner>.<procedure
name>
<Param> <datatype>
AS
<Body>
A benefit of stored procedures is that you can centralize data access
logic into a single place that is then easy for DBA's to optimize. Stored
procedures also have a security benefit in that you can grant execute
rights to a stored procedure but the user will not need to have read/write
permissions on the underlying tables. This is a good first step against
SQL injection.
Sql vs no sql

More Related Content

PPTX
DOC
DBMS Practical File
PDF
CBSE XII Database Concepts And MySQL Presentation
PDF
Rdbms Practical file diploma
PPTX
Introduction to oracle database (basic concepts)
PPT
Creating database
PPTX
Data base management system and Architecture ppt.
PDF
Database Management System
DBMS Practical File
CBSE XII Database Concepts And MySQL Presentation
Rdbms Practical file diploma
Introduction to oracle database (basic concepts)
Creating database
Data base management system and Architecture ppt.
Database Management System

What's hot (20)

PPTX
Database management system
PDF
MS-SQL SERVER ARCHITECTURE
PPT
Mba it unit 3 ppt
PPS
Database system-DBMS
PPT
Database management system1
PPTX
Introduction to database with ms access.hetvii
PPTX
Sql server basics
PPTX
Database management system
PPTX
Importance of database design (1)
PPTX
Database basics
PPTX
MDF and LDF in SQL Server
PPT
Database concepts and Archeticture Ch2 with in class Activities
DOCX
Database Management Lab -SQL Queries
PPTX
Database Basics
PPTX
data base management system (DBMS)
PPTX
PDF
PPTX
Introduction to Oracle Database
PPTX
Database systems - Chapter 2
PDF
Data base management systems ppt
Database management system
MS-SQL SERVER ARCHITECTURE
Mba it unit 3 ppt
Database system-DBMS
Database management system1
Introduction to database with ms access.hetvii
Sql server basics
Database management system
Importance of database design (1)
Database basics
MDF and LDF in SQL Server
Database concepts and Archeticture Ch2 with in class Activities
Database Management Lab -SQL Queries
Database Basics
data base management system (DBMS)
Introduction to Oracle Database
Database systems - Chapter 2
Data base management systems ppt
Ad

Similar to Sql vs no sql (20)

PPTX
DATABASE MANAGEMENT SYSTEM-MRS. LAXMI B PANDYA FOR 25TH AUGUST,2022.pptx
PDF
B.Vinithamani,II-M.sc.,Computer science,Bon Secours college for women,thanjavur.
PPTX
Database System
PPT
Introduction to Data Management
PPTX
Ch 2-introduction to dbms
PPTX
RDBMS
PPTX
Data Manipulation ppt. for BSIT students
PPTX
data base programming chapter1 26 slides
PPTX
SQL things ace series of the thing useful
PDF
NoSQL-Database-Concepts
PPTX
DATABASE MANAGEMENT SYSTEM,DATA DEFINITION LANGUAGE
PPTX
Database Design can be defined as a set of procedures or collection of tasks ...
PPTX
✅ Session 1 - "Introduction to MySQL and Databases"
PPTX
introductiontodatabaseDATABASE MANA .pptx
PPT
DBMS Full.ppt
PPTX
Basic of Database Management System(DBMS)
PPTX
Ch-11 Relational Databases.pptx
PPTX
Presentation DBMS (1)
PPTX
Complete first chapter rdbm 17332
DATABASE MANAGEMENT SYSTEM-MRS. LAXMI B PANDYA FOR 25TH AUGUST,2022.pptx
B.Vinithamani,II-M.sc.,Computer science,Bon Secours college for women,thanjavur.
Database System
Introduction to Data Management
Ch 2-introduction to dbms
RDBMS
Data Manipulation ppt. for BSIT students
data base programming chapter1 26 slides
SQL things ace series of the thing useful
NoSQL-Database-Concepts
DATABASE MANAGEMENT SYSTEM,DATA DEFINITION LANGUAGE
Database Design can be defined as a set of procedures or collection of tasks ...
✅ Session 1 - "Introduction to MySQL and Databases"
introductiontodatabaseDATABASE MANA .pptx
DBMS Full.ppt
Basic of Database Management System(DBMS)
Ch-11 Relational Databases.pptx
Presentation DBMS (1)
Complete first chapter rdbm 17332
Ad

Recently uploaded (20)

PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Cloud computing and distributed systems.
PDF
Machine learning based COVID-19 study performance prediction
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Electronic commerce courselecture one. Pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Approach and Philosophy of On baking technology
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation theory and applications.pdf
MYSQL Presentation for SQL database connectivity
Cloud computing and distributed systems.
Machine learning based COVID-19 study performance prediction
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Electronic commerce courselecture one. Pdf
Chapter 3 Spatial Domain Image Processing.pdf
20250228 LYD VKU AI Blended-Learning.pptx
Reach Out and Touch Someone: Haptics and Empathic Computing
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Review of recent advances in non-invasive hemoglobin estimation
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Approach and Philosophy of On baking technology
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Dropbox Q2 2025 Financial Results & Investor Presentation
Big Data Technologies - Introduction.pptx
Encapsulation theory and applications.pdf

Sql vs no sql

  • 2. OUTLINE • DBMS • RDMBS • Difference: SQL and NoSQL • Application • Conclusion
  • 4. WHAT IS A DATABASE? A database is a set of data stored in a computer. This data is usually structured in a way that makes the data easily accessible, and organizes the data in the form of tables, views, schemas, reports etc. Database Management System: The software which is used to manage database is called Database Management System (DBMS) For Example, MySQL, Oracle etc.
  • 5. WHAT IS A RDBMS? A relational database management system (RDBMS) is a program that allows you to create, update, and administer a relational database. Most relational database management systems use the SQL language to access the database. A relational database is a type of database. It uses a structure that allows us to identify and access data in relation to another piece of data in the database. Often, data in a relational database is organized into tables. WHAT IS A RELATIONAL DATABASE?
  • 8. • Structured Query Language (SQL) • More rigid and structured way of storing data • Consists of two or more tables with columns and rows • Relationship between tables and field types is called a schema • A well-designed schema minimizes data redundancy and prevents tables from becoming out-of-sync • fit naturally into many venerable software stacks, including LAMP and Ruby- based stacks
  • 9. CREATE: to create a database and its objects like (table, index, views, store procedure, function, and triggers) ALTER: alters the structure of the existing database DROP: delete objects from the database TRUNCATE: remove all records from a table, including all spaces allocated for the records are removed COMMENT: add comments to the data dictionary RENAME: rename an object. DDL: is short name of Data Definition Language, which deals with database schemas and descriptions, of how the data should reside in the database. Example: CREATE, ALTER,DROP, TRUNCATE, COMMENT, RENAME etc.
  • 10. DML is short name of Data Manipulation Language which deals with data manipulation and includes most common SQL statements such SELECT, INSERT, UPDATE, DELETE, etc., and it is used to store, modify, retrieve, delete and update data in a database. SELECT: retrieve data from a database INSERT: insert data into a table UPDATE: updates existing data within a table DELETE: Delete all records from a database table MERGE: UPSERT operation (insert or update) EXPLAIN PLAN: interpretation of the data access path LOCK TABLE: concurrency Control
  • 12. • MySQL • Oracle • IMB DB2 • MS SQL Server • PostgreSQL • Sybase • Microsoft Azure
  • 13. • Not only SQL • Greater flexibility than their traditional counterparts • Unstructured data from the web • NoSQL databases are document-oriented • Ease of access
  • 14. • Key-value model Column store • Document database Graph database
  • 15. • MongoDB • Apache’s CouchDB • Apache’s Cassandra DB • HBase • Oracle NoSQL
  • 16. SQL NOSQL • RELATIONAL DATABASE MANAGEMENT SYSTEM (RDBMS). • These databases have fixed or static or predefined schema. • These databases are not suited for hierarchical data storage. • Non-relational or distributed database system. • They have dynamic schema. • These databases are best suited for hierarchical data storage.
  • 18. DATABASE SCHEMA • A database schema is the skeleton structure that represents the logical view of the entire database. It defines how the data is organized and how the relations among them are associated. It formulates all the constraints that are to be applied on the data. • A database schema defines its entities and the relationship among them. It contains a descriptive detail of the database, which can be depicted by means of schema diagrams. It’s the database designers who design the schema to help programmers understand the database and make it useful.
  • 20. A database schema can be divided broadly into two categories − •Physical Database Schema − This schema pertains to the actual storage of data and its form of storage like files, indices, etc. It defines how the data will be stored in a secondary storage. •Logical Database Schema − This schema defines all the logical constraints that need to be applied on the data stored. It defines tables, views, and integrity constraints.
  • 21. SQL NoSQL • Ensure ACID compliancy • Data is structured and unchanging. • Do not make the most of cloud computing and storage • SQL databases are best suited for complex queries. • Do not comply • Data is un-structured and changing • Make the most of cloud computing and storage • NoSQL databases are not so good for complex queries because these are not as powerful as SQL queries.
  • 22. ACID
  • 23. Atomicity: All changes to data are performed as if they are a single operation. That is, all the changes are performed, or none of them are. For example, in an application that transfers funds from one account to another, the atomicity property ensures that, if a debit is made successfully from one account, the corresponding credit is made to the other account. Consistency: Data is in a consistent state when a transaction starts and when it ends. For example, in an application that transfers funds from one account to another, the consistency property ensures that the total value of funds in both the accounts is the same at the start and end of each transaction.
  • 24. Isolation: The intermediate state of a transaction is invisible to other transactions. As a result, transactions that run concurrently appear to be For example, in an application that transfers funds from one account to another, the isolation property ensures that another transaction sees the transferred funds in one account or the other, but not in both, nor in neither. Durability: After a transaction successfully completes, changes to data persist and are not undone, even in the event of a system failure. For example, in an application that transfers funds from one account to another, the durability property ensures that the changes made to each account will not reversed.
  • 25. Application of SQL and NoSQL • SQL Application: Data need to be structured as in Bank database, University Database, Company’s database, etc. • NoSQL Application: Lots of unstructured data as in Social blogs like WordPress, Facebook, twitter, Instagram, etc.
  • 27. In a DBMS, a stored procedure is a set of SQL statements with an assigned name that's stored in the database in compiled form so that it can be shared by a number of programs. for simple, Stored Procedure are Stored Programs, A program/function stored into databaseCREATE PROCEDURE <owner>.<procedure name> <Param> <datatype> AS <Body> A benefit of stored procedures is that you can centralize data access logic into a single place that is then easy for DBA's to optimize. Stored procedures also have a security benefit in that you can grant execute rights to a stored procedure but the user will not need to have read/write permissions on the underlying tables. This is a good first step against SQL injection.