2. What is MongoDB?
•An open source cross-platform document
oriented database system.
•Classified as a NoSQL database.
•Use JSON like documents with
dynamic schemas to store data.
•Works on concept of collection and
document.
4. MongoDB Terminology
• Database : A physical container for collections. Each database gets its
own set of files on the file system. A single MongoDB server typically
has multiple databases.
•.Collection : A group of MongoDB documents. Exists within a single
database. Typically, all documents in a collection are of similar or
related purpose.
•Document : A document is a set of key-value pairs. Documents have
dynamic schema. Dynamic schema means that documents in the same
collection do not need to have the same set of fields or structure, and
common fields in a collection's documents may hold different types of
data.
6. Why to use MongoDB?
•Dynamic Schema: one collection holds different types of documents.
Number of fields, content and size of the document can be differ from
one document to another. Supports fluent polymorphism.
•Indexing of any attribute and Embedded document model provides
high performance and need for expensive joins.
•Automatic Scaling : Horizontal scaling is a part of core functionality..
•High Availability: MongoDB’s replication facility, called replica sets,
provide automatic failover and data Redundancy.
•Fast in place update.
•Conversion / mapping of application objects to database objects
not needed
7. Where to use MongoDB?
•Big Data
•Content Management and Delivery
•Mobile and Social Infrastructure
•User Data Management
•Data Hub
8. •Connect to MongoDB: We use mongo.exe shell. Issue following command
on Command Prompt:
•{path to parent directory}mongodbbinmongod.exe
•MongoDB is self-contained and does not have any other system
dependencies. So you can extract it to any directory.
•Data Directory : The default location for the MongoDB data directory
is C:datadb. Create this folder or you can also use an alternate path.
•Start MongoDB : To start database process, execute from command
prompt
{path to parent directory}mongodbbinmongod.exe
With alternate data directory option:
{path to parent directory}mongodbbinmongod.exe –dbpath d:data
The waiting for connections message in the console output indicates that the mongod.exe
process is running successfully.
How to install & Run MongoDB?
9. How to install & Run MongoDB?
•Download Link : http://www.mongodb.org/downloads
•MongoDB is self-contained and does not have any other system
dependencies. So you can extract it to any directory.
•Data Directory : The default location for the MongoDB data directory
is C:datadb. Create this folder or you can also use an alternate path.
•Start MongoDB : To start database process, execute from command
prompt
{path to parent directory}mongodbbinmongod.exe
With alternate data directory option:
{path to parent directory}mongodbbinmongod.exe –dbpath d:data
The waiting for connections message in the console output indicates that the
mongod.exe process is running successfully.