MongoDB系统集合
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
Theadmin.system.roles
collection stores custom roles that administrators create and assign to users to provide access to specific resources.admin.system.users
Theadmin.system.users
collection stores the user's authentication credentials as well as any roles assigned to the user. Users may define authorization roles in theadmin.system.roles
collection.admin.system.version
Theadmin.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.
系统集合包括存储在
admin
数据库中的以下集合:admin.system.roles
admin.system.users
admin.system.version
System collections include these collections stored in the
config
database:config.system.indexBuilds
New in version 4.4.
系统集合包括存储在
config
数据库中的以下集合:config.system.indexBuilds
4.4版本新引入indexBuilds
集合存储了与正在进行的索引创建有关的信息。
System collections also include these collections stored directly in each database:
<database>.system.namespaces
NOTERemoved in 4.2Starting 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 thelistCollections
command instead.<database>.system.indexes
NOTERemoved in 4.2Starting in MongoDB 4.2,<database>.system.indexes
has been removed (access to the collection has been deprecated since 3.0). To list the indexes, use thelistIndexes
command instead.<database>.system.profile
The.system.profile
collection stores database profiling information. For information on profiling, see Database Profiling.<database>.system.js
The.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
系统集合还包括以下直接存储在每个数据库中的集合:
<database>.system.namespaces
注意4.2版本中被移除<database>.system.indexes
注意4.2版本中被移除<database>.system.profile
<database>.system.js
<database>.system.views
译者:phoenix
时间: 2021.04.26
版本: 4.4
最近更新 1yr ago