Hi,
mongo is a document data store. So, I think as far as ingredient and product tables are considered, you can have it as separate collection in mongo. If we come to manufacture part, we can club both the tables into a single collection manufacture where manufacture detail will be an array element of nested structure
So, ideally the manufacture collection will look like
{
manufacure_id:1,
manufacture_name:"sample",
manufacutre_plant:"test",
...
manufacture_details:
[
{
ingredient_id:1,
product_id:111
},
{
ingredient_id:2,
product_id:111
},
{
ingredient_id:3,
product_id:111
},
{
ingredient_id:1,
product_id:112
},
{
ingredient_id:5,
product_id:112
},
{
ingredient_id:3,
product_id:112
}
]
}
Hope it helps.
Thanks,
Arumugarani