DEV Community

Cover image for What is Firebase ?
Kunal Agrawal
Kunal Agrawal

Posted on

What is Firebase ?

This article is only for beginners

Firebase is a suite of services offered by google like
let's breakdown those services in three different sections.

Before you begin, here in this article 'app' means 'web app' like pwa, react, angular, 'flutter app', 'android app' depending upon your project. Firebase offers services in all platforms.

1. Build

Image description
Build services contains services like Realtime database, Firestore, Authentication, ML, Storage, Cloud Functions, App Check.

1. Authentication

Image description
Firebase offers lot of different ways to authenticate user in your app. In the above image you can see, you can authenticate user with Google, Facebook, Twitter, Git-Hub, and also can create your own authentication for user.

2. Database (Firestore)

Image description
Firestore is a database from google, here you can store your data in form of collections and document. "Inside collection there may be a collection or a document and a document can also contain a collection".
First of all you need to understand terms like, collection, sub-collection, document, field, data type.
Image description

Document - It contains data in form of key-value pairs, key can be considered as field name and value as data.
Collection - It contains multiple document generally of same structure, each document has its own unique id.
Sub-Collection - Collection inside a document is called a sub-collection.
Image description
Data type - Firestore contains some predefined data types so that it can perform query faster, like Timestamp, geopoint, reference, if you're using typescript you can also get there interfaces from 'firebase/firestore'
Firebase node package completely supports typescript.

Here you can perform various types of query like compound query, indexing like composite and single indexing.

Also in firestore you can use security rules, so that only authenticated or desired user can access database.
we'll learn more about security rules later in this article.

3. Realtime Database

Image description
Realtime database is different from firestore, here updating, writing and reading data is more important than querying or indexing.

This article is not complete.

Top comments (0)