Use below command to build and load initial data to inventory collections.. There must be 8 documents in this collection. Run below command from command shell but show the result by taking screen shot...



Use below command to build and load initial data to inventory collections.. There must be 8 documents in this collection. Run below command from command shell but show the result by taking screen shot from MongoDB Atlas







You can use any of your existing database to build this collection under or simply write a command like use DBName to build a new Database and switch. then run below command to build collection.








db.inventory.insertMany( [


   { item: "journal", qty: 25, size: { h: 14, w: 21, uom: "cm" }, status: "A" },


   { item: "notebook", qty: 50, size: { h: 8.5, w: 11, uom: "in" }, status: "P" },


   { item: "paper", qty: 100, size: { h: 8.5, w: 11, uom: "in" }, status: "D" },


   { item: "planner", qty: 75, size: { h: 22.85, w: 30, uom: "cm" }, status: "D" },


   { item: "specialcard ", qty: 77, size: { h: 22.85, w: 30, uom: "cm" }, status: "A" },


   { item: "christmascard ", qty: 65, size: { h: 22.85, w: 30, uom: "cm" }, status: "D" },


   { item: "mothersdaycard", qty: 25, size: { h: 21.85, w: 30, uom: "cm" }, status: "D" },


   { item: "postcard", qty: 45, size: { h: 10, w: 15.25, uom: "cm" }, status: "A" },


] );


3.Write the MongoDB Shell code to remove all inventory documents from the collection inventory, whose ‘qty is greater than 70.



Jun 06, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here