Answer the question
In order to leave comments, you need to log in
Is this design suitable in mongodb?
There is such a database in a relational form. I'm trying to bring it to the mongodb format. Tell me how best to design such a database in mongo. I don’t understand how to properly store grades in a student’s discipline?
I got it like this:
student
{
_id: ..,
lname: ..,
fname: ..,
mname: ..,
passport: { num: .., seria: ..},
attests: [
{ discname: .., mark: ..},
{ .. }, ..
]
}
group
{
_id: ..,
num: ..,
students: [
ObjectId(..), ..
],
disciplines: [
ObjectId(..), ..
],
}
discipline
{
_id: ..,
name: ..,
groups: [
ObjectId(..), ..
],
}
Answer the question
In order to leave comments, you need to log in
It all depends on how this data will be used.
If the user is important to us in the first place, then everything can be stuffed into it.
Transferring the scheme one to one is such an occupation. What problem are you solving with this? If relationships between entities are important to you and you want to use them from all sides, then maybe not eat a cactus and take a relational database?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question