Go to console

Choose a database: Cloud Firestore or Realtime Database

Firebase offers two cloud-based, client-accessible database solutions that support realtime data syncing:

  • Realtime Database is Firebase's original database. It's an efficient, low-latency solution for mobile apps that require synced states across clients in realtime.
  • Cloud Firestore is Firebase's new flagship database for mobile app development. It improves on the successes of the Realtime Database with a new, more intuitive data model. Cloud Firestore also features richer, faster queries and scales better than the Realtime Database.

Which database is right for your project?

We recommend Cloud Firestore for most developers starting a new project. Cloud Firestore offers additional functionality, performance, and scalability on an infrastructure designed to support more powerful features in future releases. Expect to see new query types, more robust security rules, and improvements to performance among the advanced features planned for Cloud Firestore.

As you're choosing between database solutions, consider the following differences between Cloud Firestore and the Realtime Database.

Data model

Both Realtime Database and Cloud Firestore are NoSQL Databases.

Realtime Database Cloud Firestore
Stores data as one large JSON tree.
  • Simple data is very easy to store.
  • Complex, hierarchical data is harder to organize at scale.

Learn more about the Realtime Database data model.

Stores data in documents organized in collections.
  • Simple data is easy to store in documents, which are very similar to JSON.
  • Complex, hierarchical data is easier to organize at scale, using subcollections within documents.
  • Requires less denormalization and data flattening.

Learn more about the Cloud Firestore data model.

Realtime and offline support

Both have mobile-first, realtime SDKs and both support local data storage for offline-ready apps.

Realtime Database Cloud Firestore
Offline support for mobile clients on iOS and Android only. Offline support for iOS, Android, and web clients.


Retrieve, sort, and filter data from either database through queries.

Realtime Database Cloud Firestore
Deep queries with limited sorting and filtering functionality.
  • You can only sort or filter on a property, not sort and filter on a property, in a single query.
  • Queries are deep by default: They always return the entire subtree.
Indexed queries with compound sorting and filtering.
  • You can chain filters and combine filtering and sorting on a property in a single query.
  • Write shallow queries for subcollections: You can query subcollections within a document instead of an entire collection, or even an entire document.
  • Queries are indexed by default: Query performance is proportional to the size of your result set, not your data set.

Writes and transactions

Realtime Database Cloud Firestore
Basic write and transaction operations. Atomic write and transaction operations.

Reliability and performance

Realtime Database Cloud Firestore
Realtime Database is a regional solution.
  • Very low latency, so it's a great option for frequent state-syncing.
  • Databases are limited to zonal availability in a single region.
Read more about Realtime Database performance and reliability characteristics in the Service Level Agreement.
Cloud Firestore is a multi-region solution that scales automatically.
  • Houses your data across multiple data centers in distinct regions, ensuring global scalability and strong reliability.
  • Offers the stability and reliability of the Google Cloud Platform.
Read more about Cloud Firestore performance and reliability characteristics in the Service Level Agreement.


Realtime Database Cloud Firestore
Scaling requires sharding.

Scale to around 100,000 concurrent connections and 1,000 writes/second in a single database. Scaling beyond that requires sharding your data across multiple databases.

Scaling is automatic.

Scales completely automatically. Currently, scaling limits are around 1 million concurrent connections and 10,000 writes/second. We plan to increase these limits in the future.


Realtime Database Cloud Firestore
Cascading rules that require separate validation. Simpler, more powerful security for mobile, web, and server SDKs.


Both solutions are available on the Spark, Flame, and Blaze pricing plans.

Realtime Database Cloud Firestore
Charges only for bandwidth and storage, but at a higher rate.

Read more about Realtime Database pricing plans.

Charges primarily on operations performed in your database (read, write, delete) and, at a lower rate, bandwidth and storage.

Cloud Firestore supports daily spending limits for Google App Engine projects, to make sure you don't go over the costs you're comfortable with.

Read more about Cloud Firestore pricing plans.

Using Cloud Firestore and Realtime Database

You can use both databases within the same Firebase app or project. Both NoSQL databases can store the same types of data and the client libraries work in a similar manner. Keep in mind the differences outlined above if you decide to use both databases in your app.

Learn more about the features available in both Realtime Database and Cloud Firestore.