Firebase Firestore Tutorial - Data Model (Lesson 2)

  Рет қаралды 33,727

CodeWithChris

CodeWithChris

Күн бұрын

How does Firestore store its data? In this Firestore Tutorial video, I'll show you how to structure and organize your data in a Firestore database.
Your database is essentially "Collections of Documents".
What's a Collection?
It's a group of documents plain and simple.
What's a Document?
A Firestore Document stores your actual data in pairs containing a Field and a Value. Here's the trippy part: a document itself can contain Collections of other Documents! This nesting can go on for 100 levels deep.
To see this stuff in action, watch this Firebase tutorial where I'll dive into a Firestore database backend and show you Collections, Documents and all of the various data types you can store!
Get a customized roadmap for your app and start building it in 7 days:
⚡ codewithchris.com/actionplan/...
All my recording equipment and recommended books:
📚www.amazon.com/shop/codewithc...
To continue learning how to make apps with us, be sure to subscribe to our channel:
⚡kzfaq.info...
And we also have a thriving Facebook community where you can meet like-minded iOS learners and get support on your own iOS app development journey!
⚡codewithchris.com/community/
My guide for Xcode on Windows:
⚡codewithchris.com/xcode-for-w...
For more tutorials on how to build iPhone apps, make sure you subscribe and visit my site where you'll find a community of like-minded learners! Learning something new is always more fun with other people!
⚡Website: codewithchris.com
⚡Instagram: / codewithchris
⚡Twitter: / codewithchris
CodeWithChris is dedicated to teaching beginners and non-programmers all about how to make an app. On the site, you'll find a ton of free resources and tutorials to aid you on your journey to learn iOS development. Many people have successfully picked up Swift, Xcode and app building from my course and materials!
Here's just a sample of the success stories my students have sent in:
codewithchris.com/success-sto...
#Firestore Tutorial #CodeWithChris #CloudFirestore

