As fireStore is the new inclusion as real-time database into firebase, obviously it will outperform the old real-time data ablaze in every aspect. What are the actual differences between the two databases ?
Asked
Active
Viewed 1,152 times
1 Answers
3
Why you should use firestore over realtime db:
- Shallow queries
- Fetching a node does not fetch you all of the subnodes together
- Queries can be done on multiple fields
- Realtime db only support querying on a single field
- Queries scale to size of result set, not size of data set
- Search for top 10 will take same amount of time whether you have 300, 300 thousand or 30 million entries
- Manual fetching of data
- One time fetch queries is the primary use case, listeners for realtime updates is configurable. See Getting Realtime Updates with Cloud Firestore
- Multi region support
- Redundant database (not sure about realtime db redundancy but it does have an auto backup price plan)
- Different pricing model
- Price based on number of reads and writes, not amount of data downloaded (can be good or bad depends on usage, see below)
Why you should use realtime db over firestore:
- Slightly better latency
- Faster update on client than firestore
- Native support for presence
- User online status is easier to be implemented on realtime db
- Pricing model
- If your app does a lot of reads and writes with small data, realtime db can be cheaper than firestore
- Firestore is still beta
- Realtime db has been in production for four years, firestore is just recently released
TL;DR:
New apps should start with firestore.
Existing apps using realtime db should stay with realtime db. Unless you have a good enough reason to switch, you dont.
Source: https://firebase.googleblog.com/2017/10/cloud-firestore-for-rtdb-developers.html

davidchoo12
- 1,261
- 15
- 26
-
2I'm not sure blatant statements like "New apps should start with firestore" makes sense. They are built for slightly different use cases and should be treated as such – tommybananas Oct 16 '17 at 14:46