Screens: Connections and explorer

Table report

The Table Report dialog reads the table and view definitions of the schemas you pick from the database and puts them into one Excel (.xlsx) file. Use it when you have to hand in a table specification document, or to review a database's structure as a spreadsheet.

Where you can use itWebDesktopWithout signing inSigned inLocal projectsAccount projects

What's on the screen

No.NameDescription
1Connection / DatabaseChoose the connection to report on. For DBMSs with a database level (PostgreSQL, SQL Server and others), choose a database under the connection. Connections without schemas aren't listed.
2SchemasThe schemas of the chosen connection (or database). Checked schemas go into the report. Check all turns them all on or off.
3Create buttonStarts building the report. You can click it once at least one schema is checked.

Create a report

  1. In the object explorer, right-click a connection, database or schema and choose Explorer context menuReport.... The same menu is also on the right-click menu of an empty spot in the explorer. The dialog opens.
  2. Choose a connection or database on the left (1). The node you right-clicked is already chosen, with all its schemas checked. If you right-clicked a schema, only that schema is checked. If you right-clicked a connection with several databases, nothing is chosen yet, so choose a database first.
  3. On the right (2), uncheck the schemas you don't want.
  4. Click the Create button (3) and confirm.
  5. The dialog closes and a Table report · shop-db task appears in the status bar at the bottom. When it finishes, a file named table_report_datetime.xlsx is downloaded.

While the report is being built, the status bar task shows how many tables have been read. To stop, click the Cancel button in the status bar's task list (App menu, top bar and status bar).

What the report contains

SheetContents
DB - database nameThe database product and version, and the JDBC driver and version. Below that, a list of each table's Comment and indexes (name, order, columns, unique or not); clicking a table name goes to the sheet with that table's columns
One per schema (sheet name = schema name)One row per column: Schema, Table, PK, FK, Column, Type, NULL (N.N for NOT NULL), Default, Comment, Java Field, Java Type, Java Comment. The first row is frozen and has a filter
  • Views are included too, with their names shown in brown.
  • The Java Field, Java Type and Java Comment columns hold a Java field name, type and description made from the column name and type. For a column without a Comment, the column name is used as the description.
  • The Java Field name is made with the connection's column naming rules (or the table's own rules, if it has them). The rules are explained under Naming rules (Renamer) in Generating source code. For a table whose columns are not loaded in the explorer yet, or a column added in the database after that, the default rule is used (camelCase).

Things to keep in mind

  • The report is read again from the real database when it is built. Tables created in the project but not yet applied to the database aren't included.
  • The report includes the tables and views shown under that schema in the explorer. If a table dropped in the database is still shown in the explorer, the report can't be built and the task fails. If it fails, refresh that schema in the explorer and build the report again.
  • If you check only schemas that have no tables, the task fails.