0

I'm developing an app to help on events how much sales a single event has done and some other features that doesn't matter directly to the problem. So, I've done an attempt to use Firestore to save my data, but something is saying to me that I was using the wrong way. Every event has something around 2k ~ (20k ~40k) entries of sales entries. Firebase Realtime Database doesn't seem a good idea because of data duplication needed for the relations I need to create. The most important part of the Techstack I'm using:

  • React Native
  • React Native Firebase (native solution for react native on firebase)
  • Redux

The problem is that whenever I try to retrieve those documents for, let's say a custom report for my clients, the app just crashes or freezes entirely. Talking to other developers, they said to me that maybe Firestore is not a good solution for my case because of this 'sort of' big data retrieving.

Structure

Organizations/organization_id

  • Org_name
  • members (Array of userIds)

Events/event_id/

  • Event Name
  • Event sales data (Array)
  • Event product list (Array)
  • Event Date
  • Event attendees (Array of Attendees (name, pin (int))
  • Organization name

I've checked also that Firestore has a limit of 20k registries or entries per document (something like this). A friend of mine who have more experience told me that an SQL database an a normal API would probably solve the problem, but maybe require more work as I am a single developer.

Do you think that Firestore is a good solution and I was probably using the wrong way?

Or would say that Firestore is not the case for this problem where I would have to save and retrieve data with such relationships?

  • 1
    Checkout this [solution](https://stackoverflow.com/a/46750456/6606831) and the [metrics](https://i.stack.imgur.com/bol1S.png), if the number of queries are too large, then the firestore get's stuck – Pritish Vaidya Apr 09 '18 at 11:14
  • The wierd part is that RTD handles quite well the queries, but it lacks of filter features. I'm coming to the conclusion that firestore is probably not an alternative for creating reports for this case. – Vinícius Pacheco Vieira Apr 09 '18 at 12:53

0 Answers0