Documenting database schemas

Note  This feature is available when the Use advanced tools general setting is selected. See Using advanced tools.

FileMaker Pro provides two ways to document the details of your custom app by saving:

  • a copy of the file in XML format

  • a Database Design Report

Saving a copy as XML

You can save a copy of a FileMaker Pro file in an XML format that represents the tables, fields, relationships, layouts, scripts, and other parts of the file. This XML format contains most of the details about the file, but it contains no record data.

Because the XML file is text, you can store it in version control systems such as Git and use standard text-based tools to compare versions.

To save a copy of a file as XML:

  1. Open all the files you want to save as XML.

    You must have full access privileges for the files, and the files must be open in FileMaker Pro.

  2. Choose Tools > Save a Copy as XML.

  3. In the Available files list, deselect any files that you want to exclude.

  4. From Catalogs to include, deselect any catalogs you want to exclude.

    Catalogs are different types of elements (tables, fields, relationships, scripts, layouts, and so on) that together define the schema of your custom app.

  5. Select additional options.

    Select To

    Include details for analysis tools

    Add more information in the XML file.

    This option adds the DDR_INFO element, which provides additional information that's useful to third-party tools you can use to analyze your custom app. Depending on your app, this option can produce a significantly larger XML file.

    Save each layout object's binary data under its node

    Store every layout object's binary data (for example, an image) under the layout object's node in the XML file. This can make the XML easier for some tools to use but can increase the XML file size.

    When this option is deselected, only a reference is stored under each layout object's node, which points to the library data catalog where the binary data is stored. This can help reduce file size when the same binary data is used for many layout objects.

    When creating separate XML files for catalogs, this option is selected and can't be changed.

    For each database, create a separate XML file for each catalog

    Create a separate XML file for each selected catalog in a database. The XML files are saved in a separate folder for each database.

    If deselected, this option creates one XML file for each database.

    Automatically open summary when done

    Open the Summary.xml file with the associated application when creating multiple XML files.

  6. Click Create.

  7. Change the default filename and choose a different folder, if needed.

    When saving multiple XML files, the filename is for the Summary.xml file.

  8. Click Save.

Notes

  • This XML format may change from one version of FileMaker Pro to the next. When you use the XML to compare two versions of a FileMaker Pro file, be sure that the same version of FileMaker Pro is used to save a copy of each file as XML. If you use the XML with other tools, be sure those tools are designed to use the XML saved by your version of FileMaker Pro.

  • For security, consider restricting access to the XML file to prevent unauthorized access to sensitive information in the file.

Creating a Database Design Report

Use the Database Design Report feature to document the schema of your database and save it as an HTML or XML file.

With the Database Design Report, you can:

  • produce reports for any databases that are currently open

  • gather statistics on the structure of your database

  • use the information in the report to re-create the structure of your database if you lose the original database files

  • examine a textual representation of your database schema

  • choose which elements (fields, relationships, scripts, and so on) and tables of the database to document

  • troubleshoot missing references, broken relationships, calculations, and more

A Database Design Report in HTML format includes a Report Overview that provides a snapshot of most of the elements in each database file. The Report Overview contains hyperlinks to details about elements in each database file.

A Database Design Report in XML format contains information about the elements in each database file, and is ready to be transformed into the format you require.

To create a Database Design Report:

  1. Open all database files for which you want to produce a Database Design Report.

    You must have full access privileges for any file for which you want to produce a Database Design Report and the file must be open in FileMaker Pro.

  2. Choose Tools menu > Database Design Report.

  3. In the Available Files list, clear any files that you want to exclude from the report by clearing the checkbox associated with the file.

  4. If there are any files that contain tables that you want to exclude from the report, select the filename in addition to the checkbox in the Available Files list.

  5. From Include in report, clear elements that you want to exclude from the report.

  6. If you prefer to publish the report in XML format instead of the default HTML, select XML in the Report Format section.

  7. Click Create, then Save to save the database design report.

Notes

  • The information provided in the HTML report is a subset of the information provided in the XML version.