Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Should I put a array as individual documents or one document?

I have a list of URLs that are linked to the user. Currently, once the user adds those URLs to the app, I’m saving each URL as an individual document and then reading any document that matches their UID.

Is this the right way to do it?

And With Firebase, is it cost per read per document or read per item no matter if there are 100 items in one document?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Just trying to wrap my head around it so any help would be great!

>Solution :

In my opinion you should save URL’s in an array for every user. Because firebase charges you for one document read for each batch of up to 1000 index entries matched by the query.
Check this link for more details:

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading