Google Firestore on Firebase
-
Google Firebase = is a set of cloud-based development tools that helps mobile app developers build, deploy and scale their apps. This includes Firestore
Google Firestore = "a NoSQL document database that lets you easily store, sync, and query data for your mobile and web apps - at global scale."
-
Cloud Firestore is a NoSQL, document-oriented database. Unlike a SQL database, there are no tables or rows. Instead, you store data in documents, which are organized into collections.
Each document contains a set of key-value pairs.
Cloud Firestore is optimized for storing large collections of small documents.
All documents must be stored in collections.
Documents can contain subcollections and nested objects, both of which can include primitive fields like strings or complex objects like lists.
-
STEP 1: create a Google Firebase account and Project
-
give it a meaningful name. You should be able to associate your Google cloud credits in billing ---never use a credit card.
STEP 2: create a Google Firebase account and Project
STEP 2.1 : create the Firebase database. You can keep the default id (you will need to look it up later to properly connect). For the Security mode ONLY TO START WITH YOU CAN DO TEST MODE ---which means you can write code to read/write without authentication ---very dangerous. You can change this later ---Or if you already know the authentication process just selct the PRODUCTION MODE
STEP 2.2: Create your collections --name them something appropriate.
STEP 2.2: Create a Document --- I have choosen below to use an Automatically created unique ID for this document. I have then entered in 2 "name or field/value" pairs for name and email for this users Document. In Firestore documents in the same collection (i.e. users ) can have a different number and type of fields