#16 Relations in MongoDB | Fundamentals of MongoDB | Complete MongoDB Course 2022

  Рет қаралды 31,378

procademy

procademy

Күн бұрын

Пікірлер: 15
@milandash-mg4gh
@milandash-mg4gh Ай бұрын
most important video...
@sharathkk1807
@sharathkk1807 11 ай бұрын
amazing explanation 🤝
@bandi642
@bandi642 8 ай бұрын
in references, how does costumer know that id put in the purchases list is from the product collection? or does that id need to be unique from across all collections in the database?
@snehaljagtap
@snehaljagtap Жыл бұрын
Thanks for the swift explanation.
@noormuhammad888
@noormuhammad888 11 ай бұрын
Question: What if the quantity of a purchased product is more than one. How can the reference way of creating document handles such case?
@user4678-c9x
@user4678-c9x 11 ай бұрын
Probably by storing an object in the array instead of just an id. For example { “quantity”: 4, “itemid”,”19768hdi65”}
@user4678-c9x
@user4678-c9x 11 ай бұрын
Or even better turn the array into an object and do products: { “itemid”: { itemid: “itemid”, quantity:4}}. Then you can refer to user.products[itemid].Quantity to get quantity and and that.itemid to get the id
@salmanmohammad4706
@salmanmohammad4706 Жыл бұрын
Great explanation ❤🔥😊
@augustocastro376
@augustocastro376 Жыл бұрын
Amazing video
@archuser532
@archuser532 Жыл бұрын
nicely explained
@samyamtimsina
@samyamtimsina 2 жыл бұрын
thanks
@MicheleHjorleifsson
@MicheleHjorleifsson 9 ай бұрын
That is bad design, you never want that reference to be potentially infinite. Better to have an orders collection that contains the Customer identifier and the list of products under an order id
@southredmondtoxik1885
@southredmondtoxik1885 Жыл бұрын
@Pareshbpatel
@Pareshbpatel Жыл бұрын
{2023-08-23}
@75snambi
@75snambi 10 ай бұрын
Both are wrong approaches though.
Relation in database mongoDB
6:04
Hitesh Choudhary
Рет қаралды 52 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 30 МЛН
She made herself an ear of corn from his marmalade candies🌽🌽🌽
00:38
Valja & Maxim Family
Рет қаралды 18 МЛН
MongoDB Crash Course
29:59
Web Dev Simplified
Рет қаралды 735 М.
MongoDB Schema Design Best Practices
9:58
MongoDB
Рет қаралды 169 М.
CRUD API Tutorial - Node, Express, MongoDB
1:33:14
freeCodeCamp.org
Рет қаралды 334 М.
MongoDB Crash Course - Schemas and Relationships
46:28
The Full Stack Junkie
Рет қаралды 43 М.
Connect Two Tables in MongoDB Using Node & Express
22:54
Daily Tuition
Рет қаралды 12 М.
Learn MongoDB in 1 Hour 🍃
1:00:00
Bro Code
Рет қаралды 1,2 МЛН