About deleteOne.
Is that for mongosh, nodejs or python?
In python, it is delete_one(), but mongosh and nodejs should be deleteOne. Is it possible that none of the answer is good. In mongosh db.scores.deleteOne() should work but in nodejs, the correct answer could be db.collection( “scores” ).deleteOne().
In the question and the answer, is there a space between E. and M.? In the sample documents there is one but it is not clear for the question and answer. If there is none, the NO documents match the query.
About connection pooling.
Your answer about deleteOne had a red square which I assume means a wrong answer. For connection pooling the squares around you answer is not red. So I assume your answer is good.
In java, it’s deleteOne, right ?
The method is named deleteOne but the syntax would be wrong for JAVA. You would need at the minimum:
db.scores.deleteOne( new Document( "name" , "E. M." ) ) ;
It would be good for mongosh and maybe nodejs.
Hi @Tuan_Anh_Le,
Welcome to the MongoDB Community forums
The above screenshot shows that your selected answer is marked with black, which indicates that one of the options selected is correct but another is incorrect.
The problem statement, states that you have chosen two advantages, so I would encourage you to re-attempt the question with the correct options. To learn more about connection polling please refer to the documentation here.
If you have any further questions or concerns, please don’t hesitate to contact us.
Thanks,
Kushagra
Hi @Tuan_Anh_Le,
In my understanding, you are attempting the Python language
practice question for the MongoDB DEV certification exam.
If yes then please refer to the official documentation of the python driver to learn more. I would encourage you to re-attempt the practice question using the correct option and share your feedback with us.
If you have any further questions or concerns, please don’t hesitate to reach out to us.
Thanks,
Kushagra
I agree with @Tuan_Anh_Le. He selected the right answer. Please review your practice exam.
removeOne is for bulk operations, delete_one and remove_one don’t even exist.
Welcome to the MongoDB Community forums
Thanks for your feedback. Please check out Deleting Documents in Python Applications - MongoDB University and learn how you can delete a MongoDB document in a Python application.
I’ll also encourage you to read the Python driver documentation to learn more about it.
If you have any doubts, please feel free to reach out to us.
Thanks,
Kushagra Kesav
You can see the image show Connection Pooling question, I’m learning Java Practice Question Course.
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.