[2022年03月07日]C100DBA究極な学習ガイド [Q39-Q61]

Share

[2022年03月07日]C100DBA究極な学習ガイド

究極なガイドで準備C100DBA認定試験MongoDB Certified DBA Associateは2022年更新

質問 39
Consider the following document:
> db.c.find()
{ "_id" : 12, b : [ 3, 5, 7, 2, 1, -4, 3, 12 ] }
Which of the following queries on the "c" collection will return only the first five elements of the array in the
"b"
field? E.g.,
Document you want returned by your query:
{ "_id" : 12, "b" : [ 3, 5, 7, 2, 1 ] >

  • A. db.c.find( { > , { b : [ 0, 1, 2, 3, 4, 5 ] > )
  • B. db.c.find( { > , { b : { $substr[ 0 , 5 ] > > )
  • C. db.c.find( { b : [ 0 , 5 ] > )
  • D. db.c.find( { > , { b : { $slice : [ 0 , 5 ] } } )
  • E. db.c.find( { > , { b : [ 0 , 5 ] > )

正解: D

 

質問 40
What does the output x of the following MongoDB aggregation query result into; db.posts.aggregate( [ {
$group: { _id; "$author", x: { $sum: $likes } } } ] )

  • A. Sum of likes on all the posts by all the authors
  • B. Number of posts by an author
  • C. Sum of likes on all the posts by an author, grouped by author
  • D. Average of likes on all the posts of an author, grouped by author

正解: C

 

質問 41
Write the command(s) are correct to enable sharding on a database "testdb" and shard a collection "testCollection" with _id as shard key.

正解:

解説:
sh.enableSharding("testdb") & sh.shardCollection("testdb.testCollection", {_id : 1 }, true )

 

質問 42
The MongoDB explain() method does not support which of the following verbosity mode:

  • A. queryPlanner
  • B. customExecutionStats
  • C. executionStats
  • D. allPlansExecution

正解: B

 

質問 43
'mongoimport' command is used for

  • A. None of the above
  • B. Multiple command import
  • C. Multiple command insertion
  • D. Batch data insertion

正解: D

 

質問 44
Which of the following are common uses of the mongo shell? Check all that apply

  • A. Perform queries against MongoDB collections
  • B. Use as a JavaScript framework for your production system
  • C. Perform administrative tasks

正解: A,C

 

質問 45
Aggregation Pipelines have a limit of:

  • A. No limit on document and 100 MB RAM
  • B. 2 MB document and 100 MB RAM
  • C. 2 MB document and no limit on RAM
  • D. 16 MB document and 100 MB RAM

正解: D

 

質問 46
Which features of relational database management systems were deliberately omitted in MongoDB and help us to obtain horizontal scalability? Check all that apply.

  • A. Authentication
  • B. Multi-statement transactions
  • C. Joins

正解: B,C

 

質問 47
To add a new user and enable authentication in MongoDB, which of the following steps need be executed?

  • A. All of the above
  • B. update users collection and run db.enableAuthenticationQ
  • C. update users collection and restart mongodb with -auth option
  • D. update users collection and restart mongodb

正解: C

 

質問 48
What is the use of mongodump and mongorestore tools?

  • A. audit mongodb deployment
  • B. backup mongodb deployment
  • C. performance tune mongodb deployment
  • D. replicate mongodb deployments

正解: B

 

質問 49
Which of the following command is used to get all the indexes on a collection?

  • A. db.showIndexes()
  • B. db.collection.findlndexes()
  • C. db.collection.showIndexes()
  • D. db.collection.getlndexesQ

正解: D

 

質問 50
When should we consider representing a one-to-many relationship in an embedded collection instead of separate collection?

  • A. Never
  • B. When the many is not very large
  • C. When the many is very large
  • D. Always

正解: B

 

質問 51
In a sharded replicas set environment with multiple mongos servers, which of the following would decide the mongos failover?

  • A. mongos
  • B. mongod
  • C. individual language drivers
  • D. mongo shell

正解: C

 

質問 52
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?

  • A. None of the above
  • B. $removeFromSet
  • C. $push along with $each, $sort and $slice
  • D. $arrayLimit

正解: C

 

質問 53
What does the following aggregate query perform?

  • A. Fetches the posts with likes between 100 and 200, sets the _id of the first document as null and then increments it 1 every time
  • B. Groups the posts by number of likes (101, 102, 103.) by adding 1 every time
  • C. Calculates the number of posts with likes between 100 and 200
  • D. Fetches the posts with likes between 100 and 200 and sets their _id as null

正解: C

 

質問 54
JSON stands for

  • A. JavaScript Object Naming
  • B. None of the above
  • C. JavaScript Object Notation
  • D. JavaScript Object Notice

正解: C

 

質問 55
Consider the following document from the products collection:

What does the following query using $elemMatch return? db.products.find( { product_code: "345678" }, { variations: { $elemMatch: { size: ^L^ } } } )

  • A. Returns the document but with only one element in the variations array (corresponding to size L)
  • B. Returns the complete document but retrieves only the size field from the array
  • C. Returns the complete document since MongoDB does not support partial array retrieval
  • D. Returns the complete document but retrieves only the size field from the array and also with only one element in the variations array (corresponding to size L)

正解: A

 

質問 56
The following aggregation option is used to specify the specific fields that needs to be passed to the next stage of the aggregation pipeline:

  • A. $match
  • B. $aggregate
  • C. $project
  • D. $group

正解: C

 

質問 57
Which command is used to determine storage capacity of specific database?

  • A. constats
  • B. mongostat
  • C. dbstats
  • D. mongotop

正解: C

 

質問 58
As per the aggregation pipeline optimization concepts, if you have a $sort followed by a $match:

  • A. Providing these parameters in any order does not impact the performance
  • B. MongoDB does not do any movements by default and will use the order provided
  • C. $match moves before $sort
  • D. $sort moves before $match

正解: C

 

質問 59
You are in a sharded cluster. What will you do prior to initiating backup in sharded cluster?

  • A. db.stopserver()
  • B. db.stopBalancer()
  • C. sh.stopBalancer()
  • D. sh.stopserverQ

正解: C

 

質問 60
Which of the following is correct about MongoDB?

  • A. MongoDB uses JSON format to represent documents
  • B. MongoDB supports some of the SQL functions
  • C. MongoDB supports collection joins
  • D. MongoDB supports geospatial indexes

正解: D

 

質問 61
......

MongoDB Certified DBA Associate基礎問題C100DBA試験練習問題集:https://www.goshiken.com/MongoDB/C100DBA-mondaishu.html

リアルC100DBA問題集でMongoDB明確な解答を試そう:https://drive.google.com/open?id=1FRs6oi5YJZGTyC5DyZ2vtyOw1PW_dqeF