Site icon Exam4Training

MongoDB C100DBA MongoDB Certified DBA Associate Exam (Based on MongoDB 4.4) Online Training

Question #1

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

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

Reveal Solution Hide Solution

Correct Answer: A,B
Question #2

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 . $project
  • B . $aggregate
  • C . $match
  • D . $group

Reveal Solution Hide Solution

Correct Answer: A
Question #3

In a collection that contains 100 post documents, what does the following command do? db. posts. find().skip(5).limit(5)

  • A . Skip and limit nullify each other. Hence returning the first five documents.
  • B . Skips the first five documents and returns the next five
  • C . Limits the first five documents and then return them in reverse order
  • D . Skips the first five documents and returns the sixth document five times

Reveal Solution Hide Solution

Correct Answer: B
Question #4

CORRECT TEXT

What tool do you use to see if you have a problem in the consumption of disk I / 0?

Reveal Solution Hide Solution

Correct Answer: Mongoperf
Question #5

Which of the following is supported by MongoDB?

  • A . Transaction Management
  • B . ACID Transactions
  • C . Journaling
  • D . Relationships between Collections (Primary Key Foreign Key)

Reveal Solution Hide Solution

Correct Answer: C
Question #6

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

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

Reveal Solution Hide Solution

Correct Answer: A
Question #7

Consider a collection posts which has fields: Jd, post_text, post_author, post_timestamp, post_tags etc.

Which of the following query retrieves ONLY the key named post_text from the first document retrieved?

  • A . db.posts.finOne({},{_id:0, post_text:1})
  • B . db.posts.findOne({post_text: 1})
  • C . db.posts.find({},{_id:Of post_text:1})
  • D . db.posts.finOne«},{post_text:l})

Reveal Solution Hide Solution

Correct Answer: A
Question #8

In a sharded replica set environment, the w Option provides ability for write concern and j Option provides ability for the data to be written on disk journal. Consider that we have a seven member replica set and we want to assure that the writes are committed to journal.

What should be the value of j?

  • A . 1
  • B . 2
  • C . 0
  • D . 7

Reveal Solution Hide Solution

Correct Answer: B
Question #9

Aggregation Pipelines have a limit of:

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

Reveal Solution Hide Solution

Correct Answer: B
Question #10

What is the maximum size of a MongoDB document?

  • A . 2 MB
  • B . 12 MB
  • C . There is no maximum size. It depends on the RAM.
  • D . 16 MB

Reveal Solution Hide Solution

Correct Answer: D

Question #11

If the value of totalKeysExamined is 30000 and the value of totalDocsExamined is 0, which of the following option is correct?

  • A . None of the above
  • B . The query used an index to fetch the results
  • C . The query returned 0 documents
  • D . The query returned 30000 documents after scanning the documents

Reveal Solution Hide Solution

