SlideShare a Scribd company logo
Prashant Gupta
Introduction to NoSQL
 What is NoSQL?
 It’s a whole new way of thinking about a database and encompasses a wide variety of
different database technologies.
 A non-relational and largely distributed database system that enables rapid and analysis
of extremely high-volume, disparate (different) data types.
 Why NoSQL?
 The Benefits of NoSQL : A very flexible and schema-less data model, horizontal
scalability, distributed architectures.
• Dynamic Schemas
• Auto-sharding
• Replication
• Integrated Caching
 Document databases pair each key with a complex data structure
known as a document. Documents can contain many different key-value pairs,
or key-array pairs, or even nested documents.
 Graph stores are used to store information about networks, such as
social connections. Graph stores include Neo4J and HyperGraphDB.
 Key-value stores are the simplest NoSQL databases. Every single
item in the database is stored as an attribute name (or "key"), together with
its value. Examples of key-value stores are Riak and Voldemort. Some key-
value stores, such as Redis, allow each value to have a type, such as "integer",
which adds functionality.
 Wide-column stores such as Cassandra and HBase are optimized
for queries over large datasets, and store columns of data together, instead of
rows
SQL Database NoSQL Database
Types One type (SQL database) with
minor variations
Many different types including
key-value stores, document
databases, wide-column stores,
and graph databases
Development History Developed in 1970s to deal
with first wave of data storage
applications.
Developed in 2000s to deal with
limitations of SQL databases,
particularly concerning scale,
replication and unstructured
data storage.
Examples MySQL, Postgres, Oracle
Database
MongoDB, Cassandra, HBase,
Neo4j ,Riak, Voldemort,
CouchDB ,DynamoDB
Schemas Structure and data types are
fixed in advance.
Typically dynamic. Records can
add new information on the fly,
and unlike SQL table
Scaling Vertically Horizontally
Data Manipulation Specific language using Select,
Insert, and Update statements,
e.g. SELECT fields FROM table
WHERE…
Through object-oriented APIs
 Relational and NoSQL data models are very different. The relational model takes data
and separates it into many interrelated tables that contain rows and columns. Tables
reference each other through foreign keys that are stored in columns as well.
 NoSQL databases have a very different model. For example, a document-oriented NoSQL
database takes the data you want to store and aggregates it into documents using the
JSON format.
 History:
Development of MongoDB began in October 2007 by 10gen.
The first public release was in February 2009.
 What is MongoDB
 MongoDB is an open-source document database that provides
• High performance
• High availability
• Automatic scaling and sharding
 MongoDb is a Open Source database written in C++.
 Drivers and client libraries are typically written in their respective languages, although
some drivers use C extensions for better performance.
 MongoDB does not support SQL It supports a rich, ad-hoc query language of its own.
 MongoDb stores data as documents. So it is a document oriented database.
 Document Database
 A record in MongoDB is a document, which is a data structure composed of field and
value pairs. MongoDB documents are similar to JSON objects. The values of fields may
include other documents, arrays, and arrays of documents.
 Licensing and support
MongoDB is available for free under the GNU Affero General Public License.
 he language drivers are available under an Apache License. In addition, MongoDB Inc.
offers commercial licenses for MongoDB.
 Installation :
To install the MongoDB on windows or Linux , first download the latest release of
MongoDB from
 http://www.mongodb.org/downloads
 Create Database
 MongoDB use DATABASE_NAME is used to create database. The command
will create a new database, if it doesn't exist otherwise it will return the
existing database.
 To check your currently selected database use the command- db
 If you want to check your databases list, then use the command- show dbs.
 MongoDB db.dropDatabase() command is used to drop a existing database.
 Create Collection
 MongoDB db.createCollection(name, options) is used to create collection.
 In the command, name is name of collection to be created. Options is a
document and used to specify configuration of collection
 INSERT & FIND OPERATION
To insert data into MongoDB collection, you need to use MongoDB's insert() method.
 Syntex :
db.COLLECTION_NAME.insert(document)
 $set operator to insert or update the document

