I don't quite get the deal with collections vs databases. If I have a list of managers, each with an id, and employees, each with an id and a managers id, would I make managers and employees on separate databases or collections?
4 Answers
Most of the times, you want to have only one database, and several collections on it.
You need to make both managers and employees a collection. employees can have an ObjectId that references the managers
A few times, you require more than one database, but that is only in large applications. Like one database for finance, another for human resources, another for storage, ...
Maybe you can tell more about your needs for the database, and I'll give you a more detail answer on the approach you should take.

- 3,676
- 1
- 37
- 64
For most cases, you should use just one database for both manager and employees. There only reason in my mind to use multiple database is for better concurrency. MongoDB currently uses per-database lock, which means operations to the same database might block each other. It can potentially improve performance to split your database if some data is extremely hot.

- 6,988
- 4
- 28
- 36
You can put them separate collections, even you can embed employee
in managers
collection. However, putting them different database, is meaningless. If you want to learn something about embedding
vs linking
on mongodb, refer here

- 1
- 1

- 15,400
- 4
- 51
- 73
Add them in same database but different collection (and reference employees with managers).

- 84
- 1
- 8