Firestore database Vs Realtime database

Tech 9-on
3 min readJul 4, 2021

--

firebase firestore database vs firebase realtime database

As you know firebase provide two type of database

  1. Firestore database
  2. Realtime database

So as a beginner there was a big confusion which database we should use in our projects. Both data base have its advantages and disadvantages. So here we will discuss where and why we should choose best one.

Realtime database

Realtime database is original database of firebase, because as the initial stage firebase comes with only this type of database. This is nosql, realtime, low latency database(means it provide response at the possible minimum time).

Problems with Realtime database

  1. Real time database does not provide the some features like advanced querying, sorting and transactions
  2. It is difficult to work with large data like hundred of GB changing database.
  3. It feel some problem with a large of customer range.

Projects where we can use Realtime databse

  1. If in the project, you don’t need advanced querying, sorting and transactions
  2. If your app or project will be sending a stream of tiny updates, or a few GB data, then we can use realtime database.
  3. For JSON unstructured data you should use realtime database.
  4. For High availability, for single database instance it is better to use realtime database.

Above are the basics requirements where we can use realtime database. But Firestore also provide all above advantage also.

But Firestore also provide many of above advantage and other some important advantages also.

Firestore database

Firebase understand the problems with realtime database. And firebase team works on this and finally they release an another type of database which named as firestore databse.

Firestore database has a large advantages over the realtime database. And its demand and popularities is increased as it launched.

Adventages of Firestore database

  1. In firestore we can easily implement query on database and extract information accordingly.
  2. It can work a large data and a large customer range.
  3. In firebase It’s interface is better than realtime database.
  4. Review, analysis and exploring the dataset in the firestore is quite easy than the firestore databse.
  5. Filtering of data is easy in firestore.

Limitations of Firebase database

  1. In firestore it is difficult to implement join type query in the database.
  2. In firestore it is difficult to implement and, or, not query with the database.
  3. Data Redundency is common problem.

We can not work with relational database in firebase. Firebase provide nosql database solution. I think firebase team also work at this problem and also provide relational type solution.

Firebase charge users according to numbers of write and read operation by user. So It is really difficult to reduce operations. But there are some method exists by which we can reduce the number of read and write, but it is not enough. Firebase team also work on it and must be provide a effective solution to reduce number of read and write.

At last Firebase is really good cloud platform. As a beginner it provide a complete solution of user requirements. But when you go further you will face some difficulties. But alternative solution of these difficulties are exists and firebase team is also working to built it batter.

all suggestion are welcome.

— — — — — — — — — — — -Thanks for Reading — — — — — — — — — — — — From Stupid Programmer

--

--

Tech 9-on
Tech 9-on

Written by Tech 9-on

I am a full stack web developer. I am really passionate to work in web technologies

No responses yet