Online Deduplication for Distributed Databases