ok, After reading the documentation on **Structuring Database** on the firebase docs website, [Structure your database][1]
**I realised that i didn't structure my database well, i should have regrouped them after specifying the name**
like below
```
{
// This is a poorly nested data architecture, because iterating the children
// of the "chats" node to get a list of conversation titles requires
// potentially downloading hundreds of megabytes of messages
"chats": {
"one": {
"title": "Historical Tech Pioneers",
"messages": {
"m1": { "sender": "ghopper", "message": "Relay malfunction found. Cause: moth." },
"m2": { ... },
// a very long list of messages
}
},
"two": { ... }
}
}
```
*Although, it said that structuring it that way isn't a nice way, it seems that's what works for me*
[1]: https://firebase.google.com/docs/database/android/structure-data?authuser=3#avoid_nesting_data
ok, After reading the documentation on **Structuring Database** on the firebase docs website, [Structure your database][1]
**I realised that i didn't structure my database well, i should have regrouped them after specifying the name**
like below
```
{
// This is a poorly nested data architecture, because iterating the children
// of the "chats" node to get a list of conversation titles requires
// potentially downloading hundreds of megabytes of messages
"chats": {
"one": {
"title": "Historical Tech Pioneers",
"messages": {
"m1": { "sender": "ghopper", "message": "Relay malfunction found. Cause: moth." },
"m2": { ... },
// a very long list of messages
}
},
"two": { ... }
}
}
```
*Although, it said that structuring it that way isn't a nice way, it seems that's what works for me*
[1]: https://firebase.google.com/docs/database/android/structure-data?authuser=3#avoid_nesting_data