Skip to content

NoSQL Relationships

NoSQL Relationships Architecture

Fig 1: NoSQL Relationships Architecture

NoSQL doesn’t mean no relationships. It just means we model them differently than robust SQL joins.

In this chapter, we level up our Project feature from “single collection CRUD” to “portfolio-grade data modeling” by adding powerful relational concepts:

  1. Embedded Data A project can have an array of simple string Tags nested directly inside it.
  2. Referenced Data A project can be assigned to a specific reusable Category document stored in a different collection.

By the end of this module, we will implement an admin edit form that fully supports creating models and selecting relational assignments, linking it all cleanly in the database and rendering it on our views.

Starting Demo Repo - Continuing from Update and Delete lesson.

Before writing code, we need to decide how to relate our data together in MongoDB.