content_image/839322.jpg content_image/839321.jpg
<img src='content_image/839322.jpg'>

## 8.1.1 Index Types 

MongoDB provides a number of different index types to support specific types of data and queries. 

## Default _id 

All MongoDB collections have an index on the _id field that exists by default. If applications do not specify a value for _id the driver or the mongod will create an _id field with an ObjectId value. 

The _id index is unique and prevents clients from inserting two documents with the same value for the _id field. 

## Single Field 

In addition to the MongoDB-defined _id index, MongoDB supports the creation of user-defined ascend- ing/descending indexes on a single field of a document (page 487). 

<img src='content_image/839321.jpg'>

