References and paths
A reference points to a specific location in your database. You use references to read, write, and listen to data at that location.Creating a reference
Calldb.ref(path) with a slash-separated path string:
db.ref() with no arguments (or an empty string) to get a reference to the root of your database:
References are lightweight objects. Creating a reference does not fetch any data or open any connections. It simply represents a path. You can create as many as you need without any performance cost.
Navigating with references
You can move around the data tree from any reference..child(path)
Returns a reference to a child location:
.parent
Returns a reference to the parent location. Returns null for the root reference.
.root
Returns a reference to the root of the database, no matter where you start:
Properties
.key
The last segment of the path. For root references, this is null.

