2
I’m developing a website where users can vote for or against places they know about. To do this I could create a collection called "votes" relating the site to the user and whether it was for or against, the problem is that this can generate a huge collection of documents, another solution would be for the user document to have an array with its votes so I would separate the collection of votes in users. What is the best approach to this performance situation
Wouldn’t it be better to record the votes in the document? Usually votes are displayed when displaying the location, that is, when displaying a location, if you save votes to users, you will have to scroll through each user to find the local votes.
– Oeslei
Dude, I don’t know how much information you will record in each document, but the user can have N votes and that means the document can grow without control. This is bad because the document is limited to 16MB.
– Filipe Moraes
In terms of data access, it would be best to have a new collection called votes, so both users and the location could search for their votes effortlessly. My concern is with Collection size, what will be the maximum recommended size for a Collection? @Filipemoraes
– Fábio Lemos Elizandro