Answer the question
In order to leave comments, you need to log in
What is the best way to implement data storage model in MongoDB?
Good afternoon, there is such a task. Implement food delivery from restaurants. As a result, I decided to make the following structure for the database
{
"restaurant": {
"name": "Restaurant 1",
"products": [
{
"_id": ObjectId(),
"name": "name1",
"price": 850
},
{
"_id": ObjectId(),
"name": "name2",
"price": 850
}
]
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question