learn mongo db at amc square learning
TRANSCRIPT
What is MongoDB?
MongoDB is an open source, document-oriented database designed with both scalability and developer agility in mind. Instead of storing your data in tables and rows as you would with a relational database, in MongoDB you store JSON-like documents with dynamic schemas(schema-free, schema less).
Using BSON (binary JSON), developers can easily map to modern object-oriented languages without a complicated ORM layer.
BSON is a binary format in which zero or more key/value pairs are stored as a single entity.
lightweight, traversable, efficientbridge the gap between key-value stores
(which are fast and scalable) and relational databases (which have rich functionality).
Data Model for MongoDB?
ReplicationOnly one server is active for writes (the
primary, or master) at a given time – this is to allow strong consistent (atomic) operations. One can optionally send read operations to the secondary's when eventual consistency semantics are acceptable.
ReplicationReplica Sets and Master-Slave replica sets are a functional superset of
master/slave and are handled by much newer, more robust code.
ShardingSharding is the partitioning of data among
multiple machines in an order-preserving manner.
Machine 1 Machine 2 Machine 3
Alabama → Arizona Colorado → Florida Arkansas → California
Indiana → Kansas Idaho → Illinois Georgia → Hawaii
Maryland → Michigan Kentucky → Maine Minnesota → Missouri
Montana → Montana Nebraska → New Jersey Ohio → Pennsylvania
New Mexico → North Dakota Rhode Island → South Dakota Tennessee → Utah
Vermont → West Virgina Wisconsin → Wyoming