Hi,
I am new designing DBs with Mongo.
I am creating a Db in Mongo, not sure if my schema is designed correctly, I need some help.
I have some arrays inside a document that I need them to reference other documents from the DataBase- I am doing this reference via Object ID. Despite, I would like to know if it is possible to add more element on arrays where object IDs are present.
For example:
As you may see, “domicilio” has several elements embeded inside of it. I tried to do that on the case of diagnosis, “alergias”, “Citas”. For example something like this:
"Alergias:" [
{
"$oid": "5fd83705fc9e4a97dc261a68"
"Tipo": "Food Allergie".
"Date": 2020-01-24 ...
},
{
"$oid": "5fd83705fc9e4a98yc261a70"
"Tipo": "Another Type".
"Date": 2020-01-30...
}
]
Is it possible to create such an arrangement as the one above? Please help, I tried the method above but I was not successful. Currently using the Compass GUI.
Regards,