Firebase is a cloud-based NoSQL database solution offered by Google. In this lesson, we’ll give some background on Firebase and Firestore, the realtime database we’ll be using. Then, in the next lesson, we’ll discuss NoSQL in detail — including how it’s different from SQL.
As we now know, React is not an opinionated library. React can work equally well with any kind of database, whether that’s SQL, NoSQL, or another solution. And while it works well with Firebase, there are many other cloud-based solutions that work with React.
However, Firebase is widely considered the most popular and well-maintained backend data service provider. It also works well with React applications.
Firebase is a realtime, cloud-based storage provider. What exactly does that mean? Cloud-based means it exists online, or “in the cloud.” Realtime means we can see database changes immediately in our online dashboard.
Firebase is also a Backend-as-a-Service, often abbreviated as BaaS. This is part of an application’s backend (like a database) managed and provided by an online service (like Firebase). Note that BaaS providers often provide more than just cloud storage. For example, Firebase also provides:
To see a full list of Firebase offerings, visit https://firebase.google.com/.
You’ll almost certainly encounter other BaaS solutions in your future career. Other examples of backends-as-a-service include:
These are just a few common BaaS solutions, but by no means not an exhaustive list.
There are many benefits to using a BaaS, most notably:
However, there are also downsides to a BaaS solution:
While there are some drawbacks to using BaaS, the positives generally outweigh the negatives — which is a big part of the reason services like Firebase and AWS are so popular. Ultimately, we see several major benefits of learning Firebase:
Firebase is the name of the BaaS we are using. It’s also the name of one of two realtime database solutions we can incorporate in our projects. The Firebase Realtime database stores all data in a large JSON object. The downside of this approach is that it’s more difficult to query this database.
Fortunately, Firebase also provides another database option called Firestore. This is also a realtime cloud-based database solution — and it’s the one Firebase recommends for the majority of users. One of the biggest advantages of Firestore is that it includes functionality that makes it easier to query our database.
So remember that we are using Firebase as a BaaS but we are using Firestore as our database solution.