MongoDB is a document database and does not use schemas in the same way as most RDBMS databases.
In MongoDB as collections and indexes are created automatically.
Objects stored in MongoDB use similar datatypes to SQL, with some differences:
ID fields are of type
ObjectIDrather than type
All collection names and property names use
All timestamps are stored as
ISODate()in MongoDB and all date/time values are stored in UTC.
A sparse index is used on the User
This is functionally equivalent to the ANSI SQL behaviour for a