Database sharding is a technique used to split a large database into smaller parts called shards and…