public static List<String> getTables(Connection connection){
        List<String> table_names = new ArrayList<String>();
        try {
            ResultSet tables = connection.getMetaData().getTables(null,null,null,new String[]{"TABLE"});
            while(tables.next()){
                table_names.add(tables.getString(3));
            }
        } catch (SQLException e) {
            e.printStackTrace();
        }
        return table_names;
    }