8.2.2. Split database model format

This plug-in introduces a new file format to store database models called the split database model (.sdbm). It was designed to improve the version control of model files by saving the XML code of the objects in individual files. This way, it is easier to track the changes made in each database object when the model is handled by several people in a team. For now, pgModeler only saves and loads the split database model. Below, is an example of how the split database model is arranged:

The .sdbm is a variant of the classic .dbm file where some metadata of the database model are stored but with the difference that in this file instead of having all objects' XML code attached there are references to database object files .dbo which in turn store the XML code that defines each object. Each .dbo file is categorized and saved in the folder related to the database object type. For example, the database definition is stored in the file demodb.dbo in the subfolder database. The table schema_a.table_e is saved in schema_a_table_e.dbo in the folder table, and so on. The following image shows an example of the demodb sample model saved in split mode.

pgModeler still relies on the classic .dbm files when loading the split database model. In resume, when opening a .sdbm, pgModeler reconstructs the entire database model by parsing the .sdbm and .dbo files creating a temporary .dbm file where all the modifications will be applied during design time. Every time the user saves the model pgModeler automatically updates the split database model definition so it can stay synchronized with the temporary one.

To help the user to identify the database model file types that are being handled, pgModeler shows, at the base of the design area (see the image) the badges Split model for models loaded from .sdbm and Single model for models loaded from .dbm files. When working with split models, both badges are displayed to indicate that pgModeler is taking care of the original .sdbm and the temporary .dbm file created from the loading process of the split model. Finally, if you are working with a classical .dbm file and want to save it in the split format, just click the action to create a split version of the model.

Jun 29, 2023 at 15:08