MongoDB MCQ Questions - Document

This section focuses on "Document" in MongoDB. These Multiple Choice Questions (MCQs) should be practiced to improve the MongoDB skills required for various interviews (campus interview, walk-in interview, company interview), placements, entrance exams and other competitive examinations.

1. MongoDB stores data records as ______.

A. ZSON documents.
B. JSON documents
C. BSON documents
D. WSON documents.

View Answer


2. To insert data into MongoDB collection, you need to use MongoDB's __________ method.

A. save()
B. insert()
C. Both A and B
D. Can not say

View Answer


3. The basic syntax of insert() command is?

A. db.insertCOLLECTION_NAME(document)
B. db.COLLECTION_NAME.insert(document)
C. COLLECTION_NAME.insert(document)
D. db.COLLECTION_NAME.create(document)

View Answer


4. _id is ________ bytes hexadecimal number unique for every document in a collection.

A. 4
B. 8
C. 10
D. 12

View Answer


5. To query data from MongoDB collection, you need to use MongoDB ______ method.

A. select()
B. find()
C. show()
D. All of the above

View Answer


6. find() method will display all the documents in a __________ way.

A. structured
B. non-structured
C. simple
D. complex

View Answer


7. To display the results in a formatted way, you can use _______ method.

A. beautify()
B. simple()
C. pretty()
D. unify()

View Answer


8. Apart from the find() method, there is findOne() method, that returns only one document.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer


9. The update() method updates the values in the existing document.

A. TRUE
B. FALSE
C. Can be true or false
D. Can not say

View Answer


10. MongoDB _________ method is used to delete a document from the collection.

A. drop()
B. remove()
C. delete()
D. None of the above

View Answer





Discussion



* You must be logged in to add comment.