The optimal placement of replicated items in distributed databases on tree-like networks