Firebase Realtime DB vs Firestore 🔥

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] welcome back to how to firebase you may have noticed that I've been missing for just about a year two things happen first I got super busy and started the full-time job so my free time has been cut way way back second I decided to improve my video skills and produce a full-blown firebase course I'll be teasing that new content here in the coming weeks and months the course will be a paid experience which means that I'm spending a lot more time on each video but I'm still committed to open source therefore you can find my written course content on full stack firebase comm so hop on over to full stack firebase comm to follow along as I write and publish the course is taking a lot longer than I'd hoped and I need to keep publishing stuff to youtube so when I come across a topic that doesn't fit cleanly into the course a cut a video and post it here and that brings us to today's topic firebase vs. fire store I know a lot of you are super happy with the firebase real time database you're probably wondering why you'd want to mess with anything else so here we go firebase is real time database is a JSON datastore it's totally unstructured which is a blessing and a curse what makes the real time database popular is it's awesome client libraries client libraries let you connect from your app be it web Android or iOS directly to the database so you could save your JSON directly to the real time database without transforming it at all and you could quickly fetch your data back with real time change detection the real time database made our lives so much easier five stores built to work side-by-side with the real time database using fire stored does not mean abandoning the real time database but you'll likely find that it's better for most tasks think of fire store as the next generation of the real time database it has great client libraries it has security rules it works with cloud functions for firebase but fire store is structured data and fire store supports complex queries and fire store scales based on your result set not on your collections record count so let's back up and cover these differences one by one first off fire store is a document collection database if you've used Google Cloud datastore or MongoDB then you'll be familiar there's a strict pattern to fire store first you define a collection then you add documents and each document supports sub collections which contain their own documents so you can nest data much like you did in the real time database but it's much more structured think collection the document then collection then document it's a new pattern but it's not hard to figure out a second fire store has client libraries just like the real time database the fire store client library enables you to execute single queries or listen to a document or collection for changes unlike the real time database your fire store queries can have multiple where and order by statements and unlike the real time database your fire store queries remain performant for massive collections the real time database gets cranky if you force it to query over millions of records fire store doesn't care how complicated your query is or how many records are in the collection but fire store does care about how many records you returned this is one of the main differences between firebase and fire store the real time database always build you based on connection count and data transfer fire store does not bill you by connected client count but fire store does bill you by the volume of data transferred and fire store builds you by your read write and delete counts so every record that you pull from the database counts against your reads don't get too nervous because reads are six cents for a hundred thousand however you need to recognize that fire store scales based on the result set so if the feature you're building has lots of fast small reads and writes stick to the real time database but you'll find that most app features are much easier to build on fire store I found myself using fire store for about 95 percent of my apps data needs I keep the real time database in my back pocket for those edge cases where it's still the best solution but more and more I'm using fire store for all of my new features I hope that clears up the differences between firebase and fire store I'm sure there will be questions so fire away in the comments below thanks for watching and make sure to subscribe to get updates on my new videos and I'll let you know how my course is going you [Music]
Info
Channel: Chris Esplin
Views: 39,098
Rating: undefined out of 5
Keywords: Firebase, JavaScript, Google Cloud Platform, Firestore
Id: TmXct7seeBY
Channel Id: undefined
Length: 4min 35sec (275 seconds)
Published: Fri Mar 09 2018
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.