Hi, let me introduce myself. My name is Firestore!
No, this is not a store selling fire. No, this is also not a store that’s on fire.
Using the definition from https://firebase.google.com/docs/firestore, Firestore is a flexible, scalable NoSQL cloud database to store and sync data for client- and server-side development.
Firestore is a service from Google that can manage your database. Firestore can be used in many programming languages, like in my PPL project: Flutter. Usually, a software project uses an SQL-based database, like MySQL, PostgreSQL, etc. But Google provides you an easier to manage and scale database, Firestore.
Unlike MySQL that uses Relational DBMS, Firestore uses a Document Store Database Model. What is that?
As you can see from the screenshot above, Firestore uses the term Document. The picture above can be illustrated by another picture.
You can think of Firestore as a Nested List. In flutter, when you want to query 1-Tidak field in 20210421–1 Document, you can use: (assuming you already have a Firestore instance.
CollectionReference pantau = FirebaseFirestore.instance.collection("pantau_per_date");var result = pantau.doc("20210420-1").get("1-Tidak");
Of course when you want to use Firestore in your Flutter project, you need to integrate your project with the Firestore using the credentials given by Google. You can check out the tutorial about it in https://firebase.google.com/docs/flutter/setup.
Usually, in my faculty, people are using Django as their main Backend service. It’s because in the Third semester, on the Website Design and Programming course, Django is the first framework that most students know. Using Django for people that doesn’t have knowledge about relational database can be hard. They must know about terms like One-to-One, One-to-Many, Foreign key, Primary Key, etc. But in firestore, you don’t need to know many definitions, but knowing what’s that can be helpful in designing your Firestore Database so the cost when you query-ing something is not that expensive.
There are many cons and pros when you decide to use Firestore(NoSQL) and Relational Database(MySQL). After reading many sources about the comparation between the two, most sources stated that Firestore has inferior performance than MySQL, while easier to scale as well. But, having no join function like MySQL is mostly known, and no aggregation queries like COUNT, SUM, AVERAGE, etc may draw many projects because of the performance of that query.