I need help modeling my data in mongo. Most my experience has been in relational DBs, I am just starting out w/ mongo. I am modeling data for different events.
From mongo docs here: data modeling
In certain situations, you might choose to store information in several collections rather than in a single collection.
Consider a sample collection logs that stores log documents for various environment and applications. The logs collection contains documents of the following form:
{ log: "dev", ts: ..., info: ... } { log: "debug", ts: ..., info: ...}
If the total number of documents is low you may group documents into collection by type. For logs, consider maintaining distinct log collections, such as logs.dev and logs.debug. The logs.dev collection would contain only the documents related to the dev environment.
Generally, having large number of collections has no significant performance penalty and results in very good performance. Distinct collections are very important for high-throughput batch processing.
Also spoke w/ 10gen guy. For really large collections he listed multiple benefits for separating out into smaller more specific collections. His comment on using one collection for all the data and using an index was:
Just because you can do something does not mean you should. Model your data appropriately. may be easy to store in one large collection and index but that is not always best approach.