4
votes

Firebase's documentation has the following paragraph:

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.

I can't find any documentation on how to add a Cloud Firestore to an existing project with a Realtime Database, though. I will ultimately upgrade to Cloud Firestore, but would like some time to experiment and learn before I convert the production database.

Does anybody know how to use both databases in the same Firebase project?

1

1 Answers

4
votes

When you go to your project in the console and choose the Database product, you should see something like this the first time:

enter image description here

This is a selector that lets you choose to see either Realtime Database or Firestore in your project. You can switch between the two with this selector.

The first time you select Cloud Firestore, it will ask you to configure things. Start in "test mode" to set things up for full read and write without authentication to get started quickly, but of course your should always have rules set up in production.

After you set up Firestore, you should be able to use both client SDKs to access both databases independently.