# Obtain a Database

@snippet examples/api/mongocxx/examples/databases/obtain.cpp Example

# Database Operations

## Drop a Database

@snippet examples/api/mongocxx/examples/databases/drop.cpp Example

## Run a Command

@snippet examples/api/mongocxx/examples/databases/run_command.cpp Example

## Set a Read Concern

@snippet examples/api/mongocxx/examples/databases/rc.cpp Example

## Set a Write Concern

@snippet examples/api/mongocxx/examples/databases/wc.cpp Example

# Collection Operations

## Create a Collection

@snippet examples/api/mongocxx/examples/databases/create_collection.cpp Example

## Create a Collection With Options

@snippet examples/api/mongocxx/examples/databases/create_collection_with_options.cpp Example

## Query a Collection Exists

@snippet examples/api/mongocxx/examples/databases/has_collection.cpp Example

## List Collections in the Database

@snippet examples/api/mongocxx/examples/databases/list_collections.cpp Example

## List Collection Names in the Database

@snippet examples/api/mongocxx/examples/databases/list_collection_names.cpp Example

# Error Handling

## Invalid Database

@snippet examples/api/mongocxx/examples/databases/invalid.cpp Example
