1.

Point out the wrong statement.(a) TTL index is ideal for certain types of information like machine generated event data, logs, and session information that only need to persist in a database for a finite amount of time(b) You cannot combine the sparse index option with the unique index option(c) TTL indexes are special indexes that MongoDB can use to automatically remove documents from a collection after a certain amount of time(d) None of the mentionedThis question was posed to me by my college professor while I was bunking the class.My doubt stems from Index Types in division Index/Indexing Concepts of MongoDB

Answer»

Correct choice is (b) You cannot combine the SPARSE index OPTION with the unique index option

To elaborate: You can combine to reject documents that have duplicate values for a field but ignore documents that do not have the INDEXED KEY.



Discussion

No Comment Found

Related InterviewSolutions