String path = uri.getPath();
    if (!path.startsWith('/')) { throw new SQLException("Path does not start with a slash: " + path); }
    path = path.substr(1);
    if (path.endsWith('/')) { 
        path = path.substr(0, path.length() - 1); 
        if (path.isEmpty()) throw catalog is empty
    }