Пікірлер: 70
@bodyhanger7137
@bodyhanger7137 5 жыл бұрын
Absolutely loving this Chris. Very clear instructions on the layout of collections, sub collections and documents. Thanks mate. ⭐️⭐️⭐️⭐️⭐️
@CodeWithChris
@CodeWithChris 5 жыл бұрын
Thank you for mentioning that. We appreciate it! -Kat
@gabriellindgren3447
@gabriellindgren3447 5 жыл бұрын
Just wanted to say thank you for your videos, you are truly inspiring!
@CodeWithChris
@CodeWithChris 5 жыл бұрын
Thanks! This has been motivating! -Kat
@semilife
@semilife 4 жыл бұрын
A good solid intro to how firebase is organised and a general look at noSQL databases.
@CodeWithChris
@CodeWithChris 4 жыл бұрын
Thank you! -Kat
@jeanozamora5333
@jeanozamora5333 4 жыл бұрын
Thank you for this tutorial. Looking forward to more videos!
@CodeWithChris
@CodeWithChris 4 жыл бұрын
Thank YOU! 😊🙌 -Kat
@arifix
@arifix 5 жыл бұрын
I'm working with Android from last 2 year. It was a long plan to start learning iOS(Swift + Xcode) but due to lack to free quality content it was complex for me. Thanks god, I found you on KZfaq. Your videos are beginner friendly, easy to follow & most importantly its free. I won't mind to pay for advanced iOS development series if you have any. Thanks you so much for making for iOS learning life easier :)
@CodeWithChris
@CodeWithChris 5 жыл бұрын
Thank you for your comment! Glad that the tutorials have helped! We do have a complete course for iOS codewithchris.com/beginnercourse/ -Kat
@ruhithudakara2802
@ruhithudakara2802 3 жыл бұрын
one of the best tutorials ever,thanks a lot
@CodeWithChris
@CodeWithChris 3 жыл бұрын
You're very welcome! - Kat
@guyda
@guyda 4 жыл бұрын
Thank you for this vide. It was quick and easy to follow, well done.
@CodeWithChris
@CodeWithChris 4 жыл бұрын
You're welcome! - Kat
@avneetsingh2010
@avneetsingh2010 3 жыл бұрын
Thanks Chris for making this look easy and understandable :)
@CodeWithChris
@CodeWithChris 3 жыл бұрын
Cheers, Avneet! Happy to help! :-) -Arthur
@christhompson2159
@christhompson2159 4 жыл бұрын
Thank you so much for these videos
@CodeWithChris
@CodeWithChris 4 жыл бұрын
Happy to drop those as often as we can! @AdrienVillez
@bruhmoment3731
@bruhmoment3731 3 жыл бұрын
Thank you so much! Very clear explanation!
@CodeWithChris
@CodeWithChris 3 жыл бұрын
You are so welcome! :-) -Arthur
@ArvyLarope
@ArvyLarope 4 жыл бұрын
12:39 Yep it is, thank you for all of your videos
@CodeWithChris
@CodeWithChris 4 жыл бұрын
Welcome! - Kat
@bhartimaheshwari3512
@bhartimaheshwari3512 4 жыл бұрын
You are literally amazing bro thanks a lot your tutorial helped me a lot ❤️ from india bro
@CodeWithChris
@CodeWithChris 4 жыл бұрын
Our pleasure! 🙌 - Kat
@supriyaj4909
@supriyaj4909 2 жыл бұрын
Very well explained!
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Glad you think so! :) - Pat
@jaggyjut
@jaggyjut 3 жыл бұрын
Thank you. great tutorial
@CodeWithChris
@CodeWithChris 3 жыл бұрын
You are welcome! - Kat
@sundeepsharma9043
@sundeepsharma9043 4 жыл бұрын
You are awsome bro .I always give up but save me . Now I follow your tutorials...Fan frm Swift UI tutorials. Love fromIndia
@CodeWithChris
@CodeWithChris 4 жыл бұрын
Thank you! 🙌 - Kat
@engmahmoudarafat1697
@engmahmoudarafat1697 4 жыл бұрын
thank you
@CodeWithChris
@CodeWithChris 4 жыл бұрын
You're welcome! - Kat
@thomaswahahauw560
@thomaswahahauw560 5 жыл бұрын
Do you use firebase always as a database option?
@nicoferrari1006
@nicoferrari1006 4 жыл бұрын
Hey Chris, I want to make a game and I would like my app to keep information like best score and amount of coins (game money). How can I do that? Cause every time I close the app and re open it again, I lose the information. Thanks a lot and keep doing the great videos! They are very helpful!
@CodeWithChris
@CodeWithChris 4 жыл бұрын
Hello, i suggest you look into database for this so your information gets saved, i suggest go for firebase (kzfaq.info/get/bejne/hrOSpNJo2svDpWQ.html , this is the old tutorial a bit outdated but it will be great as reference) or realm kzfaq.info/get/bejne/htOjfbpmntiyiWw.html - Francis
@raghavmalhotra8573
@raghavmalhotra8573 5 жыл бұрын
I understand if this is too late for you to reply, but how would I access the nickname (from your example above) of the current user of my app?
@CodeWithChris
@CodeWithChris 4 жыл бұрын
if you want to put user data on your app then you should make an entry in a users table (save nickname, lastname, firstname, birthdate, etc) and then just pull it if the login (lets say username or email) matches the one that he typed - Francis
@AlexPetrov108
@AlexPetrov108 5 жыл бұрын
Can you store text paragraphs in document fields of string type? I mean can you have multiple lines of text in it, with some sort of line breaks? Or is it only for a single line of text?
@CodeWithChris
@CodeWithChris 4 жыл бұрын
Hello, the data should be saved as a long string, maybe you can save it along with the formatting like , , etc. and see if that works for you - Francis
@AlexPetrov108
@AlexPetrov108 4 жыл бұрын
Thanks for the tip about the formatting options. Later I found that I need to have " " for line breaks and " " for Windows line breaks in the text data I read from a txt file into a String variable. Or in other words, if I read a multiline text data from a txt file into a single String variable it will be automatically stored with those kinds of line breaks and can be displayed as multiline label when the number of lines is set to 0
@adarlatak1543
@adarlatak1543 4 жыл бұрын
@@AlexPetrov108 Hey Alex I was wondering if you could explain to me how you stored text paragraphs on firbase database? what it looked like and did you just save it as a string? Thank you soo much!!!
@kdtechniquesofficial6153
@kdtechniquesofficial6153 2 жыл бұрын
Hello, Chris. can I use the same document id in the parent collection for the document ID in the sub collection? That means even though you have so many sub-collection in one parent collection, their document ids are the same. Can I ?
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Hello! Kindly post your question in our CodeCrew forum so that our technical support staff can guide you. Go here: codecrew.codewithchris.com. Thanks for learning with us! -Arthur
@rghdsa8748
@rghdsa8748 3 жыл бұрын
thank you for your tutorial 💕 I wanna ask if I can save image in collection ? the picture is for user profile
@CodeWithChris
@CodeWithChris 3 жыл бұрын
"Hello, yes you can save the image but it will be in firebase storage, there should be a link that directly connects to the file once done uploading, if you are interested we have a sort of ""photo social media app"" that is part of our paid course, check the what we have to offer here learn.codewithchris.com - Francis"
@matt4932
@matt4932 4 жыл бұрын
How can I create Unique Usernames with Firebase, I've been looking all over the internet for information on this? Anything info helps!
@CodeWithChris
@CodeWithChris 3 жыл бұрын
Hello, if you. meant for authentication then there an option for email or some other things, it should be able to create any accounts made automatically. or you can make a "users" table and create your own list of authenticated users - Francis
@TheNamesJT
@TheNamesJT 2 жыл бұрын
I wish he would of use better naming convention for this because a and doc a doesn't help me visualize a real scenario like the one i'm having trouble with. Basically on the home page I want to load user data so in a user collection each user would have a collection and eventually would like to load every user collection on the home page. Also that random id for each document is confusing as well. So if you plan on having multiple users is each document a user? so when there are multiple users you would have a collection names users and each document is 1 user and when a new user gets added to the db it creates a new document?
@CodeWithChris
@CodeWithChris 2 жыл бұрын
"Hello, yes, think of the DocumentID in firebase as a type of PRIMARY KEY, its the unique identifier of your record/row.. ofcourse you can also choose to override this and use your own DocumentID pattern if you feel like it - Francis"
@itsthomasYT
@itsthomasYT 4 жыл бұрын
I can find (Lesson 2) and (Lesson 3). But I can't find (Lesson 1). Could you please point me to part one of this series?
@CodeWithChris
@CodeWithChris 4 жыл бұрын
Here's the playlist: kzfaq.info/sun/PLMRqhzcHGw1ZsFRLAWa_Axx7daXteynjh - Kat
@hanadanefa7837
@hanadanefa7837 4 жыл бұрын
you might want to give an example on how to actually do it in firestore, like converting relational database into this firestore database that would be much better instead of a, b that has no actual representation.
@CodeWithChris
@CodeWithChris 4 жыл бұрын
Hello, thanks for this feedback. This is helpful. - Kat
@WordPressU
@WordPressU 4 жыл бұрын
using the a and b format really didn't help me a SQL programmer because it didn't give me context. We are all about relationships and structure so if you made it a more real scenario I would have been able to connect the dots...this is probably excellent for someone fresh into databases.
@CodeWithChris
@CodeWithChris 4 жыл бұрын
Hello Elise, thanks for the feedback! We'll take note of that. Kat
@yossihayored2504
@yossihayored2504 2 жыл бұрын
👍👍👍👍👍
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Thank you! -Arthur
@miningcrypto7604
@miningcrypto7604 5 жыл бұрын
how to protect firebase data from hack
@user-if6bg6bk9z
@user-if6bg6bk9z 5 жыл бұрын
If your email hacked = your database hacked
@miningcrypto7604
@miningcrypto7604 5 жыл бұрын
haha no hacker hacke using api and token
@CodeWithChris
@CodeWithChris 5 жыл бұрын
Hello, google should automatically do this for you, only the apps (com.sample.sample) set in firebase will be able to access your database, not to mention it also needs the config file provided by firebase to continue, so i think its pretty safe. unless they hack your app itself and manipulate the data inside it then your safe - Francis
@RichardGetzPhotography
@RichardGetzPhotography 5 жыл бұрын
this was a bit hard to watch. You should have had a use case put together prior to the video.
@CodeWithChris
@CodeWithChris 5 жыл бұрын
Hello, this lesson was just to demonstrate how firebase works, theres really almost no easy way to demonstrate all the datatypes and collections and relate it to something easy to understand in the real world so it was made like this - Francis
@RichardGetzPhotography
@RichardGetzPhotography 5 жыл бұрын
@@CodeWithChris Easy way? How about a scripted way? Chris fumbling around distracted from the video.
@ZoHaiBZoBiofficial
@ZoHaiBZoBiofficial 4 жыл бұрын
Agree with that.
@japonska2009
@japonska2009 Жыл бұрын
nice video, but you could have used a better example instead of a,b, sub a/b...makes it all make no sense.
@hasansh8083
@hasansh8083 2 жыл бұрын
You title it Data Model, but you only illustrate creating some obvious/trivial fields ;(
@CodeWithChris
@CodeWithChris 2 жыл бұрын
Thanks for the feedback! -Arthur
Firebase Tutorial - Create, Read, Update, Delete data (Lesson 3)
28:48
Beginner Guide to Flutterflow for Mobile App Part 2: Database, Backend Query and Document Reference
11:02
Nomo Codes - Build apps with no-code & AI
Рет қаралды 6 М.
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 8 МЛН
Inside Out Babies (Inside Out Animation)
00:21
FASH
Рет қаралды 23 МЛН
Они так быстро убрались!
01:00
Аришнев
Рет қаралды 2,2 МЛН
Эффект Карбонаро и нестандартная коробка
01:00
История одного вокалиста
Рет қаралды 10 МЛН
How to Setup Firestore database for your SwiftUI app (2021)
26:32
CodeWithChris
Рет қаралды 25 М.
Intro to Databases (MySQL, CloudKit, Firebase, Core Data, Realm)
20:43
Firestore Data Modeling - Five Cool Techniques
11:44
Fireship
Рет қаралды 254 М.
Conceptual, Logical & Physical Data Models
13:45
DataAcademy.in
Рет қаралды 469 М.
Collection Group Queries in Firestore
8:19
Fireship
Рет қаралды 87 М.
How to show live Firebase data in your Flutterflow app
27:20
FlutterFlow
Рет қаралды 107 М.
Setup Cloud Firestore Database 2021 (SwiftUI, Swift Package Manager)
15:16
НРАВИТСЯ ЭТОТ ФОРМАТ??
00:37
МЯТНАЯ ФАНТА
Рет қаралды 8 МЛН