Let DatabaseManager provide a comparator to compare two databaseId