what is the difference between cloud firestore and realtime database?
Realtime Database stores data as one large JSON tree which makes it easier to store simple data but harder to organize complex, hierarchical data at scale. Cloud Firestore stores data in documents arranged in collections. Simple data is stored in documents, which is easy and similar to the way data is stored in JSON.