C100DEV Practice Online

Quickly grab our C100DEV product now and kickstart your exam preparation today!

Name: MongoDB Certified Developer Associate
Exam Code: C100DEV
Certification: MongoDB Certified Developer Associate
Vendor: MongoDB
Total Questions: 411
Last Updated: Sep 28, 2024
Page:    1 / 83      
Total 411 Questions | Updated On: Sep 28, 2024
Demo Download
Question 1

We have the following indexes:
{ name: 1, founded_year: 1 }
{ tag_list: 1, is_active: 1 }
And the following documents:

{
    _id: ObjectId("52cdef7c4bab8bd675297daa"),
    name: "Sparter",
    founded_year: 2007,
    tag_list: ["gaming", "game", "wow"],
    is_active: true
},
{
    _id: ObjectId("52cdef7c4bab8bd675297da3"),
    name: "Yahoo!",
    founded_year: 1994,
    tag_list: ["search", "webmail"],
    is_active: true
}
Select the true statement.


Answer: B

Question 2

You are tasked with developing a high-performance application using MongoDB as your primary database. The application heavily relies on queries that retrieve user profiles based on user names and their location. Given this requirement, you decide to implement a strategy to make these queries more efficient. What strategy should you implement to ensure these queries are covered queries?


Answer: D

Question 3

Given a movies collection where each document has the following structure:

{
    _id: ObjectId('573a1390f29313caabcd60e4'),
    genres: [ 'Short', 'Comedy', 'Drama' ],
    title: 'The Immigrant',
    year: 1917,
    imdb: { rating: 7.8, votes: 4680, id: 8133 },
    countries: [ 'USA' ]
}
Which of the following queries will find all the movies that have more votes than the year in which they were released?


Answer: D

Question 4

Consider a tasks collection that holds task records. The document structure is as follows:
{
  "_id": ObjectId("64b64c58ed01c0a5e72dbf5f"),
  "task": "Review PR",
  "status": "pending",
  "assignedTo": "alice"
}
Two operations are performed concurrently:
Operation A:

db.tasks.findAndModify({
    query: { task: "Review PR", status: "pending" },
    remove: true
});
Operation B:
db.tasks.findAndModify({
    query: { task: "Review PR", status: "pending" },
    update: { $set: { status: "completed" } },
    new: true
});
Operation B starts slightly after Operation A but before Operation A completes. What will be the final state of the tasks collection after both operations have been executed?


Answer: A

Question 5

We have a movies collection with the following document structure:
{
  _id: ObjectId("573a1390f29313caabcd6223"),
  genres: [ 'Comedy', 'Drama', 'Family' ],
  title: 'The Poor Little Rich Girl',
  released: ISODate("1917-03-05T00:00:00.000Z"),
  year: 1917,
  imdb: { rating: 6.9, votes: 884, id: 8443 }
},
{
  _id: ObjectId("573a13e3f29313caabdc08a4"),
  genres: [ 'Horror', 'Thriller' ],
  title: 'Mary Loss of Soul',
  year: 2014,
  imdb: { rating: '', votes: '', id: 2904798 }
}
We need to use Aggregation Framework to calculate the following aggregates:
average imdb rating
minimum imdb rating
maximum imdb rating
Expected output:
[
    {
        _id: null,
        avg_rating: 6.6934040649367255,
        min_rating: 1.6,
        max_rating: 9.6
    }
]
Please note that some documents have "" (empty string) for the field "imdb.rating". Exclude these documents before aggregation.
Which pipeline should you use?


Answer: C

Page:    1 / 83      
Total 411 Questions | Updated On: Sep 28, 2024
Demo Download