How to document specific database objects using MySQL database documentation tool

Applies to

ApexSQL Doc for MySQL

Summary

In this article, it will be explained how to document chosen database objects using the MySQL database documentation tool.

Description

When it is necessary to share information between developers, and some developers do not have permission to access certain objects from the database, ApexSQL Doc for MySQL provides the possibility of documenting targeted database objects from an account that has access and then the documentation can be shared later on with developers which do not have permissions.

This way required time for generating and reading the documentation will be significantly shorter since the documentation will contain only the desired information.

In this article, it will be described how to document only desired database objects. Let’s say that we have a use case that requires address, addresstype, and contact tables from the adventureworks and customer, city, and film tables from the sakila databases to be documented.

The whole process will be explained in the steps below:

  1. The first step is to establish a connection to the server. This can be done in two ways; the first way is to click on the Add database button from the Home tab in the Actions section and the second way is to click on the Add button from the middle of the main window. In both ways the same connection dialog window will appear:

    The opening procedure the Connection dialog window in the MySQL database documentation tool

  2. In the Connection window, the following text boxes need to be filled with the required information before the Connect button is clicked:

    • Name of the connection
    • Select Type of the connection
    • Server name
    • Port number
    • User and Password

    The Connection window

    When the connection to the server is established, the name of the server will be shown in the middle of the main window. On the right side of the MySQL database documentation tool window, a list of all databases from the selected server is shown:

    The list of the MySQL databases from the selected server

    • Note: ApexSQL Doc for MySQL supports multiple connections with MySQL servers
  3. Now, let’s select the checkboxes for the desired databases from the list, in this example, it will be adventureworks and sakila as shown below:

    The process of selections of MySQL databases for the documentation

  4. When databases are selected, click on the Database objects tab under the Data sources and objects panel:

    The Data sources and objects panel in the MySQL database documentation tool

  5. All database objects available for the documentation will be listed in the middle of the window. In this example, only Tables will be checked and included in the documentation:

    Select desired object type for the documentation

  6. When the desired database objects are checked, from the Table options grid on the right, the developer can check/uncheck which table options should be included in the documentation. In this example, Columns and Indexes will be checked:

    Available Table options for the documentation

  7. The next step is to click on the Object filter grid. All tables from the selected databases will be listed in the grid below. Here, the users can check/uncheck desired tables from different databases. In this example, the address, addrestype, and contact tables will be checked from the adventureworks database:

    Select desired tables for the documentation

    And from the sakila database, the customer, city, and film tables will be checked as shown below:

    Select desired tables for the documentation

  8. When the customizing process of the documentation is done, the next step is to select the output file format for the documentation. Default output file format is CHM, but HTML, Markdown, DOC, DOCX or PDF can be selected from the File format tab:

    The available output file formats in the MySQL database documentation tool

  9. The final step in the whole process is to generate the documentation. This can be done by clicking on the Generate button from the Home tab under the Actions section:

    The Generate button is used to generate the documentation

Here is an example of how generated documentation using MySQL database documentation tool will look in the .CHM output file format:

The generated documentation