Professional Documents
Culture Documents
IASchool en MongoDB GRP 03
IASchool en MongoDB GRP 03
1 Exercises
Copy the questions, paste them to a text file (using gedit or notepad++).
Execute the commands and analyze the result.
Copy the results and append them to the same text file.
Comment the results.
At the end of the day, send a copy of the resulting file to the email address at the footer of this document.
1.1 Group-03
Exercise 1 (Find documents)
Retrieve all documents in the inventory collection where the status equals "A" and qty is less than ($lt)
30. Analyze and comment what you’ve done.
db.inventory.find({ status: "A", qty: { $lt: 30 } })
En-MongoDB-Ex011-FindCondition
En-MongoDB-Ex012-FindCondition
En-MongoDB-Ex013-FindCondition
Note
Equality matches on the whole embedded document require an exact match of the specified <value> document, including
the field order.
For example, the following query does not match any documents in the inventory collection:
db.inventory.find(size: w: 21, h: 14, uom: "cm" )
En-MongoDB-Ex014-FindCondition
En-MongoDB-Ex015-FindCondition