|
|
|
|
|
by fiedzia
2119 days ago
|
|
>There is this myth that schemas must be enforced at the database level. You must have single point to enforce anything. This is very rarely the case with the app, where a) there will be 20 places that access database and b) often some tasks are done by operating on a database directly Some rules cannot be enforced by database, sure, but "a field must exists and be a string" is infinitely better than noting. |
|
For reference: https://docs.mongodb.com/manual/reference/operator/query/jso...