3d cartoon hands holding a phone

Unlock full course by purchasing a membership

Lesson 5

A Brief Introduction to Document-Based NoSQL Databases


A Brief Introduction to Document-Based NoSQL Databases

Firestore is a document-based NoSQL database, and in order to properly understand how to use it we will need to cover some basic concepts. Our use of the database will be rather simple, so it is not critical that you have a thorough understanding of how a document-based database works, but it will certainly help to understand at least a little.

Before we get into specifically discussing “document” databases, I think it is useful to quickly cover some other types of NoSQL databases (which basically covers anything that is not a typical “relational” style database like MySQL). Some types of NoSQL databases include:

  • Key-Value (redis, Amazon DynamoDB, memcached)
  • Columnar / BigTable (HBase, Cassandra, Amazon SimpleDB)
  • Document (Firestore, CouchDB, MongoDB, Riak)
  • Graph (Neo4J, AllegroGraph, InfoGrid)

Two commonly used NoSQL database structures are Key-Value and Document (like the Firestore database we will be using). Key-Value and Document-based databases are both very similar in nature, but there are differences.

A Key-Value database is a simple way to store values indexed by a key. You would already be familiar with this concept if you have used the browser’s local storage to store data. To use the browser’s local storage as an example, you would set a value on a key like this:

localStorage.setItem('name', 'Josh');

and then you could later retrieve the value by using the key like this:


Thanks for checking out the preview of this lesson!

You do not have the appropriate membership to view the full lesson. If you would like full access to this module you can view membership options (or log in if you are already have an appropriate membership).