> For the complete documentation index, see [llms.txt](https://shashankrnr32.gitbook.io/mongodb-application-sharding/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://shashankrnr32.gitbook.io/mongodb-application-sharding/sharding-strategies/collection-sharding-strategy.md).

# Collection Sharding Strategy

Collection Sharding Strategy

Sharding strategy where data is divided into multiple collections in a single database identified by a shardHint (usually a suffix to the collection name). The read & write queries made to the database resolves the collection to route the query to based on the Sharding hint set in the context. The schema across all the different shards in a database is same.

```shell
ds0> show collections
TEST_0
TEST_1
TEST_2
```

In the above example, the base name of the collection is `TEST` with the valid shard hints being 0, 1 and 2. Any read or write query made to the database routes the query to the right collection based on the hint set in the context.

###
