MongoDB is a document-oriented database, so it is NoSQL. This means no it is necessary to have a rigid structure for each record, you can adjust / modify it in the format you want.
MongoDB organizes these documents into collections to make it easier to query and organize information.
What does all this mean?
In my view, you do not need multiple banks, but several different document formats (records) - and you have chosen the right bank for this:)
Example
Suppose you have a different client screen for each type of user (the screen is the same, but the information is different). How this should be organized:
Collection: CustomerScreen
// Documento para o cliente A:
{
_id: 'UM OBJECTID PARA O CLIENTE A',
owner: 'usuário2',
nome: 'Cliente A',
ultimoContato: '2014-01-01'
}
// Documento para o Cliente B:
{
_id: 'UM OBJECTID PARA O CLIENTE B',
owner: 'usuário1',
razaoSocial: 'Cliente B ltda',
totalVendas: 100,
nomeContatoComercial: 'João'
}
Both documents (json) are in the same collection, however, each has a different set of information; information pertinent to each client.
The only common information between documents is the _id
and owner
fields, so you can find the information you need.
The great trick
All documents will have owner:'id do usuário dono'
information. These fields will allow you to identify that documento X pertence ao usuário Y
. So you can keep a bank in a standard (predictable) format, however, with different information for each user.
Multiple databases will be bad
If you install (create a new) database for each user, you will have a system for each user.
10 usuário = 10 sistemas diferentes
Maintenance for this type of system is extremely expensive and expensive. Avoid this kind of behavior when building a system.