Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Create One To One Relationship MongoDB With NodeJS and Mongoose

ER Diagram One to One Relationship MongoDB with Mongoose and NodeJS

Data Base Input

Change value of key database on server.js

Example:

For Brand Table :
{
    name: "Microsoft"
}

For Device Table :

{
    name: "Surface Book"
    storage: "256GB"
    color: "Grey"
    code: 512GB // key code is automatically generated
    brand: {name: "Microsoft"} // automatically by reference on Brand Table
}

So you just change key name on Brand table, and change keys name, storage, color on Device table.

Run Code

$ cd
$ npm run dev

About

Create One on One Relationship MongoDB with NodeJS and Mongoose.

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages