MongoDb that holds data in form of documents and have dynamic schema.It provides indexing ,use sharding concept by this it provides scalable environment for sharded cluster.
2. First developed by the software company
MongoDB Inc. in October 2007 as a
component of a planned platform as a service
product.
The company shifted to an open source
development model in 2009.
In just 5 yrs. In 24 AUG. 2015 MongoDB has
evolved into one of the world’s most popular
database.
3. MongoDB is a cross - platform, Document
oriented database .
MongoDB supports JSON like documents with
dynamic schemas.
MongoDB supports indexing.
13. Schema less
No complex joins
Deep-Query ability
Easy to Scale-out
Uses internal memory for storing working
set
14. Create database
> use DATABASE_NAME
>use mydb
switched to db mydb
>db
mydb
>show dbs
local 0.78125GB
test 0.23012GB
>db.first.insert({“name”:”my first document”})
>show dbs
local 0.78125GB
mydb 0.23012GB
test 0.23012GB
19. Sharding is a method for storing data across
multiple machines.
Purpose of sharding is that database with
large data set exceed the storage capacity of
the server.
So,database have 2 basic approaches:
1.Vertical scaling
2. Sharding
20.
21.
22. Sharding partitions a collection’s data by
shard key.
MongoDB divides shard key values into
chunks and distributes chunks evenly across
shards.
MongoDB uses either Range based
paritioning or hash based partitioning.
23.
24.
25. The addition of new data can result in data
distribution imbalances within the cluster.
So to maintain MongoDB ensures two
background processes:
1.Splitting
2.Balancing
26. Replication provides redundancy and
increases data availability.
.
There is only one primary database allows
write operation.
.
Multiple secondary database servers only for
read operation.
.
Arbiter doesn’t store data. It used during
failover to decide which server will be next
primary server.