Correct Answer: B
Question #12

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 . db.posts.createIndex({commerits.$.author":-l});
  • B . db.posts.createIndex({comments.$.author": {$desc:l>});
  • C . db.posts.createIndex({comments.author":-l});

Reveal Solution Hide Solution

Correct Answer: C
Question #13

Which option should be used to update all the documents with the specified condition in the MongoDB query?

  • A . specify {all: true} as the third parameter of update command
  • B . updateAII instead of update
  • C . specify {updateAII: true} as the third parameter of update command
  • D . specify {multi: true} as the third parameter of update command

Reveal Solution Hide Solution

Correct Answer: D
Question #14

Which mongodb tool is used to report details on number of database operations in MongoDB?

  • A . mongorestore
  • B . mongostat
  • C . mongodump
  • D . mongotop

Reveal Solution Hide Solution

Correct Answer: B
Question #15

In a sharded replica set environment, the w Option provides ability for write concern and j Option provides ability for the data to be written on disk journal. Consider that we have a seven member replica set and we want to assure that the writes are committed to journal.

What should be the value of j?

  • A . 7
  • B . 2
  • C . 1
  • D . 0

Reveal Solution Hide Solution

Correct Answer: C
Question #16

What read preference should your application use if you want to read from the primary under normal circumstances but allow reads from secondaries when a primary is unavailable?

  • A . secondaryPreferred
  • B . Secondary
  • C . nearest
  • D . primary
  • E . primaryPreferred

Reveal Solution Hide Solution

Correct Answer: E
Question #17

Which of the following operators is used to updated a document partially?

  • A . $set
  • B . $update
  • C . $project
  • D . $modify

Reveal Solution Hide Solution

Correct Answer: A
Question #18

What is the first task that a secondary would perform on being prompted by another secondary for an election?

  • A . Start the election process for primary
  • B . Vote for the first secondary so that it would become the next primary
  • C . Vote for itself and then call for election
  • D . Connect to primary to confirm its availability

Reveal Solution Hide Solution

Correct Answer: D
Question #19

Which of the documents below will be retrieved by the following query? Assume the documents are stored in a collection called "sample". Check all that apply.

db.sample.find( { "$or" : [ { "a" : { "$in" : [ 3, 10] > }, { "b" : { "$lt" : 2 > > ] > )

  • A . {”__id" :3, "a": 4, "c" :0, "b" :14}
  • B . {”_Jd" :7, "a": 8, "c" :1, "b" :7}
  • C . {".Jd" :6, "a": 1, "c" :1, "b" :5}
  • D . { ”Jd" :9, "a": 17, "c": 1, "b": 1}
  • E . { Jd" :10,"a": 3, "c": 1, "b": 1}
  • F . {".Jd" :: 2, "a": 2, "c" :: 0, "b": 1}
  • G . {".Jd" :: 4, "a": 5, "c" :: 0, "b": 17}
  • H . {".Jd" :: 1, "a": 0, "c" :: 0, "b": 2}
  • I . {".Jd" :: 5, "a": 3, "c" :: 0, "b": 12}
  • J . {".Jd" :: 8, "a": 11, "c": 1, "b": 0}

Reveal Solution Hide Solution

Correct Answer: D,E,F,I,J
Question #20

JSON stands for

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

Reveal Solution Hide Solution

Correct Answer: A

Question #21

What is the replication factor for a replicated cluster with 1 primary, 3 secondaries with one of them hidden. The set also has an arbiter?

  • A . None of the above
  • B . 5
  • C . 3
  • D . 4

Reveal Solution Hide Solution

Correct Answer: D
Question #22

Which operations add new documents to a collection?

  • A . Create
  • B . update
  • C . insert
  • D . delete

Reveal Solution Hide Solution

Correct Answer: A,C
Question #23

Consider that you have a collection called population which has fields state and city.

Which of the following query will calculate the population grouped by state and city?

  • A . db.population.aggregate( [{ $group: { _id: { state: "$state", city; "$city" },pop: { $sum: 1 > > >] )
  • B . db.population.aggregate( [{ $group: { _id: { state: Estate", city: "$city" },pop: { $pop: 1 } } }] )
  • C . db.population.aggregate( [{ $group: { _id: { state: Estate", city: n$city" },pop: { $sum: "$pop" } } }] )
  • D . db.population.aggregate( [{ $group: { _id: { city: "$city" },pop: { $sum: "$pop" } } }] )Multi Document Transaction is not supported by MongoDB

Reveal Solution Hide Solution

Correct Answer: C
Question #24

Which of the following is true about sharding?

  • A . Creating a sharded key automatically creates an index on the collection using that key
  • B . We cannot change a shard key directly/automatically once it is set up
  • C . A sharded environment does not support sorting functionality since the documents lie on various mongod instances
  • D . Sharding is enabled at the database level

Reveal Solution Hide Solution

Correct Answer: B
Question #25

Which of the tags in a replica set configuration specify the operations to be read from the node with the least network latency?

  • A . netLatency
  • B . secondaryPreferred
  • C . nearest
  • D . primaryPreferred

Reveal Solution Hide Solution

Correct Answer: C
Question #26

What is the output of the following program?

  • A . 60 s
  • B . 1s
  • C . 100 s
  • D . 100 ms

Reveal Solution Hide Solution

Correct Answer: A
Question #27

Which node in a replica set does accept write operation?

  • A . arbiter
  • B . hidden
  • C . primary
  • D . secondary

Reveal Solution Hide Solution

Correct Answer: C
Question #28

Using an arbiter allows one to easily ensure an odd number of voters in replica sets.

Why is this important?

  • A . To help in disaster recovery
  • B . To protect agains network partitions
  • C . To enable certain read preference settings
  • D . To add greather redundancy
  • E . For more efficient backup operations

Reveal Solution Hide Solution

Correct Answer: B
Question #29

Which of the following statements are true about the $match pipeline operator? Check all that apply.

  • A . You should use it early as possible in the pipeline
  • B . It can be used as many time as needed.
  • C . It has a sintax similar to findQ commands.

Reveal Solution Hide Solution

Correct Answer: A,B,C
Question #29

Which of the following statements are true about the $match pipeline operator? Check all that apply.

  • A . You should use it early as possible in the pipeline
  • B . It can be used as many time as needed.
  • C . It has a sintax similar to findQ commands.

Reveal Solution Hide Solution

Correct Answer: A,B,C

Question #29

Which of the following statements are true about the $match pipeline operator? Check all that apply.

  • A . You should use it early as possible in the pipeline
  • B . It can be used as many time as needed.
  • C . It has a sintax similar to findQ commands.

Reveal Solution Hide Solution

Correct Answer: A,B,C
Question #29

Which of the following statements are true about the $match pipeline operator? Check all that apply.

  • A . You should use it early as possible in the pipeline
  • B . It can be used as many time as needed.
  • C . It has a sintax similar to findQ commands.

Reveal Solution Hide Solution

Correct Answer: A,B,C
Question #33

That RSI and RS2 can be primary?

You had to see the different configurations, RS3 could be hidden or priority 0 (But not a referee because we need 3 replicas), while RSI and RS2 could NOT have priority 0 or be hidden or anything like that .

In a 4-member RS RSO, RSI, RS2 and RS3 + Referee, RSO (primary) falls after some write operations that have replicated RSI and RS2 (but NOT RS3), who can get up as the new primary?

The configuration comes and in it we see that RS2 has a hidden: true (or a priority: 0, (I don’t remember)

  • A . ORS1
  • B . ORS2
  • C . ORS3
  • D . O arbiter
  • E . RSO

Reveal Solution Hide Solution

Correct Answer: A
Question #34

Given a replica set with five data-bearing members, suppose the primary goes down with operations in its oplog that have been copied from the primary to only one secondary.

Assuming no other problems occur, which of the following describes what is most likely to happen?

  • A . missing operations will need to be manually re-performed
  • B . the secondary with the most current oplog will be elected primary
  • C . reads will be stale until the primary comes back up
  • D . the primary may roll back the operations once it recovers
  • E . the most current secondary will roll back the operations following the election

Reveal Solution Hide Solution

Correct Answer: B
Question #35

Which command can be used to rebuild the indexes on a collection in MongoDB?

  • A . db.collection.createlndex({relndex:l})
  • B . db.collection.reIndex({author:l})
  • C . db.collection.relndexQ
  • D . db.collection.createIndex({author:l}).reIndex()

Reveal Solution Hide Solution

Correct Answer: C
Question #36

What does the totalKeysExamined field returned by the explain method indicate?

  • A . Number of documents that match the query condition
  • B . Number of index entries scanned
  • C . Details the completed execution of the winning plan as a tree of stages
  • D . Number of documents scanned

Reveal Solution Hide Solution

Correct Answer: B
Question #37

In order to ensure that you can maintain high availability in the face of server failure, you should implement which of the following?

  • A . Sharding
  • B . Properly defined user roles
  • C . Replication
  • D . Put indexes on all of your documents
  • E . The proper storage engine

Reveal Solution Hide Solution

Correct Answer: C
Question #38

Which option can be used with update command so that a new document gets created if no matching document is found based on the query condition?

  • A . upsert command instead of update command
  • B . {update: true, insert: true} as the third parameter of update command
  • C . This has to be handled in application code (Node.js, PHP, JAVA, C#, etc.) and cannot be handled in mongo shell query
  • D . Specify {upsert : true } as the third parameter of update command

Reveal Solution Hide Solution

Correct Answer: D
Question #39

Dada una coleccion, cuales devuelve con la siguiente query db.coleccion.find({nombre:"ruben",apellido:"gomez"},{nombre:l,apellido:l,aficion:l});

  • A . { "-id" : Objectld("580a42b5dfblb5al7427d302"), "nombre" : "ruben", "apellido" : "gomez", "aficion" : v u "flipar" }
  • B . { "_id" : Objectld("580a42acdfblb5al7427d301"), "nombre" : "Luis", "apellido" : "gomez", "aficion" : u "flipar" }
  • C . { "_id" : Objectld("580a42acdfblb5al7427d301"), "nombre" : "ruben", "apellido" : "Pablo", "aficion" : u "flipar"}
  • D . { "_id" : Objectld("580a42acdfblb5al7427d301"), "nombre" : "ruben", "apellido" : "gomez">

Reveal Solution Hide Solution

Correct Answer: A,D
Question #40

MongoDB is

  • A . None of the above
  • B . Object-oriented DBMS
  • C . Relational DBMS
  • D . Document-oriented DBMS

Reveal Solution Hide Solution

Correct Answer: D

Question #41

Which are the ONLY ways to project portions of an array?

  • A . $slice
  • B . $
  • C . All of the above
  • D . $ elemMatch

Reveal Solution Hide Solution

Correct Answer: C
Question #42

In a replicated cluster, which of the following node would only be used during an election?

  • A . arbiter
  • B . primary
  • C . hidden
  • D . secondary

Reveal Solution Hide Solution

Correct Answer: A
Question #43

Which of the following node is used during election in a replication cluster?

  • A . primary
  • B . arbiter
  • C . hidden
  • D . secondary

Reveal Solution Hide Solution

Correct Answer: B
Exit mobile version