I’ve encountered an issue with one of the practice questions in the MongoDB CRUD Operations course, specifically in the “Counting Documents in a MongoDB Collection” lesson. The practice question can be found here:
Practice Question.
The problem is that the question appears to have two correct options, but only one is marked as correct in the system. This discrepancy could be confusing for those of us trying to verify our understanding of the material.
Has anyone else encountered this issue, or could someone from the MongoDB University team look into this? It would be great if the question could be reviewed and updated to reflect both correct answers.
Thanks in advance for your help!
Best regards,
Akshit
Hi @Akshit_Haryana and welcome to the community!
In answer b it tells you about the database inspections, but what countDocuments() does is to return the total number of documents in the inspections collection, so only answer c is correct.
Best Regards
Hi @Akshit_Haryana ,
I see my old self in your action for a moment. I am guessing you are into mongodb no more than a year.
let’s step back and look at the basic terms at a distance.
- you want to write down your memories of a beautiful trip. you write where and when, with whom, how long, etc. now you have a beautiful “document” of it.
- you have many travels recently, and write a memoir (a document) for each one. you want them stay together like a family album, so you put them together to make a “trips collection”
these two steps are the basic building blocks for a document database such as mongodb.
- the “database” term is for the collection of collections: you make separate entries for things you experienced, such as medical history, nice restaurants, bills etc, and put them in a bigger bookcase.
when you get them sorted in your mind, you will find your own examples to explain these 3 concepts, and questions like the one you failed will just be a breeze.
good luck