Should I save this in the same user collection or create another collection?

I am creating this project with reactjs and firebase firestore where users can register and … Read more Should I save this in the same user collection or create another collection?

I am creating this project with reactjs and firebase firestore where users can register and log in to this website. Upon logging in, the user will have a QR code that stores their userID. On the admin’s side, the admin can scan their QR code which will then retrieve the user’s userID. The admin can then see the user’s information such as their name, birthdate, address, and phone number. And can also enter what the user’s vaccine is along with the one who administered the vaccine, and etc, and submit it.

I’m not sure if I should create another collection when the admin submits the entered vaccination status of the user or should I just still save it in the users collection.

This is the user collection:

enter image description here

I’m asking this because I will be creating a monthly graph for each of the vaccines for those who were at least at 1 dose or fully vaccinated. Will this be fine if I’ll just save it in the firestore by creating another collection or just save it in the users collections?

The monthly graph will be kind of similar to this:

enter image description here

This is the form where the admin can enter the vaccination information of the user. And it will be the admin who will enter what type of vaccination the user has received and either way from my place, the people cannot choose what type of vaccine they’ll get.
enter image description here

Source: React – Stack Overflow



Leave a Reply

Your email address will not be published. Required fields are marked *