Consider an inventory collection that contains these documents:
{ " _id " : 1, " product " : " x-small box " , " colors " : [ " brown " , " black " , " white " ], " qty " : 50 }
{ " _id " : 2, " product " : " small box " , " colors " : [ " brown " , " white " ], " qty " : 60 }
{ " _id " : 3, " product " : " medium box " , " colors " : [ " black " , " grey " , " white " ], " qty " : 45 }
{ " _id " : 4, " product " : " large box " , " colors " : [ " grey " ], " qty " : 50 }
{ " _id " : 5, " product " : " x-large box " , " colors " : [ " grey " , " white " ], " qty " : 10 }
What result set does the following query return?
db.inventory.find({
$or: [
{ " product " : " x-small box " },
{
$and: [
{ " qty " : { $ne: 50 } },
{ " colors " : { $nin: [ " brown " ] } }
]
}
]
})
Which is the correct order (lowest to highest) in which MongoDB compares the BSON types?
What command adds a document to the class101 collection where the student is " Randall " and the student passed the class?
What command should a MongoDB database administrator use to find the disk utilization of the order collection?
Consider the following example document:
{
" _id " : Objectld( " 5360c0a0a655a60674680bbe " ),
" user "
" login " : " irOn "
" description " : " Made of steel "
" date " : ISODate( " 2014-04-30T09:16:45.836Z " ),
}
>
and index creation command:
db.users.createlndex( { " user.login " : 1, " user.date " : -1 }, " mylndex " )
When performing the following query:
db.users.find( { " user.login " : /Air.*/ },
{ " user " :1, " _id " :0 > ).sort( { " user.date " :1 > )
which of the following statements correctly describe how MongoDB will handle the query? Check all that apply.
What command set removes node-1.cluster1.mycompany.local:27017 and node-2.cluster1.mycompany.local:27017 from the replica set, then adds node-1.cluster1.mycompany.local:27017 back to the replica set?
A database administrator maintains a MongoDB database that stores scientific papers. A paper with DOI 10.1000/xyz123 is no longer relevant and needs to be removed.
What query should the administrator use to delete the paper with the DOI equal to 10.1000/xyz123?
Which TWO indicators should an administrator keep an eye on to determine if the storage capacity is nearing its limit?