Project

General

Profile

NovaDAQDatabaseconfigNovaDAQDatabasexsd


<?xml version="1.0" encoding="utf-8" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">

  <xsd:element name="dBTable">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="dBColumn" type="dBColumn_t" minOccurs="1" maxOccurs="999"/>
        <xsd:element name="dBPKey" type="dBRow_t" minOccurs="0" maxOccurs="999"/>
        <xsd:element name="dBUnique" type="dBRow_t" minOccurs="0" maxOccurs="999"/>
        <xsd:element name="dBCheck" type="dBCheck_t" minOccurs="0" maxOccurs="999"/>
        <xsd:element name="dBRow" type="dBRow_t" minOccurs="0" maxOccurs="99999"/>
      </xsd:sequence>
      <xsd:attribute name="tableName"     type="xsd:string" use="required"/>
      <xsd:attribute name="dbHost"        type="xsd:string" use="required"/>
      <xsd:attribute name="dbName"        type="xsd:string" use="required"/>
      <xsd:attribute name="dbType"        type="xsd:string"/>
      <xsd:attribute name="creationDate"  type="xsd:string"/>
      <xsd:attribute name="maintainer"    type="xsd:string"/>
      <xsd:attribute name="xmlOverDB"     type="xsd:boolean"/>
      <xsd:attribute name="ignoreDB"      type="xsd:boolean"/>
      <xsd:attribute name="addCreateTime" type="xsd:boolean"/>
      <xsd:attribute name="addCreateUser" type="xsd:boolean"/>
      <xsd:attribute name="addUpdateTime" type="xsd:boolean"/>
      <xsd:attribute name="addUpdateUser" type="xsd:boolean"/>
    </xsd:complexType>
  </xsd:element>

  <xsd:complexType name="dBColumn_t">
    <xsd:attribute name="name" type="xsd:string" use="required"/>
    <xsd:attribute name="colType" type="xsd:string"/>
    <xsd:attribute name="value" type="xsd:string"/>
    <xsd:attribute name="null" type="xsd:boolean"/>
    <xsd:attribute name="fKeyTable" type="xsd:string"/>
  </xsd:complexType>

  <xsd:complexType name="dBCheck_t">
      <xsd:attribute name="constraint" type="xsd:string" use="required"/>
  </xsd:complexType>

  <xsd:complexType name="dBRow_t">
    <xsd:sequence>
      <xsd:element name="dBCol" type="dBColumn_t" minOccurs="0" maxOccurs="999"/>
    </xsd:sequence>
    <xsd:attribute name="runmax" type="xsd:string"/>
    <xsd:attribute name="runmin" type="xsd:string"/>
    <xsd:attribute name="subrunmax" type="xsd:string"/>
    <xsd:attribute name="subrunmin" type="xsd:string"/>
    <xsd:attribute name="tmax" type="xsd:string"/>
    <xsd:attribute name="tmin" type="xsd:string"/>
  </xsd:complexType>

</xsd:schema>

All values are stored as strings in the XML file. In the actual C++ implementation of the dB interface, the values are converted once to the column type if it is not a string (eg, int, float, etc.).