Database Scripts

Events are primarily a development time concept they are defined in XML files, raised in application code and handled by application defined call-backs. However some administration utilities in the application need access to the list of events defined and available in a running system; thus they are also loaded onto the data base.

Below are examples of the DMX files generated from the event definitions for the two entities used to store the event definitions.

Figure 1. Generated event class database script
<?xml version="1.0" encoding="UTF-8"?>
  <table name="EVENTCLASS">
    <column name="EVENTCLASS" type="text"/>
    <row>
      <attribute name="EVENTCLASS">
        <value>CLASS1</value>
      </attribute>
    </row>
    <row>
      <attribute name="EVENTCLASS">
        <value>CLASS2</value>
      </attribute>
    </row>
  </table>
Figure 2. Generated event type database script
<?xml version="1.0" encoding="UTF-8"?>
  <table name="EVENTTYPE">
    <column name="EVENTCLASS" type="text"/>
    <column name="EVENTTYPE" type="text"/>
    <row>
      <attribute name="EVENTCLASS">
        <value>CLASS1</value>
      </attribute>
      <attribute name="EVENTTYPE">
        <value>EVENT1</value>
      </attribute>
    </row>
    <row>
      <attribute name="EVENTCLASS">
        <value>CLASS2</value>
      </attribute>
      <attribute name="EVENTTYPE">
        <value>EVENT2</value>
      </attribute>
    </row>
  </table>