Bog'liq Bailey J., Dominguez A., Djermanovic D. - Saving Data on Android (1st Edition) - 2019
Other features Transac/ons Realtime Database also allows you to write data to the database using a transaction.
A database transaction is a unit of work that is independently executed and it must
be atomic, consistent, isolated and durable. If the
WhatsUp app had a feature to
allow you to "like" a post you could use transactions to keep track how many
likes a
given post had. Since there is a use case where multiple users could "like" the post at
the same time, the transaction would allow you to always have fresh and correct data
about
likes .
Check the official documentation
https://firebase.google.com/docs/database/
android/read-and-write#save_data_as_transactions
to see how to work with
transactions.