As in other database engines, the fields should be defined with a data type. The following are all valid types:
- String
- Date
- Number
- Boolean
- Array
- ObjectId
- Buffer
- Mixed
Perhaps, you are familiar will almost all the data types listed. The Mixed data type basically allows you to define a field whose value can be of any data type. Personally, we don't recommend the use of this data type because maintaining a Mixed field can become hard, and you may want to write boilerplate code to use it.