System Collections

Synopsis

MongoDB stores system information in collections that use the<database>.system.* namespace, which MongoDB reserves forinternal use. Do not create collections that begin with system.

MongoDB also stores some additional instance-local metadata in thelocal database, specifically forreplication purposes and in the config database for sessions information.

Collections

System collections include these collections stored in the admin database:

  • admin.system.roles

New in version 2.6.

The admin.system.roles collection stores custom roles thatadministrators create and assign to users to provide access tospecific resources.

  • admin.system.users

Changed in version 2.6.

The admin.system.users collection stores the user’sauthentication credentials as well as any roles assigned to the user.Users may define authorization roles in theadmin.system.roles collection.

  • admin.system.version

New in version 2.6.

Stores the schema version of the user credential documents.

System collections also include these collections stored directly ineach database:

  • <database>.system.namespaces

Deprecated since version 3.0: Access this data using listCollections.

The <database>.system.namespaces collection containsinformation about all of the database’s collections.

  • <database>.system.indexes

Deprecated since version 3.0: Access this data using listIndexes.

The <database>.system.indexes collection lists all theindexes in the database.