Compact databases