Help Databases and objects

Database schema as HTML

bonSQL can write a description of a database’s tables to an HTML file: every column with its type and attributes, every index and every foreign key. The file opens in your web browser and can be printed or kept with a project’s documents.

The Create Schema dialog

Opening it

Select the database in the Object Browser, then press Ctrl+Shift+Alt+S or choose Database > Create Schema For Database In HTML…. The dialog’s title names the database.

Choosing the tables

The list, headed Select table(s) for schema generation, shows the database’s tables, all selected to start with. Views are not listed. Click a table to select or deselect it.

ButtonDoes
Create…Asks where to save the file (.htm or .html), then writes it.
Select AllSelects every table.
Deselect AllClears the selection.
CancelCloses the dialog without writing anything.

At least one table must be selected; if none is, bonSQL says Select at least one table. While the file is written, the line under the list says which table bonSQL is working on. When it is done, bonSQL says Schema generation successful, closes the dialog and opens the file with the program Windows uses for HTML files.

What the file contains

When printed, each table starts on a new page.

Tips

When it does not work

If bonSQL cannot create or write the file, it says Could not create file. or Could not write into file., and the dialog shows Error while generating schema. Choose a folder you can write to, and check that the file is not open in another program.

If the server refuses to describe a table, bonSQL shows the server’s error first. The Could not write into file. message that follows is then about that error, not about the file.