Read, Write, and Delete Data from the Realtime Database
Learn to read and write data to the Realtime Database and discover different ways to perform read and write operations.
To carry out any operation on the Realtime Database, we must create a reference to the specific path within our database. To do this, we use the ref
function, imported from the firebase/database
subpackage. This function returns a reference to the location in the database that corresponds to the provided path.
The ref
function takes the database instance as its first argument. It can also optionally take the path that the returned reference points to, as its second argument. However, if no path is provided, the function returns a reference to the root of the database:
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy