0
votes

I am new to nosql and firebase real-time-database and I have a question about the structure of database.

1,

For example if I structured my database in this way

user-
     user1-
           info-
                followers-
                           user2
                           user3
                           user4
           posts-
                 ...

If i access the follower information user using :

ref.child('users').child('user1').child('info').child('followers')

firebase will only download the child nodes of follwers right? It will not download the other nodes to the user, is that correct?

2,

If I retrieve data using :

ref.queryOrdered(byChild:"index").queryStarting(atValue:start).queryEnding(atValue: end)

Only data between the starting index and the end index will be downloaded to the user end right?

1

1 Answers

2
votes
  1. Yes

  2. Yes. That's how it's defined according the documentation for queryStarting() and queryEnding(). Note that the start and end values are inclusive, meaning any records with values that are equal to the start and end values will be part of the results.