MongoDB系统集合

Synopsis 概要

MongoDB stores system information in collections that use the <database>.system.* namespacearrow-up-right, 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 databasearrow-up-right, specifically for replication purposes and in the config databasearrow-up-right for sessions informationarrow-up-right.

MongoDB将系统信息存储在使用<database>.system.*命名空间arrow-up-right的集合中,这些集合是MongoDB保留供内部使用的。用户请不要创建以system开头的集合。

MongoDB还将一些额外的本地元数据存储在local数据库arrow-up-right中,专门用于主从复制;并在config数据库arrow-up-right中存储会话信息arrow-up-right

Collections 集合

System collections include these collections stored in the admin database:

  • admin.system.roles

    The admin.system.rolesarrow-up-right collection stores custom roles that administrators create and assign to users to provide access to specific resources.

  • admin.system.users

    The admin.system.usersarrow-up-right 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.rolesarrow-up-right collection.

  • admin.system.version

    The admin.system.versionarrow-up-right 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数据库中的以下集合:

System collections include these collections stored in the config database:

  • config.system.indexBuilds

    New in version 4.4.

    The indexBuildsarrow-up-right collection stores information related to in-progress index builds.

系统集合包括存储在config数据库中的以下集合:

  • config.system.indexBuilds

    4.4版本新引入

    indexBuilds集合存储了与正在进行的索引创建有关的信息。

System collections also include these collections stored directly in each database:

系统集合还包括以下直接存储在每个数据库中的集合:

  • <database>.system.namespaces

    注意

    4.2版本中被移除

    从MongoDB 4.2开始,<database>.system.namespaces已被删除(从3.0开始不推荐使用该集合)。要列出数据库中的集合,请改用listCollectionsarrow-up-right命令。

  • <database>.system.indexes

    注意

    4.2版本中被移除

    从MongoDB 4.2开始,<database>.system.indexes已被删除(从3.0开始不推荐使用该集合)。要列出数据库中的集合,请改用listIndexesarrow-up-right命令。

  • <database>.system.profile

    <database>.system.profile集合存储数据库分析信息。有关分析的信息,请参见数据库分析arrow-up-right

  • <database>.system.js

    <database>.system.js集合包含用于服务器端JavaScriptarrow-up-right的特殊JavaScript代码。有关更多信息,请参见在服务器上存储JavaScript函数arrow-up-right

  • <database>.system.views

    <database>.system.views集合包含有关数据库中每个视图arrow-up-right的信息。

译者:phoenix

时间: 2021.04.26

原文: https://docs.mongodb.com/manual/reference/system-collections/arrow-up-right

版本: 4.4

最后更新于