The user is said to gain more "flexibility" in a schema-less database. However the option to gain schema-based advantages are NOT available. Proposal:
- Create document "templates" that list all fields and default values for a specific type of database write or read.
- Create "subset templates" that reference a template and represent a subset of its information.
- Documents written from a template are indicated as such, but lose this status on their first non-template write.
- Compare templates at declaration time; writes on the same document from multiple templates preserve flags if those templates do not conflict.
- Queries using a template return only documents written with a compatible template (original or subset)
This would provide guaranteed queries (skip those pesky membership tests) and assist developers in planning and maintaining a mongodb instance by simplifying and solidifying common and/or boilerplate data operations.