Untitled

Maximum size of a document is 1MB.

Advantage over SQL database? Joins are not CPU efficient at a wide-scale.

Prerender data for read efficiency. Think about how it’s going to be consumed by the app. (Make the path of least resistence for your data)

Don’t be afraid to create large collections if needed.

Duplicating data can be okay sometimes (can sometimes create more efficient document reads).

But if you decrease the complexity of the read, you will usually increase the complexity of the write!

Cloud functions for aggregating data.

Set-up

https://firebase.google.com/docs/web/setup?hl=en

Storage

for text/structured data (objects) → cloud firestore

for images and the like (files) → cloud storage for firebase

Many to many relationship

Untitled

Auth

Get or listen to the current user.