schemas folder
scheung38 opened this issue · 2 comments
scheung38 commented
Hi, I thought mongodB is schemaless? May I ask what is the use of schemas in this case? Thanks
wojcikstefan commented
Hi @scheung38 MongoDB is schemaless indeed. We can capitalize on that by having documents in the same collection with slightly different structures (e.g. by using a DictField
or inheritance). That being said, you still want some level of validation on your fields. This is where schemas come in. MongoDB doesn't validate if you're inserting an integer, a string, or an email address in a given field's value, so instead you need your application to perform these checks.