Skip to main content

Firestore

Firestore is a scalable NoSQL document database built for automatic scaling, high performance, and ease of application development.

NoSQL Document Model

Unlike relational databases that map data onto highly rigid Columns and Rows, Firestore uses flexible Collections and Documents.

// Collection: Users
{
"docId1": {
"name": "Midhun",
"role": "Admin",
"active": true
},
"docId2": {
"name": "Jane",
"role": "User",
"active": false,
"lastLogin": "2023-10-01" // Flexible schema allows new fields!
}
}

Realtime Updates

Firestore supports realtime listeners. Instead of executing arbitrary REST API pulls every 5 seconds to check for database updates, the client application can attach an open socket stream. When data changes in the database, Firestore pushes the update down to the client device in milliseconds.