Skip to main content
InterviewHubPRO
Section Overview
Q48

Question 48 of 50

Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

96%
MongoDB & NoSQL (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)

Schema Validation with JSON Schema (`$jsonSchema`).

senior LevelForms

In Simple Words: Although MongoDB is schemaless, enterprise applications enforce data consistency using JSON Schema validation rules on collections:

  • Enforces data types (bsonType: 'string'), required fields, minimum/maximum values, and regular expression patterns on INSERT and UPDATE operations.