Implementing Collections in MongoDB
Implementing Collections in MongoDB
• You can mix different items in a collection, but it's better to group similar items.
• MongoDB creates collections on demand when saving documents that reference them.
Understanding Databases:
• MongoDB databases are collections of collections.
• Databases are created on demand, and applications can create databases for customers.
• Features include BSON for document-oriented storage, dynamic queries, indexing, geospatial
indexing, query profiling, in-place updates, GridFS for binary data, data replication, auto sharding, and
map/reduce functions.
• Advanced features like map and reduce functions are available for complex queries.
• Additional indexes can be created on other keys, embedded documents, and composite keys.
Profiling Queries:
• MongoDB provides a query profiler to identify performance bottlenecks.
Replicating Data:
• MongoDB uses master-slave replication for data safety.
• Written in JavaScript, they run on the server, providing a flexible way to query and process data.