Playing with Firestore | Scribe

    Playing with Firestore

    • Hafeez Baig |
    • 45 steps |
    • 5 minutes
    1
    Sign in into the **Google Cloud Console**
    2
    Type "**Firestore**" in the search bar and click on the **Firestore** option
    information ordinal icon
    **What is Firestore?**\ \ **Firestore** is a NoSQL cloud database by Google Cloud that stores, syncs, and queries data in real-time, offering offline support and powerful querying capabilities. It is integrated with Firebase for scalable, flexible app development.
    3
    **Firestore** wizard will open, click on the **CREATE DATABASE** button
    information ordinal icon
    **What is Database?**\ \ A **database** is an organized collection of structured data that can be easily accessed, managed, and updated. It typically uses a database management system (DBMS) to handle data storage, retrieval, and manipulation. Databases can be relational (using tables and SQL) or non-relational (NoSQL) and are used to support various applications, from small personal projects to large-scale enterprise systems.
    4
    **Create database** wizard will open, select the option **Native mode** and click on the **CONTINUE** button
    information ordinal icon
    **What is Firestore mode: Native mode?** **Firestore Native Mode** is a NoSQL database that offers real-time data synchronization, offline support, and flexible, hierarchical data storage. It organizes data into documents and collections, providing powerful querying capabilities and ensuring instant updates across all clients. Ideal for dynamic web and mobile applications, it supports seamless offline access and efficient data retrieval.
    5
    On the **Database ID**, type **(default)** in the input text field
    6
    Scroll to the **Location type** section and select the option **Region**
    7
    Scroll to the **Region** dropdown and select the Region close to your location
    information ordinal icon
    **What is Region?**\ \ A **region** is a geographic area where cloud services are hosted, consisting of multiple data centers. It allows for the deployment of applications and services close to users for lower latency and improved performance. Regions are used to ensure data redundancy, availability, and compliance with regional regulations.
    8
    Scroll to the **Secure rules** section and select the option **Production rules**
    information ordinal icon
    **What are Production rules?**\ \ In Google Cloud Platform (GCP), **production rules** often refer to configurations or policies applied in services like Cloud Firestore or BigQuery to manage data and operations in a production environment. For instance, in Firestore, production rules might define security rules for data access and validation. In BigQuery, they could involve data retention policies and query execution settings. Essentially, production rules help ensure that services are secure, efficient, and adhere to operational standards in a live, production environment.
    9
    Scroll the page and click on the **CREATE DATABASE** option
    information ordinal icon
    Congratulations! you have successfully created a Firestore Database
    10
    **Database (default)** wizard will open, click on the **START COLLECTION** button
    information ordinal icon
    **What is a Collection?**\ \ In Google Cloud Firestore, a **collection** is a grouping of documents. It acts as a container for related documents, which are individual records of data. Collections help organize and structure data in a hierarchical manner, allowing for efficient storage, retrieval, and querying of related information.
    11
    On the right side **Collection ID** wizard will open, type Collection ID as - "**todos**"
    12
    Scroll to the **Document ID** section, here the Document ID will be Autogenerated
    information ordinal icon
    **What is Document ID?**\ \ A **Document ID** in Google Cloud Firestore is a unique identifier for a document within a collection. It allows you to access and reference specific documents, ensuring that each document can be uniquely identified and retrieved within its collection. Document IDs can be automatically generated by Firestore or manually specified by users.