What is Firestore?
Cloud Firestore is a NoSQL document database which allow you to easily store, sync, and query data for mobile and web apps.
Google has released Cloud Firestore, their new Document Database for apps. Firestore uses documents and collections which allow the easy use of querying compared to Firebase, which is a traditional noSQL database which is a JSON base.
Why is Firebase bad?
One of the main problems with it, is limited querying capabilities. Its real time the database provides no way to filter capabilities, as it's totally a JSON based file. It makes it pretty difficult to make complex queries.
Get started with Firestore configuration in Firebase
Step 1
Open
Firebase console → Sign-In using Google account → Create New Project → Dashboard
Step 2
In the dashboard's left sidebar, there will be an option of Database. Create Firebase database using that menu link. It will ask for Production version or Test Version. You can choose the one you want. Then after you need to select the database location. After performing these steps the database will be created into the Firebase console and you will be redirected to Database dashboard in Firebase Console.
Step 3
This is how the database is created on Firebase console, now let's create tables into the database. Tables can be create on the click of the Start Collection link on the Database dashboard.
Let's click on it. It will ask you to enter the table name and click on the Next button.
Step 4
Once the table name is added, there will be a screen with the field name, field type and default value. You need to add one by one each detail of table fields, type and values.
So these are the steps to create a database in Firebase using Firestore.
Note
For Deleting a table or document from the database Firebase provides an option from the right side top end on the table field. With the use of your desired options you can either delete a table row or document, and delete specific fields from the table.
Summary
In this article we've learned how to create database in Firebase console using Firestore, create a table with their predefined data types, and how to perform manual data entry from the Firebase console.
In the next article we will learn how to configure Firestore and integrate Firestore API into applications and perform dynamic CRUD operations using their APIs.