MongoDB_Assignment (1)
MongoDB_Assignment (1)
Part- A
{
item: "ABC2",
details: { model: "14Q3", manufacturer: "M1 Corporation" },
stock: [ { size: "M", qty: 50 } ],
category: "clothing"
},
{
item: "MNO2",
details: { model: "14Q3", manufacturer: "ABC Company" },
stock: [ { size: "S", qty: 5 }, { size: "M", qty: 5 }, { size: "L", qty: 1 } ],
category: "clothing"
},
{
item: "IJK2", d
details: { model: "14Q2", manufacturer: "M5 Corporation" },
stock: [ { size: "S", qty: 5 }, { size: "L", qty: 1 } ],
category: "houseware"
}
2- Find informtion about items and details from inventory collection where category is houseware
3- Increment the quantity by 10, for item_id "IJK2"
4-Remove the category field from the document where item: "ABC2",
5-Update the name of model from "14Q3" to "14P3" for item_id MNO2