# Database Manual - (manual) (Part 4 of 10) > This part of the MongoDB reference covers the remaining database commands and the start of the mongosh methods reference. - [transitionToDedicatedConfigServer (database command)](https://www.mongodb.com/docs/manual/reference/command/transitionToDedicatedConfigServer.md) - [unsetSharding (database command)](https://www.mongodb.com/docs/manual/reference/command/unsetSharding.md): Discover the internal `unsetSharding` command, which supports sharding functionality and is removed in MongoDB 5.0. - [unshardCollection (database command)](https://www.mongodb.com/docs/manual/reference/command/unshardCollection.md) - [update (database command)](https://www.mongodb.com/docs/manual/reference/command/update.md): Modify documents in a collection using the update command, which supports multiple update statements and options such as upsert, multi, collation, and aggregation pipelines. - [updateRole (database command)](https://www.mongodb.com/docs/manual/reference/command/updateRole.md): Update user-defined roles in MongoDB by specifying privileges, roles, and authentication restrictions using the `updateRole` command. - [updateSearchIndex (database command)](https://www.mongodb.com/docs/manual/reference/command/updateSearchIndex.md): Update an existing MongoDB Search index using the `updateSearchIndex` command, specifying the index's name or ID and new definition. - [updateUser (database command)](https://www.mongodb.com/docs/manual/reference/command/updateUser.md): Update a user's profile in MongoDB, replacing fields like roles and authentication restrictions, with options for password and custom data changes. - [updateZoneKeyRange (database command)](https://www.mongodb.com/docs/manual/reference/command/updateZoneKeyRange.md): Manage shard key value ranges and zones using the `updateZoneKeyRange` command in MongoDB. - [usersInfo (database command)](https://www.mongodb.com/docs/manual/reference/command/usersInfo.md): Retrieve information about MongoDB users using the `usersInfo` command, with options to display credentials, privileges, and authentication restrictions. - [validate (database command)](https://www.mongodb.com/docs/manual/reference/command/validate.md): Use the `validate` command to check and repair collection data and indexes for correctness, with options for thoroughness and BSON conformance. - [validateDBMetadata (database command)](https://www.mongodb.com/docs/manual/reference/command/validateDBMetadata.md): Check the validity of database or collection metadata against a specific API version using `validateDBMetadata`, which reports but does not fix errors. - [whatsmyuri (database command)](https://www.mongodb.com/docs/manual/reference/command/whatsmyuri.md): Discover your connection URI using the internal `whatsmyuri` command, compatible with Atlas, Enterprise, and Community environments. - [Config Database](https://www.mongodb.com/docs/manual/reference/config-database.md): Explore the collections in the `config` database that support sharded cluster operations and sessions, and understand their roles and restrictions. - [Self-Managed Configuration and Command-Line Options Mapping](https://www.mongodb.com/docs/manual/reference/configuration-file-settings-command-line-options-mapping.md): Map configuration file settings to `mongod` and `mongos` command-line options for self-managed deployments. - [Self-Managed Configuration File Options](https://www.mongodb.com/docs/manual/reference/configuration-options.md): Specify configuration file options for self-managed MongoDB deployments. Configure mongod and mongos instances at startup using YAML-format configuration files. - [Connection String Formats](https://www.mongodb.com/docs/manual/reference/connection-string-formats.md) - [Connection String Options](https://www.mongodb.com/docs/manual/reference/connection-string-options.md): Use connection string options to establish connections between MongoDB instances, tools, and applications that use drivers. - [Connection Strings](https://www.mongodb.com/docs/manual/reference/connection-string.md): Use connection strings to establish connections between MongoDB instances, tools, and applications that use drivers. - [Database Profiler Output](https://www.mongodb.com/docs/manual/reference/database-profiler.md): Explore the database profiler's output, capturing data on read, write, and cursor operations, and view metrics in the `system.profile` collection. - [Database References: Manual References and DBRefs](https://www.mongodb.com/docs/manual/reference/database-references.md): MongoDB database references store related information in separate documents in different collections or databases. Learn about manual references and DBRefs. - [Database Users](https://www.mongodb.com/docs/manual/reference/database-users.md) - [DDL Operations](https://www.mongodb.com/docs/manual/reference/ddl-operations.md) - [Default MongoDB Port](https://www.mongodb.com/docs/manual/reference/default-mongodb-port.md): The default TCP ports used by MongoDB for various instances and configurations. - [Error Codes](https://www.mongodb.com/docs/manual/reference/error-codes.md): Interpret MongoDB error codes to troubleshoot issues with `mongod` and `mongos` instances. - [Exit Codes and Statuses for a Self-Managed Deployment](https://www.mongodb.com/docs/manual/reference/exit-codes.md): Interpret MongoDB exit codes and statuses for troubleshooting `mongod` and `mongos` instances. - [External Configuration Values for Self-Managed MongoDB](https://www.mongodb.com/docs/manual/reference/expansion-directives.md): Load externally sourced values into MongoDB configuration files using expansion directives to obscure confidential information. - [Explain Results](https://www.mongodb.com/docs/manual/reference/explain-results.md): Understand how to interpret MongoDB's explain results for query plans and execution statistics, including key fields and stages. - [GeoJSON Objects](https://www.mongodb.com/docs/manual/reference/geojson.md) - [MongoDB Glossary](https://www.mongodb.com/docs/manual/reference/glossary.md): Glossary for definitions of key terms, database operations, deployment types, replication concepts, and storage engine features. - [Inconsistency Types](https://www.mongodb.com/docs/manual/reference/inconsistency-type.md): Explore various inconsistency types identified by the `checkMetadataConsistency` command in sharding metadata and indexes. - [AuthoritativeShardCatalogCollectionsPresent](https://www.mongodb.com/docs/manual/reference/inconsistency-type/AuthoritativeShardCatalogCollectionsPresent.md): Identify authoritative shard catalog collections that remain in the config.shard.catalog namespace after a cluster downgrades below feature compatibility version 9.0. - [CollectionAuxiliaryMetadataMismatch](https://www.mongodb.com/docs/manual/reference/inconsistency-type/CollectionAuxiliaryMetadataMismatch.md) - [CollectionOptionsMismatch](https://www.mongodb.com/docs/manual/reference/inconsistency-type/CollectionOptionsMismatch.md) - [CollectionUUIDMismatch](https://www.mongodb.com/docs/manual/reference/inconsistency-type/CollectionUUIDMismatch.md): Identify and understand `CollectionUUIDMismatch` inconsistencies in MongoDB sharded clusters, including their format and how to detect them. - [CorruptedChunkShardKey](https://www.mongodb.com/docs/manual/reference/inconsistency-type/CorruptedChunkShardKey.md): Identify and understand `CorruptedChunkShardKey` inconsistencies in MongoDB sharding metadata, including their format and example usage. - [CorruptedZoneShardKey](https://www.mongodb.com/docs/manual/reference/inconsistency-type/CorruptedZoneShardKey.md): Identify and understand `CorruptedZoneShardKey` inconsistencies in MongoDB sharding metadata, including their format and example usage. - [HiddenShardedCollection](https://www.mongodb.com/docs/manual/reference/inconsistency-type/HiddenShardedCollection.md): Identify and describe `HiddenShardedCollection` inconsistencies in MongoDB sharding metadata using the `checkMetadataConsistency` command. - [IncompatibleUniqueIndexOnShardedCollection](https://www.mongodb.com/docs/manual/reference/inconsistency-type/IncompatibleUniqueIndexOnShardedCollection.md): Identify unique indexes on a sharded collection that have incompatible index options, such as a non-simple collation or a shard key that is not a prefix of the index key. - [InconsistentIndex](https://www.mongodb.com/docs/manual/reference/inconsistency-type/InconsistentIndex.md): Identify and resolve index inconsistencies across shards using the `InconsistentIndex` type in MongoDB. - [InconsistentShardCatalogCollectionMetadata](https://www.mongodb.com/docs/manual/reference/inconsistency-type/InconsistentShardCatalogCollectionMetadata.md): Identify inconsistencies between collection metadata stored in the config server and the shard catalog on a sharded cluster, and view the fields that differ between them. - [LegacyShardCacheCollectionsPresent](https://www.mongodb.com/docs/manual/reference/inconsistency-type/LegacyShardCacheCollectionsPresent.md): Identify legacy shard catalog cache collections that remain in the config.cache namespace after a cluster upgrades to feature compatibility version 9.0. - [MisplacedCollection](https://www.mongodb.com/docs/manual/reference/inconsistency-type/MisplacedCollection.md): Identify and resolve misplaced collections in a sharded cluster using the `MisplacedCollection` inconsistency type. - [MissingLocalCollection](https://www.mongodb.com/docs/manual/reference/inconsistency-type/MissingLocalCollection.md) - [MissingRoutingTable](https://www.mongodb.com/docs/manual/reference/inconsistency-type/MissingRoutingTable.md): Identify and understand the `MissingRoutingTable` inconsistency in sharded collections, including its format and example usage. - [MissingShardKeyIndex](https://www.mongodb.com/docs/manual/reference/inconsistency-type/MissingShardKeyIndex.md): Identify and resolve the MissingShardKeyIndex inconsistency type, which occurs when a sharded collection does not have an index that supports its shard key. - [RangeDeletionMissingShardKeyIndex](https://www.mongodb.com/docs/manual/reference/inconsistency-type/RangeDeletionMissingShardKeyIndex.md): Identify and resolve the RangeDeletionMissingShardKeyIndex inconsistency type, which occurs when a range deletion task lacks a required shard key index. - [RoutingTableMissingMaxKey](https://www.mongodb.com/docs/manual/reference/inconsistency-type/RoutingTableMissingMaxKey.md): Understand the `RoutingTableMissingMaxKey` inconsistency in MongoDB, where a range gap exists because the routing table does not reach the maximum key. - [RoutingTableMissingMinKey](https://www.mongodb.com/docs/manual/reference/inconsistency-type/RoutingTableMissingMinKey.md): Understand the `RoutingTableMissingMinKey` inconsistency in MongoDB, where a range gap exists because the first chunk does not start at the minimum key. - [RoutingTableRangeGap](https://www.mongodb.com/docs/manual/reference/inconsistency-type/RoutingTableRangeGap.md): Identify and understand `RoutingTableRangeGap` inconsistencies in MongoDB sharding metadata, including details on affected chunks and collections. - [RoutingTableRangeOverlap](https://www.mongodb.com/docs/manual/reference/inconsistency-type/RoutingTableRangeOverlap.md): Identify and resolve `RoutingTableRangeOverlap` inconsistencies in MongoDB collections with overlapping shard key ranges. - [TrackedUnshardedCollectionHasInvalidKey](https://www.mongodb.com/docs/manual/reference/inconsistency-type/TrackedUnshardedCollectionHasInvalidKey.md) - [TrackedUnshardedCollectionHasMultipleChunks](https://www.mongodb.com/docs/manual/reference/inconsistency-type/TrackedUnshardedCollectionHasMultipleChunks.md) - [ZonesRangeOverlap](https://www.mongodb.com/docs/manual/reference/inconsistency-type/ZonesRangeOverlap.md): Identify and understand the `ZonesRangeOverlap` inconsistency in MongoDB, which occurs when overlapping zones exist for the same collection. - [Indexing Reference](https://www.mongodb.com/docs/manual/reference/indexes.md): Explore various indexing methods and commands in MongoDB, including creating, dropping, and rebuilding indexes, as well as geospatial query selectors. - [Troubleshooting](https://www.mongodb.com/docs/manual/reference/installation-ubuntu-community-troubleshooting.md): Resolve common installation issues for MongoDB on Ubuntu, including public key errors, package conflicts, and data directory access problems. - [MongoDB Limits and Thresholds](https://www.mongodb.com/docs/manual/reference/limits.md): Explore the hard and soft limitations of MongoDB, including maximum document size, collection limits, index restrictions, and namespace constraints across Atlas, Enterprise, and Community deployments. - [The ``local`` Database](https://www.mongodb.com/docs/manual/reference/local-database.md): Explore the `local` database in MongoDB, which stores replication data and instance-specific information, and learn about its collections and restrictions. - [MongoDB Log Messages](https://www.mongodb.com/docs/manual/reference/log-messages.md): MongoDB maintains a log of events such as incoming connections, commands run, and issues encountered. Log messages help diagnose issues and tune performance. - [Map-Reduce to Aggregation Pipeline](https://www.mongodb.com/docs/manual/reference/map-reduce-to-aggregation-pipeline.md): Translate map-reduce operations to aggregation pipelines for improved performance and usability, using operators like `$group` and `$merge`. - [``mongosh`` Methods](https://www.mongodb.com/docs/manual/reference/method.md): Lists and defines mongosh methods for interacting with your data and deployments. - [BSONRegExp() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/BSONRegExp.md) - [BinData() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/BinData.md): Create binary data objects using the `BinData()` method, specifying subtypes and base64 encoded buffers. - [Binary.createFromBase64() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Binary.createFromBase64.md): Create binary objects from base64 values using `Binary.createFromBase64()` in MongoDB. - [Binary.createFromHexString() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Binary.createFromHexString.md): Create a binary object from a hexadecimal string using `Binary.createFromHexString()` in MongoDB. - [Bulk.execute() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.execute.md): Execute bulk write operations using `Bulk.execute()` to perform multiple database operations efficiently. - [Bulk.find.arrayFilters() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.find.arrayFilters.md): Specify array filters for update operations using `Bulk.find.arrayFilters()` to determine which array elements to modify in MongoDB. - [Bulk.find.collation() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.find.collation.md): Specify collation for bulk write operations using `Bulk.find.collation()` to customize string comparison settings. - [Bulk.find.delete() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.find.delete.md): Use `Bulk.find.delete()` to add a multiple document delete operation to a bulk operations list, removing all documents that match a specified condition. - [Bulk.find.deleteOne() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.find.deleteOne.md): Add a single document removal operation to a bulk list using `Bulk.find.deleteOne()`, which deletes the first matching document. - [Bulk.find.hint() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.find.hint.md): Specify an index for bulk operations using `Bulk.find.hint()` to optimize update and replace operations in MongoDB. - [Bulk.find() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.find.md): Specify query conditions for bulk write operations using `Bulk.find()` to select documents for updates or removals. - [Bulk.find.remove() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.find.remove.md): Perform bulk write operations using `Bulk.find.remove()` to delete documents matching a specified query. - [Bulk.find.removeOne() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.find.removeOne.md): Perform bulk write operations using `Bulk.find.removeOne()` to delete a single document matching a query in MongoDB. - [Bulk.find.replaceOne() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.find.replaceOne.md): Use `Bulk.find.replaceOne()` to add a single document replacement operation to a bulk operations list, specifying conditions with `Bulk.find()`. - [Bulk.find.update() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.find.update.md): Perform multi-update operations using `Bulk.find.update()` to modify specific fields in documents based on conditions. - [Bulk.find.updateOne() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.find.updateOne.md): Perform single document updates in bulk operations using `Bulk.find.updateOne()` with conditions specified by `Bulk.find()`. - [Bulk.find.upsert() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.find.upsert.md): Set the upsert option to true for bulk update or replacement operations, allowing inserts if no matching documents are found. - [Bulk.getOperations() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.getOperations.md): Retrieve executed write operations from a bulk operation using `Bulk.getOperations()` after calling `Bulk.execute()`. - [Bulk.insert() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.insert.md): Add insert operations to a bulk list using `Bulk.insert()` for efficient document insertion in MongoDB. - [Bulk() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.md): Perform bulk write operations using the Bulk operations builder, supporting ordered and unordered execution in MongoDB. - [Bulk.toString() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.toString.md): Convert a Bulk operation object to a JSON string showing operation and batch counts. - [Bulk.toJSON() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Bulk.tojson.md) - [BulkWriteResult() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/BulkWriteResult.md): Explore the properties and exceptions of `BulkWriteResult`, which provides results from bulk write operations, including counts and error details. - [ClientEncryption.createEncryptedCollection() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/ClientEncryption.createEncryptedCollection.md): Create an encrypted collection in MongoDB using `ClientEncryption.createEncryptedCollection` with specified database, collection name, and encryption options. - [ClientEncryption.decrypt() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/ClientEncryption.decrypt.md): Decrypt encrypted values using `ClientEncryption.decrypt()` when connected to a database with access to the Key Management Service and key vault. - [ClientEncryption.encrypt() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/ClientEncryption.encrypt.md): Encrypt field values using `ClientEncryption.encrypt()` with specified key and algorithm, supporting explicit encryption in MongoDB environments. - [ClientEncryption.encryptExpression() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/ClientEncryption.encryptExpression.md) - [Date() and Datetime (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Date.md): Use the date method to return a new date. You can specify a date to return or return the current date. - [HexData() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/HexData.md) - [KeyVault.addKeyAlternateName() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/KeyVault.addKeyAlternateName.md): Add a unique alternate name to a data encryption key using `KeyVault.addKeyAlternateName(UUID, keyAltName)` in MongoDB. - [KeyVault.addKeyAltName() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/KeyVault.addKeyName.md): Add a unique key alternate name to a data encryption key's `keyAltNames` array using `KeyVault.addKeyAltName()`. - [KeyVault.createDataKey() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/KeyVault.createDataKey.md): Add a data encryption key to the key vault for client-side field level encryption using `KeyVault.createDataKey()`. - [KeyVault.createKey() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/KeyVault.createKey.md): Create a data encryption key in the key vault using `KeyVault.createKey()` for client-side field level encryption with various Key Management Services. - [KeyVault.deleteKey() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/KeyVault.deleteKey.md): Delete a data encryption key from the key vault using the `deleteKey()` method with a specified UUID. - [KeyVault.getKey() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/KeyVault.getKey.md): Retrieve a data encryption key using its UUID from the key vault associated with the database connection. - [KeyVault.getKeyByAltName() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/KeyVault.getKeyByAltName.md): Retrieve data encryption keys using `KeyVault.getKeyByAltName()` with client-side field level encryption enabled. - [KeyVault.getKeys() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/KeyVault.getKeys.md): Retrieve all data encryption keys stored in the key vault associated with your database connection using `KeyVault.getKeys()`. - [KeyVault.removeKeyAltName() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/KeyVault.removeKeyAltName.md): Remove a specified key alternate name from a data encryption key using `KeyVault.removeKeyAltName(UUID, keyAltName)`. - [KeyVault.removeKeyAlternateName() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/KeyVault.removeKeyAlternateName.md): Remove a key alternate name from a data encryption key using `KeyVault.removeKeyAlternateName()` in MongoDB. - [KeyVault.rewrapManyDataKey() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/KeyVault.rewrapManyDataKey.md): Rewrap multiple Data Encryption Keys with a new Customer Master Key using `KeyVault.rewrapManyDataKey()` to rotate encryption keys. - [Mongo.bulkWrite() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Mongo.bulkWrite.md) - [Mongo.getDB() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Mongo.getDB.md): Access database objects using `Mongo.getDB()` in `mongosh` or JavaScript by specifying the database name. - [Mongo.getDBNames() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Mongo.getDBNames.md): Retrieve a list of available databases using the `Mongo.getDBNames()` method, which calls the `listDatabases` command. - [Mongo.getDBs() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Mongo.getDBs.md): Retrieve information about all available databases using the `Mongo.getDBs()` method, which utilizes the `listDatabases` command. - [Mongo.getReadPrefMode() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Mongo.getReadPrefMode.md): Retrieve the current read preference mode for a `Mongo()` connection object using `getReadPrefMode()`. - [Mongo.getReadPrefTagSet() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Mongo.getReadPrefTagSet.md): Retrieve the current read preference tag set for a MongoDB connection using `getReadPrefTagSet()`. - [Mongo.getURI() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Mongo.getURI.md) - [Mongo.getWriteConcern() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Mongo.getWriteConcern.md): Retrieve the current write concern settings for a MongoDB connection using `Mongo.getWriteConcern()`. - [Mongo() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Mongo.md): Instantiate a database connection using the `Mongo()` JavaScript constructor with optional parameters for host, encryption, and API configuration. - [Mongo.setCausalConsistency() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Mongo.setCausalConsistency.md): Enable or disable causal consistency on a MongoDB connection object using the `setCausalConsistency` method. - [Mongo.setReadPref() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Mongo.setReadPref.md): Set read preferences on a Mongo connection to control query routing in replica sets, including options for mode, tag sets, and hedged reads. - [Mongo.setWriteConcern() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Mongo.setWriteConcern.md): Set the write concern for a MongoDB connection, specifying acknowledgment requirements and timeout settings. - [Mongo.startSession() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Mongo.startSession.md): Start a session in `mongosh` with options like causal consistency, read concern, and retryable writes. - [Mongo.watch() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Mongo.watch.md): Open a change stream cursor with `Mongo.watch()` to monitor data changes in non-system collections across databases in replica sets or sharded clusters. - [ObjectId.createFromBase64() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/ObjectId.createFromBase64.md): Create an ObjectId from a base64 string using `ObjectId.createFromBase64()` in MongoDB. - [ObjectId.createFromHexString() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/ObjectId.createFromHexString.md): Create an ObjectId from a hexadecimal string using `ObjectId.createFromHexString()` for MongoDB deployments. - [ObjectId.getTimestamp() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/ObjectId.getTimestamp.md): Retrieve the timestamp from an `ObjectId` using the `getTimestamp()` method, returning it as a Date object. - [ObjectId() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/ObjectId.md): Use the mongosh ObjectId() method to create a new 12-byte ObjectId value for a MongoDB document. Learn about syntax, accepted input types, and see examples. - [ObjectId.toString() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/ObjectId.toString.md): Use the mongosh ObjectId.toString() method to return the string representation of an ObjectId value. Learn about syntax, compatibility, and see a code example. - [PlanCache.clear() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/PlanCache.clear.md): Clear all cached query plans for a collection using the `PlanCache.clear()` method in MongoDB. - [PlanCache.clearPlansByQuery() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/PlanCache.clearPlansByQuery.md): Clear cached query plans for a specified query shape using `PlanCache.clearPlansByQuery()` in MongoDB. - [PlanCache.help() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/PlanCache.help.md): Access methods to view and modify a collection's query plan cache using `PlanCache.help()`. - [PlanCache.list() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/PlanCache.list.md): Retrieve plan cache entries for a collection using `PlanCache.list()` to analyze query shapes and cached plans. - [Session.abortTransaction() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Session.abortTransaction.md): Terminate a multi-document transaction using `Session.abortTransaction()` to roll back any changes made during the transaction. - [Session.commitTransaction() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Session.commitTransaction.md): Commit changes in a multi-document transaction using `Session.commitTransaction()` to ensure atomicity and consistency across sharded clusters and replica sets. - [Session](https://www.mongodb.com/docs/manual/reference/method/Session.md): Explore methods for managing sessions in `mongosh`, including starting, ending, and handling transactions within a session. - [Session.startTransaction() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Session.startTransaction.md): Start a multi-document transaction with `Session.startTransaction()` in MongoDB, specifying read and write concerns for operations within the session. - [Session.withTransaction() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/Session.withTransaction.md): Execute a lambda function within a transaction using `Session.withTransaction()`, with automatic retries for commit failures. - [SessionOptions](https://www.mongodb.com/docs/manual/reference/method/SessionOptions.md): Explore session options in `mongosh`, including causal consistency, read/write concerns, and retry writes settings. - [UUID() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/UUID.md): Generate a BSON UUID object using the `UUID()` method, optionally converting a 36-character string to a UUID. - [WriteResult() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/WriteResult.md): Understand the properties and compatibility of `WriteResult()` for tracking the status of write operations in MongoDB. - [connect() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/connect.md): Create a connection to a MongoDB instance using the `connect()` method, specifying the URL, user, and password parameters. - [convertShardKeyToHashed (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/convertShardKeyToHashed.md): Determine the hashed value of a shard key using the `convertShardKeyToHashed()` method for sharded collections. - [cursor.addOption() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.addOption.md): Modify query behavior using `cursor.addOption()` with flags like `tailable` and `awaitData` for MongoDB cursors. - [cursor.allowDiskUse() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.allowDiskUse.md): Enable or disable writing temporary files to disk for sort operations exceeding 100MB memory limit using `cursor.allowDiskUse()`. - [cursor.batchSize() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.batchSize.md): Specify the number of documents returned per batch in MongoDB queries using `cursor.batchSize(size)` to optimize performance. - [cursor.close() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.close.md): Close a cursor in MongoDB to free server resources, applicable in Atlas, Enterprise, and Community environments. - [cursor.collation() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.collation.md): Specify collation for a cursor in MongoDB using `cursor.collation()` to customize string comparison rules like locale, case, and diacritics. - [cursor.comment() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.comment.md): Add a comment to a MongoDB query using `cursor.comment()` to help track queries in diagnostic outputs like `system.profile` and `QUERY` logs. - [cursor.count() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.count.md): Count documents using `cursor.count()` in MongoDB, noting its deprecation in favor of `countDocuments()` and `estimatedDocumentCount()`. - [cursor.disableBlockWarnings() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.disableBlockWarnings.md): Use ``disableBlockWarnings()`` to silence warnings printed when using blocking calls on cursors, such as ``.next()`` or ``.hasNext()`` on change streams. - [cursor.explain() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.explain.md): Discover how to use `cursor.explain()` to obtain query plan details and execution statistics for MongoDB queries. - [cursor.forEach() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.forEach.md): Iterate over documents in a MongoDB cursor using `forEach()` to apply a JavaScript function to each document. - [cursor.hasNext() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.hasNext.md): Determine if a cursor from a `db.collection.find()` query can iterate further using `cursor.hasNext()`. - [cursor.hint() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.hint.md): Override MongoDB's default index selection for queries using the `cursor.hint()` method to specify a particular index. - [cursor.isClosed() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.isClosed.md): Check if a cursor is closed in `mongosh` using `cursor.isClosed()`, which returns `true` if the server has closed the cursor. - [cursor.isExhausted() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.isExhausted.md): Determine if a cursor has exhausted its current batch of documents using `cursor.isExhausted()`. - [cursor.itcount() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.itcount.md): Count the number of documents remaining in a cursor using `itcount()`, which exhausts the cursor's contents. - [cursor.limit() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.limit.md): Use `cursor.limit()` to specify the maximum number of documents returned, enhancing performance by limiting results before retrieval. - [cursor.map() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.map.md): Apply a function to each document in a cursor and collect results using `cursor.map()` in MongoDB. - [cursor.max() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.max.md): Specify an exclusive upper bound for index keys using `cursor.max()` to constrain `find()` query results in MongoDB. - [cursor.maxAwaitTimeMS() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.maxAwaitTimeMS.md): Specify the maximum wait time for new documents in a tailable cursor query using `maxAwaitTimeMS()`. - [cursor.maxTimeMS() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.maxTimeMS.md): Specify a cumulative time limit in milliseconds for processing operations on a cursor using the `maxTimeMS()` method. - [cursor.min() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.min.md): Specify the inclusive lower bound for an index using `cursor.min()` to constrain `find()` results in MongoDB. - [cursor.next() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.next.md): Retrieve the next document in a cursor using the `cursor.next()` method in `mongosh`. - [cursor.noCursorTimeout() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.noCursorTimeout.md): Prevent automatic closure of a cursor after inactivity using `noCursorTimeout()` in MongoDB. - [cursor.objsLeftInBatch() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.objsLeftInBatch.md): Determine the number of documents left in the current batch using `cursor.objsLeftInBatch()` in `mongosh`. - [cursor.pretty() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.pretty.md): Format query results for readability using the `pretty()` method in MongoDB shell. - [cursor.readConcern() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.readConcern.md): Specify a read concern level for the `db.collection.find()` method using `cursor.readConcern(level)` in MongoDB. - [cursor.readPref() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.readPref.md): Control query routing in replica sets using `cursor.readPref()` with options for read preference mode, tag sets, and hedged reads. - [cursor.returnKey() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.returnKey.md): Modify a cursor to return index keys instead of documents using `cursor.returnKey()`. - [cursor.showRecordId() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.showRecordId.md): Append the `$recordId` field to documents returned by a query using `cursor.showRecordId()` in `mongosh`. - [cursor.size() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.size.md): Count the number of documents matching a query after applying `skip` and `limit` methods using `cursor.size()`. - [cursor.skip() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.skip.md): Use the `skip()` method on a cursor to control the starting point for returning results, useful for implementing paginated queries. - [cursor.sort() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.sort.md): The MongoDB cursor sort method specifies the order of matching documents that a query returns. - [cursor.tailable() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.tailable.md): Use `cursor.tailable()` to keep a cursor open on a capped collection, allowing it to await new data even after exhausting current results. - [cursor.toArray() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.toArray.md): Use `cursor.toArray()` to convert a cursor's documents into an array, iterating through and exhausting the cursor. - [cursor.tryNext() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/cursor.tryNext.md): Access the next document in a cursor using `cursor.tryNext()`, which returns the document or `null` if unavailable. - [db.adminCommand() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.adminCommand.md): Execute administrative database commands using `db.adminCommand()` in MongoDB, applicable across various environments. - [db.aggregate() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.aggregate.md): Explore how to use `db.aggregate()` for running admin or diagnostic pipelines without requiring an underlying collection, including syntax and options. - [db.auth() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.auth.md): Authenticate users to a database using `db.auth()` in the shell, with options for password prompts and authentication mechanisms. - [db.changeUserPassword() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.changeUserPassword.md): Change a user's password in the database where the user is defined using `db.changeUserPassword(username, password)`. - [db.checkMetadataConsistency() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.checkMetadataConsistency.md): Perform consistency checks on sharding metadata using `db.checkMetadataConsistency()` to identify inconsistencies in MongoDB clusters or databases. - [db.collection.aggregate() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.aggregate.md): Use the db.collection.aggregate() method to calculate aggregate values for data in a collection or view, process documents, and return computed results. - [db.collection.analyzeShardKey() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.analyzeShardKey.md): Evaluate shard keys for collections using `db.collection.analyzeShardKey()` to calculate metrics based on sampled queries. - [db.collection.bulkWrite() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.bulkWrite.md): How to perform a series of ordered or unordered write operations with examples. - [db.collection.checkMetadataConsistency() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.checkMetadataConsistency.md): Perform consistency checks on sharding metadata for a collection using `db.collection.checkMetadataConsistency()`. - [db.collection.compactStructuredEncryptionData() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.compactStructuredEncryptionData.md): Use `db.collection.compactStructuredEncryptionData()` to compact encrypted data in MongoDB with automatic encryption enabled. - [db.collection.configureQueryAnalyzer() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.configureQueryAnalyzer.md): Configure query sampling for collections to analyze shard key metrics using `db.collection.configureQueryAnalyzer()`. - [db.collection.count() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.count.md): The count method is deprecated and should be replaced by the countDocuments or estimatedDocumentCount method - [db.collection.countDocuments() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.countDocuments.md): How to return the number of documents in a collection or view with examples. - [db.collection.createIndex() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.createIndex.md): Use the mongosh db.collection.createIndex() method to create an index on a MongoDB collection and improve query performance. Learn about syntax and options. - [db.collection.createIndexes() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.createIndexes.md): Create one or more indexes on a MongoDB collection using `db.collection.createIndexes()` with customizable options and commit quorum settings. - [db.collection.createSearchIndex() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.createSearchIndex.md): Create a MongoDB Search or Vector Search index on a specified collection using `db.collection.createSearchIndex()`. - [db.collection.dataSize() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.dataSize.md): Determine the size in bytes of a MongoDB collection using the `db.collection.dataSize()` method. - [db.collection.deleteMany() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.deleteMany.md): Use the mongosh db.collection.deleteMany() method to delete all documents that match a filter from a MongoDB collection. Learn about syntax and parameters. - [db.collection.deleteOne() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.deleteOne.md): Use the mongosh db.collection.deleteOne() method to delete a single document from a MongoDB collection. Learn about syntax, parameters, and see code examples. - [db.collection.distinct() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.distinct.md): Use the mongosh db.collection.distinct() method to find the unique values for a field across a MongoDB collection or view. Learn about syntax and parameters. - [db.collection.drop() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.drop.md): Use the db.collection.drop() method to remove a collection or view from a database. The method also removes any indexes associated with the dropped collection. - [db.collection.dropIndex() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.dropIndex.md): Remove a specified index from a collection with the `db.collection.dropIndex()` method, which leaves the default `_id` index intact. Specify the index by name or by document. - [db.collection.dropIndexes() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.dropIndexes.md): Use the `db.collection.dropIndexes()` method to remove one or more indexes from a collection. The method cannot remove the `_id` index or the last remaining shard key index. - [db.collection.dropSearchIndex() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.dropSearchIndex.md): Delete an existing MongoDB Search index using the `dropSearchIndex()` method in MongoDB Atlas. - [db.collection.estimatedDocumentCount() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.estimatedDocumentCount.md): Retrieve the count of all documents in a collection using `db.collection.estimatedDocumentCount()`, with optional parameters for count behavior. - [db.collection.explain() (mongosh method)](https://www.mongodb.com/docs/manual/reference/method/db.collection.explain.md): Explore how to use `db.collection.explain()` to obtain query plan and execution information for MongoDB operations, with options for different verbosity levels.