To cleanly shut down MongoDB, what command should you use from the MongoDB shell?
quit() exit() db.shutdownServer() db.shutdown()
Multiple choice questions & answers (MCQs),
quit() exit() db.shutdownServer() db.shutdown()
Use the replaceMany() command instead Use the updateMulti() command instead Use the updateMany() command instead Set the global multi option…
db.people.getName(); db.people.reIndex({names: 1}); db.people.getIndexKeys(); db.people.getIndexes();
db.customers.remove({}).indexes(); db.customers.remove({}); db.customers.drop(); db.customers.delete();
db.customers.delete({_id: 1}); db.customers.drop({_id: 1}); db.drop.customers({_id: 1}); db.customers.remove({_id: 1});
restore read/write dbadmin delete collections
db.persons.find().sort({lastName: -1}} db.persons.find().sort({lastName: 1}} db.persons.find().sort({lastName: ascending}} db.persons.find().sort({lastName: $asc}}
data, namespace, and journal namespace, journal, and log journal, data, and database data, log, and journal
_id _name ObjectId mongoDB is schema-less so no field is required