1.

The ______ index is unique and prevents clients from inserting two documents with the same value for the _id field.(a) _id(b) $default(c) _def(d) None of the mentionedThis question was addressed to me during an interview for a job.Origin of the question is Indexes In MongoDB topic in portion Index/Indexing Concepts of MongoDB

Answer»

Correct answer is (a) _id

The best I can EXPLAIN: All MONGODB COLLECTIONS have an index on the _id field that exists by default.



Discussion

No Comment Found

Related InterviewSolutions