Maps, Arrays and Subcollections, Oh My! | Get to know Cloud Firestore #4

preview_player
Показать описание
Is your Cloud Firestore data structure set up correctly? Cloud Firestore supports Subcollections, Maps, and Arrays, all of which can be useful, but it's sometimes difficult to know when to use which one. Why create a subcollection when you could just create an array of maps? Or a map of maps? When is it appropriate to use one over the other? And what would work best in your app?

In this episode of Get to Know Cloud Firestore, Todd does his best to get your questions answered and gives you all the pros and cons, so you can structure your data the right way.

Рекомендации по теме
Комментарии
Автор

You guys have mastered the art of teaching.

IsaacAsante
Автор

This is one of the best explanations I've ever seen on data structures. Not just for firebase, but noSQL in general. Thank you.

Zakariat
Автор

So the basic rule of thumb might be "Shape your data like your queries". Data that are usually queried together should go together and hierarchies that exist in your app should probably also be mirrored in the data.

asdfghyter
Автор

Hey todd from 2019 you forgot to make a new caption for the video after edit

AymanShaabanELsayedDEVELOPER
Автор

love the pace of these videos. All teaching videos must be made like this.

bahadirbalban
Автор

Great video, thank you! I'm just learning and designing my NoSQL model and every one of these videos teach me exactly what I wanted to know. I have one complain: when you update the original video please update the subtitles too!

GustavoDiSalvo
Автор

I swear this guy is the only part of any google software I like.

nickadams
Автор

Could you please next time cover topic of timestamps, dates in Firestore / Cloud functions! I mean getting, storing and sending to clients! Thanks in advance!

boon_keng
Автор

Security rules need to be taken into account when setting up data structures as well. I just found this out the hard way. Luckily I'm still in the dev phase so can pivot to a different data structure that allows me to set different security rules for sub-collections vs the parent collection.

ecofriend
Автор

"This tends to put your app in a state I like to call 'uninstalled'" hahahaha

klutch
Автор

Geopoint will have their own querys soon? Or not at all?
Like distance between geopoints or querys by proximity?

Really waiting for those!

marcelogamer
Автор

Amazing video! That ending was HILARIOUS

rafidhoda
Автор

This is a very good explanation for Firestore.
Now I know which I should use or not use on Cloud Functions
by knowing these rules on Firestore. I think I can learn more by watching the whole series.

reycoseguma
Автор

Great teaching experience guys, great job Todd. The only thing that i am skeptical all this time with Firestore is the limitations of upgrading. Let me explain better. We build an app today with specific needs, let's say for example a Charles Dickens' app where we need to get the books titles only. After users feedback we decide to upgrade our app and add "search by character's occupation" function. In these changes (upgrades) of our app, we need to re-design our entire db "schema" and maybe migrate old db structure to a new one... It sounds tricky

PeriPC
Автор

Great explanation! I LOVE that you also update the videos! That's great!

Ballistah
Автор

5:50 Aren't 2 million reads = 1.20$?

codinginflow
Автор

I find that using sub-collections are great for data privacy because you can have different rules for a document and its sub-collections. Good data structures plus strong rules equals wicked privacy kung fu.

michaeloosthuizen
Автор

Love love love love love all these Firebase videos! Awesome! Keep going!

roquefore
Автор

Is 8:54 a typo? I'm guessing that both subcollections should be named "characters". Thanks, this video helps!

toastrecon
Автор

The distinguishing feature of arrays is index-based access, which Firebase doesn't support. Seems like a better name for "arrays" would have been "sets" (or perhaps "multisets" or "bags" if repeated values are supported). Or am I missing something?

TedHopp