System Collections
On this page
- Synopsis
-
Synopsis
MongoDB stores system information in collections that use the <database>.system.* namespace, which MongoDB reserves for internal use. Do not create collections that begin with system.
MongoDB also stores some additional instance-local metadata in the local database, specifically for replication purposes and in the config database for sessions information.
Collections
System collections include these collections stored in the admin database:
admin.system.``rolesThe
admin.system.rolescollection stores custom roles that administrators create and assign to users to provide access to specific resources.admin.system.``usersThe
admin.system.userscollection stores the user’s authentication credentials as well as any roles assigned to the user. Users may define authorization roles in theadmin.system.rolescollection.admin.system.``versionStores the schema version of the user credential documents.
System collections include these collections stored in the config database:
config.system.``indexBuildsNew in version 4.4.The
indexBuildscollection stores information related to in-progress index builds.
System collections also include these collections stored directly in each database:
<database>.system.``namespacesREMOVED IN 4.2Starting in MongoDB 4.2,
<database>.system.namespaceshas been removed (access to the collection has been deprecated since 3.0). To list the collections in a database, use thelistCollectionscommand instead.<database>.system.``indexesREMOVED IN 4.2Starting in MongoDB 4.2,
<database>.system.indexeshas been removed (access to the collection has been deprecated since 3.0). To list the inndexes, use thelistIndexescommand instead.<database>.system.``profileThe
.system.profilecollection stores database profiling information. For information on profiling, see Database Profiling.<database>.system.``jsThe
.system.jscollection holds special JavaScript code for use in server side JavaScript. See Store a JavaScript Function on the Server for more information.<database>.system.``viewsThe
.system.viewscollection contains information about each view in the database.参见
原文 - System Collections