Similarly to this question, I am trying to build a system that can handle a large number of users. It is intended for use by organizations, which means that each organization must have completely separate data and each organization can have hundreds of users each generating hundreds of records.
I want to use MongoDB to store this data, but I am not sure what the recommended way to organize such a database is. I am thinking that I will simply create a separate database for each organization (myapp-org-1
, myapp-org-2
) on my server and each database will have similar collections (Users
, Passes
, Areas
, etc) because this seems like a faster and less error-prone solution than storing everyone's data in a single database and using some sort of key to separate them by organization.
Which method is faster / otherwise better, and why?