private DataBase getDataBaseByKey(String key) throws DBUnavailabilityException {
        for (Pattern regexp : databases.keySet()) {
            Matcher matcher = regexp.matcher(key);
            if (matcher.find()) {
                return databases.get(regexp);
            }
        }
        throw new DBUnavailabilityException("database is unavailable");
    }