Skip to main content

What is a collection?

Entry MongoDB
Quick Answer A collection is a group of documents in MongoDB - roughly equivalent to a table in SQL. But unlike SQL tables, collections have no enforced schema by default - documents in the same collection can have different fields. Collections are created automatically when you insert the first document. You query and index at the collection level.

Answer

A collection is a group of documents similar to a table in relational databases but without a fixed schema.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice