Reconstruction of Consistent Global States in Distributed Databases