I have a question with the architectural ones. I create an application that collects a large amount of data from users and I have to save it somewhere. Saving all data from all users in one collection in mongodb very quickly will cause the allowable limit of 16MB of data in the collection to be reached. For this reason, I decided to create a new collection for each subsequent user of my application by creating a collection name like this:
const getCollectionName = (userId: string) => {
return `${COLLECTIONS.DATA}_${userId}`
}
await mongoDb.createCollection(getCollectionName(userId));
I took this idea from my experience in working with firebase, where we can easily manage sub-collections for a given collection.
And now I have a question, is it a good idea to create a new collection for each user of my application separately, or are there some inconveniences resulting from this way of storing data that I have no idea about?