1

I get its point about dynamic schema architecture. But this raises my confusion that if its schema less, then why would we need more than one collection (other than collection size issue)? Then we can include all sort of documents in one collection?

3
  • 3
    Because that would be stupid. Would you add Users and Projects into one collection? That makes absolutely no sense.
    – Stan
    Sep 5, 2016 at 13:35
  • I understand! With RDMS, this issue is catered with relations, proper schema and constraints, so Users and Projects will never be in single table. With Mongo, is there a way for enforcing some sanity rules? Given as it is, as stupid as it may sound to merge Users and Projects in single table, its still possible
    – IIOT-Zero
    Sep 5, 2016 at 13:50
  • 2
    Yes, since version 3.2 you can enforce document validation on-insert. docs.mongodb.com/manual/core/document-validation
    – Stan
    Sep 5, 2016 at 13:51

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.