We are planning migrating our application to Firebase for realtime capabilities and to improve performance. It`s a sales application which stores costumers products and sales data. Our costumers (we call it Groups) have in general 10 stores each (we call it Companies).
It`s not a big deal to handle this amount of data. But recently we made a deal with a big Group which has 1.000+ stores (and 20 new ones every month).
My question is how to structure this data without having performance issues and keep the realtime features?
I think if we focus on how to structure Groups-Companies we can handle the other parts (sales, products, etc)
"Groups": {
"Group1": {
"name": "Historical Tech Pioneers"
},
"Group2": { ... }
}
"Stores": {
"Store1": {
"name": "abc",
"group" "Group1"
},
"Store2": {
"name": "def",
"group" "Group1"
},
}
Is this data structure ok to deal with thousands of records every time?
I am very concern about Firebase performance if every time I have to query for over 1.000 stores. Everybody says that 1.000 records is nothing for Firebase, but I did some tests and found that retrieving 1.000 records is not as fluid as they say.