Given the following document:The name is M.M., the date of the exam is May 20, 2022, the subject is Math, and the score is 90.What command will properly add this document to the exams collection?
Given the following sample documents:{ _id: 1, firstName: “Person1”, company: “CompanyA”, active: false }{ _id: 2, firstName: “Person2”, company: “CompanyB”, active: false }{ _id: 3, firstName: “Person3”, company: “CompanyC”, active: true }{ _id: 4, firstName: “Person4”, company: “CompanyD”, active: true }What code block should be used to delete the third document from a MongoDB collection in Java?
collection.DeleteOne(eq(“_id”, new ObjectId(3))));
collection.Delete(eq(“_id”, new ObjectId(3))));
collection.Delete(eq(“_id”, 3));
collection.DeleteOne(eq(“_id”, 3));
Question 9
Given the following query generates a collection scan:db.grades.find({“class_id” : 149, “scores.score” : {$gt : 75 }}). sort ({“score.type”:1})Which two indexes improve the performance of the query the most? (Choose two.)
Given the following query:db.test.find({ reports: { $elemMatch: { item: “123”, point: { $gte: 8 }}}}}Which two documents from collection test will be returned by this query? (Choose two.)