Firebase Databases

Firebase, a platform by Google, is a treasure trove of tools designed to make app development simpler, especially for mobile developers. It offers two powerful NoSQL databases, Cloud Firestore and Realtime Database. These databases use JSON, a user-friendly data format, making it easier to handle a wide range of data types.

SQL & NoSQL Databases: Ultimate Guide to Choosing the Right Solution
Explore SQL vs NoSQL databases, their differences, popular DBMS choices, and factors to consider when selecting the best database management system.

Which Firebase Database to go?

Cloud Firestore vs Realtime Database
Cloud Firestore vs Realtime Database

Cloud Firestore shines when dealing with complex, large-scale data. It organizes data into collections of documents, similar to JSON objects, making data management a breeze. Cloud Firestore allows for the creation of collections within documents, providing a clear hierarchy and greater control over intricate data systems. If your project involves complex data relationships or requires robust querying and sorting, Cloud Firestore is your go-to option.

On the other hand, Realtime Database stores data as a single JSON tree. While this structure is straightforward and ideal for real-time applications, it can become challenging to manage as data complexity and size increase. If your project demands real-time syncing or is relatively small and straightforward, the Realtime Database could be your perfect match.

In essence, the choice between Cloud Firestore and Realtime Database depends on the specific needs and scale of your project. Now, once you've chosen Cloud Firestore, how do you interact with it? Let's explore the Firestore GUI tools that can make your life easier.

Firestore GUI Tools: Short Overview

Managing Firestore data can be approached in two ways: using Google's official Firebase Console or opting for third-party GUI tools.

Firebase Console is a web interface that integrates seamlessly with other Firebase services. It's a comprehensive solution that allows developers to manage Firestore data directly from their web browser. This one-stop solution for Firebase project management is robust and reliable, making it a popular choice for many developers.

However, there are also third-party GUI tools that offer a different approach to Firestore data management. These tools, such as Refi App, Retool and Firefoo, provide additional features and customization options. For instance, Refi App is a free, open-source tool that simplifies Firestore data management with its unique features. Retool is a low-code platform that allows developers to build custom GUIs for Firestore data, enhancing flexibility for complex projects. Firefoo, a Firestore desktop client, offers real-time updates, powerful filtering, and data import/export capabilities.

In this article, we'll be focusing on the Refi App, exploring its features, drawbacks and setup. While the Firebase Console provides a comprehensive solution, third-party tools like Refi App offer extended functionality and customization, catering to a wide range of developer needs.

Firebase Console

Firebase Console is the most common tool among developers for managing Firestore data. It offers a powerful and intuitive web interface, allowing you to effortlessly create, monitor, and modify your Firestore data. With its user-friendly design, Firebase Console simplifies the process, making it an excellent choice for handling basic tasks with ease.

The database in the console looks like the one shown in the screenshot below.

Firebase Console
Firebase Console

The first column of the table lists the database collections; you can create them without any limit. In this example, the collections are likes, users, videos, videos_with_issue. Collections store documents that are represented as JSON format files. They are listed in the second column of the table. The third column shows the document itself (the JSON file) with its fields.

What are the main advantages?

The benefits of using the Firebase Console to work with databases include the following:

Integrated with Firebase: Firebase Console is directly integrated with Firebase, allowing you to manage your entire Firebase project from one place.

Web-based Interface: As a web-based interface, it can be accessed from any device with an internet connection, providing flexibility and convenience.

Real-time Updates: Firebase Console supports real-time updates, allowing you to see changes to your Firestore data as they happen.

What are the disadvantages?

Despite the notable benefits of the Firebase Console for Firestore, such as its seamless integration with Firebase and real-time updates, it also presents certain challenges. It's important to note that these challenges can impact the ease of use and efficiency of managing Firestore data. Let's delve into some of these potential obstacles.

Document Creation: Creating a document can be cumbersome as you need to manually write all JSON fields with their types. This process can be time-consuming and prone to errors.

Creating a document
Creating a document

Field Creation: Each field is created separately, and there's no clear overview of which fields have been created and which ones are still pending. This can lead to confusion and oversight.

