Suggest an editImprove this articleRefine the answer for “What is a schema in MongoDB?”. Your changes go to moderation before they’re published.Approval requiredContentWhat you’re changing🇺🇸EN🇺🇦UAPreviewTitle (EN)Short answer (EN)A schema in MongoDB is a description of a document's structure, but unlike in SQL it's not mandatory or rigidly fixed: there's none by default, and it's the application's code that decides which fields to store, effectively defining the "data schema". **Key point:** a strict schema can be turned on via JSON Schema when needed, to check types, required fields, and rules, but by default the database works with no fixed schema.Shown above the full answer for quick recall.Answer (EN)ImageA schema in MongoDB is a **description of a document's structure**, but unlike in SQL, it isn't mandatory or rigidly fixed. ### A simple explanation for a junior level 1. **There's no schema by default** MongoDB doesn't require you to describe upfront which fields a document should have. The structure can differ from record to record. 2. **The application defines the schema** Usually it's the code that decides which fields to store, effectively defining the "data schema" that way. 3. **A strict schema can be turned on if needed** If control is needed, a *JSON Schema* is used, to check types, required fields, and rules. **Summary:** a schema in MongoDB is an optional description of a document's structure. By default the database works with no fixed schema, but one can be introduced via validation if desired.For the reviewerNote to the moderator (optional)Visible only to the moderator. Helps review go faster.