Skip to content

Top-Level XML Elements

A database profile has the following top-level XML elements:

  • InitCommands: commands that run before the rest of the profile is loaded.
  • Commands: the SQL used by ObjectsTreeDef, ObjectsViewDef and ObjectsActionDef.
  • ObjectsActionDef: the actions for each object type.
  • ObjectsTreeDef: the structure of the objects tree and the objects it shows.
  • ObjectsViewDef: the object views for each object type.

A profile that extends another profile inherits the elements it doesn't define.

Each database connection loads a database profile. If there is no matching profile, the generic profile is used. It uses standard JDBC metadata calls to get information about some of the objects in the database. The generic profile is in DBVIS-HOME/resources/profiles/generic.xml.

XML template

The following template shows a database profile with all top-level XML elements.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE DatabaseProfile SYSTEM "dbvis-defs.dtd">

<DatabaseProfile desc="Profile for SQL Server"
                 minver="9.5"
                 extends="generic">

  <InitCommands extends="true">
    ...
  </InitCommands>

  <Commands extends="true">
    ...
  </Commands>

  <ObjectsActionDef extends="true">
    ...
  </ObjectsActionDef>

  <ObjectsTreeDef extends="false">
    ...
  </ObjectsTreeDef>

  <ObjectsViewDef extends="true">
    ...
  </ObjectsViewDef>

</DatabaseProfile>

The DOCTYPE declaration on line 2 names the DTD, dbvis-defs.dtd, that is used to validate the XML.

The root element is DatabaseProfile. The following pages describe the other elements.