Field Type Confusion: The interface can make it easy to confuse field types, such as Map and Array, potentially leading to data inconsistency.

Displaying Map type
Displaying Map type

Database Backups: Backing up your database requires using Google Cloud Storage. The absence of a straightforward JSON file import/export function can complicate the backup process.

Bulk Editing: If you need to edit one field for multiple documents, you'll have to go through each document individually. The display of documents can be inconvenient and visually unappealing, making this process even longer and more difficult.

Refi App

In order to solve the above web console problems for Cloud Firestore, Refi App, a third-party GUI tool for Firestore, comes to the rescue. This free open-source tool offers several key features.

Table-like Display: Refi App presents all documents in a collection in a table format. This familiar layout simplifies the process of creating and editing documents.

Refi App
Refi App

Preview and Undo Changes: Much like git, Refi App allows you to preview changes to collections and even undo them if necessary. This feature enhances control over data manipulation.

Preview changes
Preview changes

Built-in VS Code Editor: With Refi App, you can edit and create a document as a JSON file using the built-in VS Code editor. This feature streamlines the document creation process.

Creating a document as a JSON File
Creating a document as a JSON File

Keyboard Shortcuts: Refi App supports handy keyboard shortcuts, which can significantly speed up your workflow.

Complex Queries and Data Sorting: Refi App allows you to write complex database queries and sort data, providing a more comprehensive toolset for managing Firestore data.

Sorting data
Sorting data

RefiApp, while a powerful tool, does have room for improvement. For example, when filtering a field of type number it doesn't allow to add floating point numbers. To do this, you have to change the type in the query to string, write your number, and then change it back to the number type. Additionally, users may encounter occasional bugs. However, the developer is actively maintaining the project and addressing these issues.

Despite these minor drawbacks, RefiApp remains an excellent tool for working with Cloud Firestore. Its user-friendly interface and convenient features make it a more appealing choice compared to the web console for Cloud Firestore.

How to get started with Refi App?

1. The first step is to download the application by going to the link.

👉
In case the most recent version of the application doesn't offer an archive for your OS, opt for a version that does provide such an archive. For Windows download the .msi archive, for Mac OS .dmg, for Linux .deb.

2. Then it is required to download credential file from Firebase Console. Go to Project settings (left gear).

Project settings
Project settings

3. Go to the Service accounts tab.

4. Click the Generate new private key button. In the dialog box that appears, confirm the key generation. This will start downloading the JSON file.

5. Next, open RefiApp, drag and drop the downloaded JSON file into the box.

Choosing a credential file
Choosing a credential file

6. Click the Connect button.

You are ready to work with your database! In the next sessions, your database will be saved. You just need to click the Connect button.

Retool and Firefoo

Retool and Firefoo are notable third-party GUI tools for Firestore data management. Retool, a low-code platform, allows developers to create custom GUIs, offering flexibility for complex projects. However, its advanced features may require a learning curve. Retool has a free tier for individual use, with paid plans starting at $10 per month for more features and team collaboration.

Retool
Retool

Firefoo, a Firestore desktop client, offers real-time updates, powerful filtering, and data import/export capabilities. Its intuitive interface simplifies Firestore data management, but being a desktop client, it lacks platform independence. Firefoo offers a free trial, with pricing starting at $9 per month.

Firefoo
Firefoo

Both tools provide valuable alternatives to the Firebase Console, with the choice between them depending on your specific needs and budget.

Summary

Firebase offers two NoSQL databases: Realtime Database and Cloud Firestore. While Realtime Database operates like a single JSON file, Cloud Firestore's structure of collections and documents makes it more scalable and flexible for complex projects.

While the Firebase Console is a comprehensive tool for managing Firestore data, it does have its limitations. For instance, document creation can be cumbersome, and there can be confusion over field types. This is where third-party tools like Refi App, Retool, and Firefoo come into play.

Each of these tools offers unique features and benefits that address the limitations of the Firebase Console, enhancing the overall user experience. The choice of tool will depend on your specific needs and preferences. With a variety of options available, finding a tool that fits your project is more feasible than ever.

Share this post