Replication keeps multiple copies of data. A primary-replica topology can scale reads and provide failover, but replicas may lag. Sharding partitions rows across machines using a shard key; a good key distributes traffic evenly and supports common query paths.
Choose storage by access patterns: relational databases provide transactions and joins, document stores fit flexible aggregates, key-value stores favor predictable lookups, and search indexes optimize text retrieval. A system design answer should explain the workload before naming a database.