•Collections
•Documents store
•Collections == RDBMS Tables
•Creates the collection when you write data into the collection
•Databases
•Holds one or more collections
•Databases == RDBMS Databases
•Creates the database when you first store data for that database
MongoDBViews and Capped Collections
•MongoDB Views
•RDBMS views Concept
•Its Queryableobject whose contents are defined by an aggregation pipeline
•A view's content is computed on-demand
•Does not persist the view contents to disk
•Read-only
•Does not support write operations
•Cannot rename views
•Created in the same database as the source collection
•To understand views, you must know MongoDB aggregation
•Fixed-size collections
•Supports high-throughput operations
•Faster insert and retrieval of data
•Works as circular queue or buffers
•Makes room for new documents by overwriting the oldest documents
•Convert normal collection to Capped collection
•Can specify the maximum number of documents




The article provides a clear introduction to how MongoDB organizes data through databases, collections, and documents. The comparison between collections and relational database tables, along with the explanation that databases and collections can be created when data is first stored, gives beginners a useful foundation for understanding MongoDB's document-oriented structure.
ReplyDeleteMongoDB is particularly relevant when building modern JavaScript applications because it can be used as the database layer in a full-stack application. Understanding collections, views, aggregation concepts, and capped collections can therefore be valuable for developers exploring the MEAN Stack Course and learning how different application layers work together.
The discussion of MongoDB views and capped collections also introduces useful database features beyond basic document storage. Views provide queryable results based on aggregation pipelines, while capped collections are designed for fixed-size, high-throughput scenarios. These database concepts can complement broader full-stack development skills, making the JavaScript Full Stack Course a relevant direction for developers working with JavaScript-based applications.
ReplyDelete