When should we Modify Schema Validation in MongoDB?
As there are changes in data requirements or the business logic, schema validation rules are modified.
Points to remember:
- Initially, valid documents can change to invalid after modification in validation rules if they don’t satisfy the new rule.
- Validation rules can be applied to a collection that was defined without validation rules.
Modify Schema Validation in MongoDB
MongoDB was released in February 2009. It is an open-source document-oriented database. It is classified as a NoSQL database. The structure of the data in the collection is dynamic. It follows the CAP theorem (Consistency Availability and Partition tolerance). It is an unstructured language and provides horizontal scalability and high-performance, data persistence. It solved the problem of scalability and agility.