Add fake db + small fixes for MetadataDB.