By default, the_id collection is created for every collection by MongoDB.
By default, MongoDB creates an _id
index for every collection. The _id
field is a unique identifier for each document in a collection, and MongoDB automatically creates an index on this field to optimize queries that involve searching for or retrieving documents by their _id
values.