public Set<String> getTables(Connection connection) throws SQLException {
        Set<String> tables = new HashSet<>();

        DatabaseMetaData dbMeta = connection.getMetaData();

        try (ResultSet rs = dbMeta.getTables(null, null, "%", null)) {
            while (rs.next()) {
                tables.add(rs
                        .getString(3)
                        .toLowerCase(Locale.US));
            }
        }
        return tables;
    }
JDBC driver class.  Override as necessary.

@return
tika-eval/tika-eval-app/src/main/java/org/apache/tika/eval/app/db/JDBCUtil.java