Firebase Flashcards
1
Q
How are arrays handled in Firebase?
A
Automatic numeric indexing does not work in Firebase on the server. Firebase array elements have uniquely generated keys.
2
Q
What are null locations?
A
If you navigate to a node/url where data doesn’t exist Firebase returns a null value
3
Q
What are Firebase refs?
A
var url = "www.someurl.com"; var baseRef = new Firebase(url);
4
Q
What does a child ref look like?
A
var url = "www.someurl.com"; var moviesRef = new Firebase(url + "movies/"); var starWarsRef = moviesRef.child("star_wars");
5
Q
What are data design principles for Firebase?
A
- use root branches as containers
- avoid deep nesting; requesting a URL brings back all data underneath a node
- duplicate key data in objects to avoid lookups