发布于 2015-09-14 14:46:20 | 109 次阅读 | 评论: 0 | 来源: 网络整理
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.
System collections include these collections stored directly in the database:
The <database>.system.namespaces collection contains information about all of the database’s collections. Additional namespace metadata exists in the database.ns files and is opaque to database users.
The <database>.system.indexes collection lists all the indexes in the database. Add and remove data from this collection via the ensureIndex() and dropIndex()
The <database>.system.profile collection stores database profiling information. For information on profiling, see Database Profiling.
The <database>.system.users collection stores credentials for users who have access to the database. For more information on this collection, see 认证.
The <database>.system.js collection holds special JavaScript code for use in server side JavaScript. See Storing Functions Server-side for more information.