Syntex :
db.COLLECTION_NAME.update(SELECTIOIN_CRITERIA,
UPDATED_DATA)
 db.mycol.update({'title':'MongoDB Overview'},{$set:{'title':'New
MongoDB Tutorial'}
db.mycol.update({'title':'MongoDB Overview'},{$set:{'title':'New
MongoDB Tutorial'}},{multi:true})
 The remove() Method
 MongoDB's remove() method is used to remove document from the
collection. remove() method accepts two parameters. One is deletion
criteria and second is justOne flag
 Syntex:
 db.COLLECTION_NAME.remove(DELLETION_CRITTERIA)
 db.mycol.remove({'title':'MongoDB Overview'})
Mongodb - NoSql Database

More Related Content

What's hot

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
NodeXperts
 
Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB
Habilelabs
 
NOSQL and MongoDB Database
NOSQL and MongoDB DatabaseNOSQL and MongoDB Database
NOSQL and MongoDB Database
Tariqul islam
 
MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentation
Hyphen Call
 
NOSQL vs SQL
NOSQL vs SQLNOSQL vs SQL
NOSQL vs SQL
Mohammed Fazuluddin
 
Mongo DB
Mongo DB Mongo DB
Introduction to NOSQL databases
Introduction to NOSQL databasesIntroduction to NOSQL databases
Introduction to NOSQL databases
Ashwani Kumar
 
Non Relational Databases
Non Relational DatabasesNon Relational Databases
Non Relational Databases
Chris Baglieri
 
Non relational databases-no sql
Non relational databases-no sqlNon relational databases-no sql
Non relational databases-no sql
Ram kumar
 
An introduction to MongoDB
An introduction to MongoDBAn introduction to MongoDB
An introduction to MongoDB
César Trigo
 
NoSQL
NoSQLNoSQL
NoSQL
Radu Potop
 
Mongo Nosql CRUD Operations
Mongo Nosql CRUD OperationsMongo Nosql CRUD Operations
Mongo Nosql CRUD Operations
anujaggarwal49
 
Mongo db dhruba
Mongo db dhrubaMongo db dhruba
Mongo db dhruba
Dhrubaji Mandal ♛
 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQL
Ramakant Soni
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
Dineesha Suraweera
 
MongoDB
MongoDBMongoDB
Nosql data models
Nosql data modelsNosql data models
Nosql data models
Viet-Trung TRAN
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL DatabasesDerek Stainer
 

What's hot (20)

Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Basics of MongoDB
Basics of MongoDB Basics of MongoDB
Basics of MongoDB
 
NOSQL and MongoDB Database
NOSQL and MongoDB DatabaseNOSQL and MongoDB Database
NOSQL and MongoDB Database
 
MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentation
 
NOSQL vs SQL
NOSQL vs SQLNOSQL vs SQL
NOSQL vs SQL
 
Mongo DB
Mongo DB Mongo DB
Mongo DB
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
Introduction to NOSQL databases
Introduction to NOSQL databasesIntroduction to NOSQL databases
Introduction to NOSQL databases
 
Non Relational Databases
Non Relational DatabasesNon Relational Databases
Non Relational Databases
 
Non relational databases-no sql
Non relational databases-no sqlNon relational databases-no sql
Non relational databases-no sql
 
An introduction to MongoDB
An introduction to MongoDBAn introduction to MongoDB
An introduction to MongoDB
 
NoSQL
NoSQLNoSQL
NoSQL
 
Mongo Nosql CRUD Operations
Mongo Nosql CRUD OperationsMongo Nosql CRUD Operations
Mongo Nosql CRUD Operations
 
Mongo db dhruba
Mongo db dhrubaMongo db dhruba
Mongo db dhruba
 
NOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQLNOSQL- Presentation on NoSQL
NOSQL- Presentation on NoSQL
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
MongoDB
MongoDBMongoDB
MongoDB
 
Nosql data models
Nosql data modelsNosql data models
Nosql data models
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL Databases
 

Viewers also liked

The CIOs Guide to NoSQL
The CIOs Guide to NoSQLThe CIOs Guide to NoSQL
The CIOs Guide to NoSQLDATAVERSITY
 
Change RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBChange RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDB
Apaichon Punopas
 
Privacy in the Age of Big Data
Privacy in the Age of Big DataPrivacy in the Age of Big Data
Privacy in the Age of Big Data
Arab Federation for Digital Economy
 
An Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4jAn Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4j
Debanjan Mahata
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
Max De Marzi
 

Viewers also liked (6)

The CIOs Guide to NoSQL
The CIOs Guide to NoSQLThe CIOs Guide to NoSQL
The CIOs Guide to NoSQL
 
Change RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDBChange RelationalDB to GraphDB with OrientDB
Change RelationalDB to GraphDB with OrientDB
 
Privacy in the Age of Big Data
Privacy in the Age of Big DataPrivacy in the Age of Big Data
Privacy in the Age of Big Data
 
An Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4jAn Introduction to NOSQL, Graph Databases and Neo4j
An Introduction to NOSQL, Graph Databases and Neo4j
 
Introduction to Graph Databases
Introduction to Graph DatabasesIntroduction to Graph Databases
Introduction to Graph Databases
 
Big data ppt
Big  data pptBig  data ppt
Big data ppt
 

Similar to Mongodb - NoSql Database

Mongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorial
Mohan Rathour
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
Carlos Alberto Benitez
 
Mongo db
Mongo dbMongo db
Mongo db
Gyanendra Yadav
 
mongodb11 (1) (1).pptx
mongodb11 (1) (1).pptxmongodb11 (1) (1).pptx
mongodb11 (1) (1).pptx
RoopaR36
 
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaper
Rajesh Kumar
 
No sql databases
No sql databasesNo sql databases
No sql databases
Walaa Hamdy Assy
 
No SQL - MongoDB
No SQL - MongoDBNo SQL - MongoDB
No SQL - MongoDB
Mirza Asif
 
Klevis Mino: MongoDB
Klevis Mino: MongoDBKlevis Mino: MongoDB
Klevis Mino: MongoDB
Carlo Vaccari
 
Unit 3 MongDB
Unit 3 MongDBUnit 3 MongDB
Unit 3 MongDB
Praveen M Jigajinni
 
MongoDB
MongoDBMongoDB
Selecting best NoSQL
Selecting best NoSQL Selecting best NoSQL
Selecting best NoSQL
Mohammed Fazuluddin
 
Mongo presentation conf
Mongo presentation confMongo presentation conf
Mongo presentation confShridhar Joshi
 
NoSQL and MongoDB
NoSQL and MongoDBNoSQL and MongoDB
NoSQL and MongoDB
Rajesh Menon
 
nosql [Autosaved].pptx
nosql [Autosaved].pptxnosql [Autosaved].pptx
nosql [Autosaved].pptx
Indrani Sen
 
Top MongoDB interview Questions and Answers
Top MongoDB interview Questions and AnswersTop MongoDB interview Questions and Answers
Top MongoDB interview Questions and Answers
jeetendra mandal
 
Kalp Corporate MongoDB Tutorials
Kalp Corporate MongoDB TutorialsKalp Corporate MongoDB Tutorials
Kalp Corporate MongoDB Tutorials
Kalp Corporate
 
MongoDB Lab Manual (1).pdf used in data science
MongoDB Lab Manual (1).pdf used in data scienceMongoDB Lab Manual (1).pdf used in data science
MongoDB Lab Manual (1).pdf used in data science
bitragowthamkumar1
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
Ashish Karki
 

Similar to Mongodb - NoSql Database (20)

Mongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorialMongo Bb - NoSQL tutorial
Mongo Bb - NoSQL tutorial
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
 
Mongo db
Mongo dbMongo db
Mongo db
 
mongodb11 (1) (1).pptx
mongodb11 (1) (1).pptxmongodb11 (1) (1).pptx
mongodb11 (1) (1).pptx
 
MongoDB NoSQL database a deep dive -MyWhitePaper
MongoDB  NoSQL database a deep dive -MyWhitePaperMongoDB  NoSQL database a deep dive -MyWhitePaper
MongoDB NoSQL database a deep dive -MyWhitePaper
 
No sql databases
No sql databasesNo sql databases
No sql databases
 
No SQL - MongoDB
No SQL - MongoDBNo SQL - MongoDB
No SQL - MongoDB
 
Klevis Mino: MongoDB
Klevis Mino: MongoDBKlevis Mino: MongoDB
Klevis Mino: MongoDB
 
Unit 3 MongDB
Unit 3 MongDBUnit 3 MongDB
Unit 3 MongDB
 
MongoDB
MongoDBMongoDB
MongoDB
 
MongoDB
MongoDBMongoDB
MongoDB
 
CSCi226PPT1
CSCi226PPT1CSCi226PPT1
CSCi226PPT1
 
Selecting best NoSQL
Selecting best NoSQL Selecting best NoSQL
Selecting best NoSQL
 
Mongo presentation conf
Mongo presentation confMongo presentation conf
Mongo presentation conf
 
NoSQL and MongoDB
NoSQL and MongoDBNoSQL and MongoDB
NoSQL and MongoDB
 
nosql [Autosaved].pptx
nosql [Autosaved].pptxnosql [Autosaved].pptx
nosql [Autosaved].pptx
 
Top MongoDB interview Questions and Answers
Top MongoDB interview Questions and AnswersTop MongoDB interview Questions and Answers
Top MongoDB interview Questions and Answers
 
Kalp Corporate MongoDB Tutorials
Kalp Corporate MongoDB TutorialsKalp Corporate MongoDB Tutorials
Kalp Corporate MongoDB Tutorials
 
MongoDB Lab Manual (1).pdf used in data science
MongoDB Lab Manual (1).pdf used in data scienceMongoDB Lab Manual (1).pdf used in data science
MongoDB Lab Manual (1).pdf used in data science
 
NoSQL Databases
NoSQL DatabasesNoSQL Databases
NoSQL Databases
 

More from Prashant Gupta

Spark core
Spark coreSpark core
Spark core
Prashant Gupta
 
Spark Sql and DataFrame
Spark Sql and DataFrameSpark Sql and DataFrame
Spark Sql and DataFrame
Prashant Gupta
 
Map Reduce
Map ReduceMap Reduce
Map Reduce
Prashant Gupta
 
Hadoop File system (HDFS)
Hadoop File system (HDFS)Hadoop File system (HDFS)
Hadoop File system (HDFS)
Prashant Gupta
 
Apache PIG
Apache PIGApache PIG
Apache PIG
Prashant Gupta
 
Map reduce prashant
Map reduce prashantMap reduce prashant
Map reduce prashant
Prashant Gupta
 
Sqoop
SqoopSqoop
6.hive
6.hive6.hive
Apache HBase™
Apache HBase™Apache HBase™
Apache HBase™
Prashant Gupta
 
Sonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysisSonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysis
Prashant Gupta
 

More from Prashant Gupta (10)

Spark core
Spark coreSpark core
Spark core
 
Spark Sql and DataFrame
Spark Sql and DataFrameSpark Sql and DataFrame
Spark Sql and DataFrame
 
Map Reduce
Map ReduceMap Reduce
Map Reduce
 
Hadoop File system (HDFS)
Hadoop File system (HDFS)Hadoop File system (HDFS)
Hadoop File system (HDFS)
 
Apache PIG
Apache PIGApache PIG
Apache PIG
 
Map reduce prashant
Map reduce prashantMap reduce prashant
Map reduce prashant
 
Sqoop
SqoopSqoop
Sqoop
 
6.hive
6.hive6.hive
6.hive
 
Apache HBase™
Apache HBase™Apache HBase™
Apache HBase™
 
Sonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysisSonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysis
 

Recently uploaded

top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
vrstrong314
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
Matt Welsh
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
ayushiqss
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
Tier1 app
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Shahin Sheidaei
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
informapgpstrackings
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
Sharepoint Designs
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
wottaspaceseo
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
Ortus Solutions, Corp
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
Jelle | Nordend
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
XfilesPro
 

Recently uploaded (20)

top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
Vitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume MontevideoVitthal Shirke Microservices Resume Montevideo
Vitthal Shirke Microservices Resume Montevideo
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
Large Language Models and the End of Programming
Large Language Models and the End of ProgrammingLarge Language Models and the End of Programming
Large Language Models and the End of Programming
 
Why React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdfWhy React Native as a Strategic Advantage for Startup Innovation.pdf
Why React Native as a Strategic Advantage for Startup Innovation.pdf
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
Gamify Your Mind; The Secret Sauce to Delivering Success, Continuously Improv...
 
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...
 
Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024Explore Modern SharePoint Templates for 2024
Explore Modern SharePoint Templates for 2024
 
How Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptxHow Recreation Management Software Can Streamline Your Operations.pptx
How Recreation Management Software Can Streamline Your Operations.pptx
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024BoxLang: Review our Visionary Licenses of 2024
BoxLang: Review our Visionary Licenses of 2024
 
De mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FMEDe mooiste recreatieve routes ontdekken met RouteYou en FME
De mooiste recreatieve routes ontdekken met RouteYou en FME
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
How Does XfilesPro Ensure Security While Sharing Documents in Salesforce?
 

Mongodb - NoSql Database

  • 2. Introduction to NoSQL  What is NoSQL?  It’s a whole new way of thinking about a database and encompasses a wide variety of different database technologies.  A non-relational and largely distributed database system that enables rapid and analysis of extremely high-volume, disparate (different) data types.  Why NoSQL?  The Benefits of NoSQL : A very flexible and schema-less data model, horizontal scalability, distributed architectures. • Dynamic Schemas • Auto-sharding • Replication • Integrated Caching
  • 3.  Document databases pair each key with a complex data structure known as a document. Documents can contain many different key-value pairs, or key-array pairs, or even nested documents.  Graph stores are used to store information about networks, such as social connections. Graph stores include Neo4J and HyperGraphDB.  Key-value stores are the simplest NoSQL databases. Every single item in the database is stored as an attribute name (or "key"), together with its value. Examples of key-value stores are Riak and Voldemort. Some key- value stores, such as Redis, allow each value to have a type, such as "integer", which adds functionality.  Wide-column stores such as Cassandra and HBase are optimized for queries over large datasets, and store columns of data together, instead of rows
  • 4. SQL Database NoSQL Database Types One type (SQL database) with minor variations Many different types including key-value stores, document databases, wide-column stores, and graph databases Development History Developed in 1970s to deal with first wave of data storage applications. Developed in 2000s to deal with limitations of SQL databases, particularly concerning scale, replication and unstructured data storage. Examples MySQL, Postgres, Oracle Database MongoDB, Cassandra, HBase, Neo4j ,Riak, Voldemort, CouchDB ,DynamoDB Schemas Structure and data types are fixed in advance. Typically dynamic. Records can add new information on the fly, and unlike SQL table Scaling Vertically Horizontally Data Manipulation Specific language using Select, Insert, and Update statements, e.g. SELECT fields FROM table WHERE… Through object-oriented APIs
  • 5.  Relational and NoSQL data models are very different. The relational model takes data and separates it into many interrelated tables that contain rows and columns. Tables reference each other through foreign keys that are stored in columns as well.  NoSQL databases have a very different model. For example, a document-oriented NoSQL database takes the data you want to store and aggregates it into documents using the JSON format.
  • 6.  History: Development of MongoDB began in October 2007 by 10gen. The first public release was in February 2009.  What is MongoDB  MongoDB is an open-source document database that provides • High performance • High availability • Automatic scaling and sharding  MongoDb is a Open Source database written in C++.  Drivers and client libraries are typically written in their respective languages, although some drivers use C extensions for better performance.  MongoDB does not support SQL It supports a rich, ad-hoc query language of its own.  MongoDb stores data as documents. So it is a document oriented database.
  • 7.  Document Database  A record in MongoDB is a document, which is a data structure composed of field and value pairs. MongoDB documents are similar to JSON objects. The values of fields may include other documents, arrays, and arrays of documents.  Licensing and support MongoDB is available for free under the GNU Affero General Public License.  he language drivers are available under an Apache License. In addition, MongoDB Inc. offers commercial licenses for MongoDB.  Installation : To install the MongoDB on windows or Linux , first download the latest release of MongoDB from  http://www.mongodb.org/downloads
  • 8.  Create Database  MongoDB use DATABASE_NAME is used to create database. The command will create a new database, if it doesn't exist otherwise it will return the existing database.  To check your currently selected database use the command- db  If you want to check your databases list, then use the command- show dbs.  MongoDB db.dropDatabase() command is used to drop a existing database.
  • 9.  Create Collection  MongoDB db.createCollection(name, options) is used to create collection.  In the command, name is name of collection to be created. Options is a document and used to specify configuration of collection
  • 10.
  • 11.  INSERT & FIND OPERATION To insert data into MongoDB collection, you need to use MongoDB's insert() method.  Syntex : db.COLLECTION_NAME.insert(document)
  • 12.  $set operator to insert or update the document  Syntex : db.COLLECTION_NAME.update(SELECTIOIN_CRITERIA, UPDATED_DATA)  db.mycol.update({'title':'MongoDB Overview'},{$set:{'title':'New MongoDB Tutorial'} db.mycol.update({'title':'MongoDB Overview'},{$set:{'title':'New MongoDB Tutorial'}},{multi:true})
  • 13.  The remove() Method  MongoDB's remove() method is used to remove document from the collection. remove() method accepts two parameters. One is deletion criteria and second is justOne flag  Syntex:  db.COLLECTION_NAME.remove(DELLETION_CRITTERIA)  db.mycol.remove({'title':'MongoDB Overview'})

Editor's Notes

  1. For more information about nosql : http://www.couchbase.com/nosql-resources/what-is-no-sql JSON- JavaScript Object Notation
  2. Voldemort is a distributed key-value storage system, It is used at ’LinkedIn’ by numerous critical services powering a large portion of the site. Riak uses a simple key/value model for object storage. You can store anything you want in Riak: text, images, JSON/XML/HTML documents, user and session data, backups, log files, an MongoDB uses a document mode.
  3. Drivers and client libraries are typically written in their respective languages, although some drivers use C extensions for better performance. MongoDB has no configurable cache. MongoDB uses all free memory on the system automatically by way of memory-mapped files. Casbah is an interface for MongoDB designed to provide more flexible access from both Java and Scala. The core focus is on providing a Scala oriented wrapper interface around the Java mongo driver. MongoDB in production : Craiglist, FourSquare, Shutterfly, bit.ly, spike.com, Intuit, The New York Times, sourceforge.net
  4. JSON or JavaScript Object Notation, is an open standard format that uses human-readable text to transmit data objects consisting of attribute–value pairs. It is used primarily to transmit data between a server and web application, as an alternative to XML. If load increases (more storage space, more processing power), it can be distributed to other nodes across computer networks. This is called as sharding. MongoDb supports Map/Reduce framework for batch processing of data and aggregation operation.
  5. Basic syntax of use DATABASE statement is as follows: use DATABASE_NAME Syntax of dropDatabase() command is as follows: db.dropDatabase()
  6. Basic syntax of createCollection() method is as follows db.createCollection(name, options)  Name : String type, Option : (Document type) - (Optional) Specify options about memory size and indexing Syntax of drop() command is as follows ; db.COLLECTION_NAME.drop()
  7. Basic syntax of insert() command is as follows: db.COLLECTION_NAME.insert(document ) Example : db.mycol.insert({ _id: ObjectId(7df78ad8902c), title: 'MongoDB Overview', description: 'MongoDB is Nosql database', by: Prashant', url: 'http://www.myStudyPrashant.com', tags: ['mongodb', 'database', 'NoSQL'], likes: 500 }) MongoDB supports javascript ; j = { name : "mongo" } k = { x : 3 } k = { x : 3 } db.testData.insert( j ) db.testData.insert( k )
  8. _id: ObjectId(4 bytes timestamp, 3 bytes machine id, 2 bytes process id, 3 bytes incrementer) ObjectId : _id - is 12 bytes BSON hexadecimal number unique for every document in a collection. 12 bytes are divided as follows: The first 4 bytes representing the seconds since the unix epoch The next 3 bytes are the machine identifier The next 2 bytes consists of process id The last 3 bytes are a random counter value
  9. By default mongodb will update only single document, to update multiple you need to set a paramter 'multi' to true.
  10. If there are multiple records and you want to delete only first record, then set justOne parameter inremove() method db.COLLECTION_NAME.remove(DELETION_CRITERIA,1) If you don't specify deletion criteria, then mongodb will delete whole documents from the collection. This is equivalent of SQL's truncate command. db.mycol.remove()