On this page本页内容
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.
System collections include these collections stored in the admin
database:
admin.system.
roles
¶The admin.system.roles
collection stores custom roles that administrators create and assign to users to provide access to specific resources.
admin.system.
users
¶The admin.system.users
collection stores the user’s authentication credentials as well as any roles assigned to the user. Users may define authorization roles in the admin.system.roles
collection.
admin.system.
version
¶The admin.system.version
collection stores metadata to suport internal operations. Do not modify this collection unless specifically instructed to in this documentation or by a MongoDB support engineer.
System collections include these collections stored in the config
database:
config.system.
indexBuilds
¶New in version 4.4.版本4.4中的新功能。
The indexBuilds
collection stores information related to in-progress index builds.
System collections also include these collections stored directly in each database:
<database>.system.
namespaces
¶Removed in 4.2
Starting in MongoDB 4.2, <database>.system.namespaces
has been removed (access to the collection has been deprecated since 3.0). To list the collections in a database, use the listCollections
command instead.
<database>.system.
indexes
¶Removed in 4.2
Starting in MongoDB 4.2, <database>.system.indexes
has been removed (access to the collection has been deprecated since 3.0). To list the inndexes, use the listIndexes
command instead.
<database>.system.
profile
¶The <database>.system.profile
collection stores database profiling information. For information on profiling, see Database Profiling.
<database>.system.
js
¶The <database>.system.js
collection holds special JavaScript code for use in server side JavaScript. See Store a JavaScript Function on the Server for more information.
<database>.system.
views
¶The <database>.system.views
collection contains information about each view in the database.