In MongoDb
you have to take the concept more general and include all the relation in it.
Your database Mysql
, looks like this on mongodb
:
degree{
_id : ...,
name : ...,
branches :[ {
_id: ...
name: ....,
syllabus : [ {
_id: ...,
name: ....,
sort_note: ....
attachment:...
semetster,...
} , .. ],...{
} ],
subjects: [ {
_id: ..,
name: ....,
code: .....,
semester: ....
}, ...]
}
If id_branch and id_degree are uniques like a contraint is an object else is an array.
Regards
manpreet
Best Answer
2 years ago
The following structure as defined in MySQL db
Now i can easily fetch the syllabus of particuler degree,branch,semester using mysql but i am new in mongo db please help