最新的MongoDB Certified DBA Associate Exam (Based on MongoDB 4.4) - C100DBA免費考試真題
問題1
A MongoDB database administrator needs to improve the performance of the following query:
db.employees.find(
{},
{ name: 1, department: 0, salary: 1 }
).sort({ department: 1, salary: -1 });
What index should the administrator use to achieve this goal?
db.employees.find(
{},
{ name: 1, department: 0, salary: 1 }
).sort({ department: 1, salary: -1 });
What index should the administrator use to achieve this goal?
正確答案: A
說明:(僅 VCESoft 成員可見)
問題2
In which of the following scenarios is sharding not the correct option. Select all that apply.
正確答案: A,C
問題3
In a collection that contains 100 post documents, what does the following command do? db. posts. find().skip (5).limit(5)
正確答案: D
問題4
Which TWO mongosh commands can be used to shutdown the mongod daemon?
正確答案: C,D
說明:(僅 VCESoft 成員可見)
問題5
Given a collection posts as shown below having a document array comments, which of the following command will create an index on the comment author descending?


正確答案: A
問題6
Below is a sample document of " orders " collection


正確答案:
$sort
問題7
Which are the ONLY ways to project portions of an array?
正確答案: D
問題8
MongoDB is
正確答案: C
問題9
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 " ] } }
]
}
]
})
{ " _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 " ] } }
]
}
]
})
正確答案: A
說明:(僅 VCESoft 成員可見)
問題10
Which of the following is supported by MongoDB?
正確答案: A
問題11
Which of the following operator can be used to limit the number of documents in an array field of a document after an update is performed?
正確答案: C
問題12
Which of the following commands can cause the database to be locked?
正確答案: D
問題13
In mongodb how do you update a document partially?
正確答案: C

