Review 152 C100DBA practice questions with answer explanations and community insights.
Question 1
An Atlas Sample Dataset of restaurants is loaded into a database deployment.How is Data Explorer used to find all restaurants whose name is “The Rose Palace” in the Restaurants database?
Select the collection on the left-hand side.Select the “Aggregation” view.Specify the first stage as $match query: {name: “The Rose Palace”}Specify the following query: “$limit: 1”.
Select the collection on the left-hand side.Select the “Find” view.Select “Filter” and type {name: “The Rose Palace”}Click “Find” to run the query.
MongoDB Data Explorer is primarily used to insert/edit/delete documents, not find them.
Select the collection on the left-hand side.Select the “Find” view.Select “Filter” and type {name == “The Rose Palace”}Click “Find” to run the query.
Question 2
Given the following query:db.coll.find({}).sort({“income”: 1, “tax”: -1})Which two indexes will improve the performance of this query the most? (Choose two.)
{“income”: -1, “tax”: -1}
{“income”: -1, “tax”: 1}
{“income”: 1, “tax”: -1}
{“income”: 1, “tax”: 1}
Question 3
Given the following sample documents:{_id:1, company: “Farm Inc.”, active: true},{_id:2, company: “Garden Inc.”, active: false}A developer wants to create a search query to search for a company. There is a business requirement to accommodate misspellings. An Atlas Search index has already been created for this query.What query satisfies these requirements?
Given the following documents in a collection:{_id:1, a: “one”, b: “two”}{_id:2, a: “two”, b: “three”}{_id:3, a: “one”, b: “four”, c: “three”}Using the following update command:db.coll.replaceOne({a: “one”}, {d: “two”, b: “five”})What would the contents of the collection be after successfully running this command?
CertificationTest is being migrated. Some pages may be slow or briefly unavailable; everything will be back to normal within a few hours. If you run into any issue, email support@certificationtest.net.