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. | Name | Description |
|---|---|---|
| 1 | Connection / Database | Choose 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. |
| 2 | Schemas | The schemas of the chosen connection (or database). Checked schemas go into the report. Check all turns them all on or off. |
| 3 | Create button | Starts building the report. You can click it once at least one schema is checked. |
Create a report
- In the object explorer, right-click a connection, database or schema and choose . The same menu is also on the right-click menu of an empty spot in the explorer. The dialog opens.
- 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.
- On the right (2), uncheck the schemas you don't want.
- Click the Create button (3) and confirm.
- 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.xlsxis 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
| Sheet | Contents |
|---|---|
DB - database name | The 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.
Related screens
- Object explorer: the right-click menu that opens this dialog, and refreshing.
- Data export, import and native backup: download the data, not the definitions, as files.
- Document an existing database as an ERD: organize a database's structure as an ERD instead of a spreadsheet.