Both databases are cloud-hosted, NoSQL databases, but the data model of both databases is different:
Realtime Database
Cloud Firestore
Simple data is very easy to store.
Complex, hierarchical data is harder to organize at scale.
Simple data is easy to store in documents, which are very similar to JSON.
Complex and hierarchical data is easier to organize at scale, using subcollections within documents.
Requires less denormalization and data flattening.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month, and much more.