In this tutorial, I will show you how to deal with MongoDB Many to Many Relationship which is an important and complicated Relationship that you will use in most database structures. Then we’re gonna use Mongoose library to make a MongoDB Many to Many Relationship example.
In this tutorial, I will show you how to make Angular 10 connect to MongoDB with Node.js Express. We’re gonna build a full-stack (MEAN stack) CRUD Application in which, the back-end server uses Node.js + Express for REST APIs, front-end side is an Angular App with HTTPClient.
In this tutorial, I will show you how to build a MEVN stack (Vue.js + Node.js + Express + MongoDB) example with a CRUD Application. The back-end server uses Node.js + Express for REST APIs, front-end side is a Vue client with Vue Router and axios.
In this tutorial, I will show you one of the most important Relationship in MongoDB that you will use in most database structures: One-to-Many Relationship. You will also know 3 criteria to choose Referencing or Embedding for improving application performance. Then we’re gonna make some MongoDB One-to-Many Relationship examples using Mongoose library.
Express is one of the most popular web frameworks for Node.js that supports routing, middleware, view system… Mongoose is a promise-based Node.js ODM for MongoDB that provides a straight-forward, schema-based solution to model our application data along with built-in type casting, validation, query building, business logic hooks… In this tutorial, I will show you step by step to build Node.js Restful API for CRUD operations using Express, Mongoose with MongoDB database.
You should install MongoDB in your machine first. The installation instructions can be found at Official MongoDB installation manual.
In this tutorial, we’re gonna build a Node.js & MongoDB example that supports User Authentication (Registation, Login) & Authorization with JSONWebToken (JWT). You’ll know:
- Appropriate Flow for User Signup & User Login with JWT Authentication
- Node.js Express Architecture with CORS, Authenticaton & Authorization middlewares, Mongoose ODM
- Way to configure Express routes to work with JWT
- How to define Mongoose Models for Authentication and Authorization
- How to use Mongoose to interact with MongoDB Database
– Node.js, Express & MongoDb: Build a CRUD Rest Api example
– MongoDB One-to-Many Relationship tutorial with Mongoose examples
– MongoDB Many-to-Many Relationship with Mongoose examples
Relationship in NoSQL database is not the same as traditional SQL database. That’s why you need to implement basic types of associations (such as One-to-One, One-to-Many, Many-to-Many) yourself. In this tutorial, I will show you 2 ways to make One-to-One Relationships, then we will implement Mongoose One-to-One relationship example in a Nodejs & MongoDB project.