SlideShare uma empresa Scribd logo
1 de 14
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

Mais conteúdo relacionado

Mais procurados

Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL Databases
Derek Stainer
 

Mais procurados (20)

Mongo DB Presentation
Mongo DB PresentationMongo DB Presentation
Mongo DB Presentation
 
Introduction to MongoDB.pptx
Introduction to MongoDB.pptxIntroduction to MongoDB.pptx
Introduction to MongoDB.pptx
 
Postgresql
PostgresqlPostgresql
Postgresql
 
Relational databases vs Non-relational databases
Relational databases vs Non-relational databasesRelational databases vs Non-relational databases
Relational databases vs Non-relational databases
 
The Basics of MongoDB
The Basics of MongoDBThe Basics of MongoDB
The Basics of MongoDB
 
Mongodb vs mysql
Mongodb vs mysqlMongodb vs mysql
Mongodb vs mysql
 
Document Database
Document DatabaseDocument Database
Document Database
 
NoSQL
NoSQLNoSQL
NoSQL
 
An introduction to MongoDB
An introduction to MongoDBAn introduction to MongoDB
An introduction to MongoDB
 
MongoDB presentation
MongoDB presentationMongoDB presentation
MongoDB presentation
 
Introduction to NoSQL Databases
Introduction to NoSQL DatabasesIntroduction to NoSQL Databases
Introduction to NoSQL Databases
 
Mongo DB
Mongo DBMongo DB
Mongo DB
 
MongoDB
MongoDBMongoDB
MongoDB
 
NoSQL databases
NoSQL databasesNoSQL databases
NoSQL databases
 
Mongo db intro.pptx
Mongo db intro.pptxMongo db intro.pptx
Mongo db intro.pptx
 
Non relational databases-no sql
Non relational databases-no sqlNon relational databases-no sql
Non relational databases-no sql
 
Introduction to NoSQL
Introduction to NoSQLIntroduction to NoSQL
Introduction to NoSQL
 
Mysql database
Mysql databaseMysql database
Mysql database
 
Intro To MongoDB
Intro To MongoDBIntro To MongoDB
Intro To MongoDB
 
Object Oriented Database Management System
Object Oriented Database Management SystemObject Oriented Database Management System
Object Oriented Database Management System
 

Destaque (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
 

Semelhante a Mongodb - NoSql Database

mongodb11 (1) (1).pptx
mongodb11 (1) (1).pptxmongodb11 (1) (1).pptx
mongodb11 (1) (1).pptx
RoopaR36
 
Mongo presentation conf
Mongo presentation confMongo presentation conf
Mongo presentation conf
Shridhar Joshi
 
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
 

Semelhante a 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
 
NOSQL and MongoDB Database
NOSQL and MongoDB DatabaseNOSQL and MongoDB Database
NOSQL and MongoDB Database
 
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
 

Mais de Prashant Gupta

Mais de 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
 

Último

AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
masabamasaba
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
9953056974 Low Rate Call Girls In Saket, Delhi NCR
 

Último (20)

%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
Generic or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
SHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions PresentationSHRMPro HRMS Software Solutions Presentation
SHRMPro HRMS Software Solutions Presentation
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Pushp Vihar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 

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'})

Notas do Editor

  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()