XML schema storage definition

<xs:schema version="1.0"

  xmlns:tns="http://www.tsystems.com/ima/9.0/dbTableStorageDefinition"

  xmlns:xs="http://www.w3.org/2001/XMLSchema"

  xmlns:xml="http://www.w3.org/XML/1998/namespace"

  targetNamespace="http://www.tsystems.com/ima/9.0/dbTableStorageDefinition">

 

  <xs:element name="tableStorageDefinition" type="tns:dbTableStorageDefinition"/>

 

<!--

  tableStorageDefinition - the table storage parameter for ImageMaster 9 model.

  -->

  <xs:complexType name="dbTableStorageDefinition">

    <xs:sequence>

        <!--

          defaultTablespaceDefinition - this storage definition is used for tables which will

          not partitioned. This is in case of undefined partionMethod or the table has

          no partition key (column partition_key).

          -->

      <xs:element name="defaultTablespaceDefinition"

                  type="tns:dbTablespaceDefinition" minOccurs="1" maxOccurs="1"/>

        <!--

          partitionMethod - the partitionMmethod define the partition. This is an enumeration

          of possible partition strategies. This depends on the underlying rdbms system.

          -->

        <xs:element name="partitionMethod"

                    type="tns:dbPartitionMethod" minOccurs="0" maxOccurs="1"/>

    </xs:sequence>

  </xs:complexType>

 

  <xs:complexType name="dbPartitionMethod">

    <xs:sequence>

      <xs:choice minOccurs="1" maxOccurs="1">

        <xs:element name="rangePartitioning"

                    type="tns:dbRangePartitioning" minOccurs="1" maxOccurs="1"/>

        <xs:element name="hashPartitioning"

                    type="tns:dbHashPartitioning" minOccurs="1" maxOccurs="1"/>

        <xs:element name="listPartitioning"

                    type="tns:dbListPartitioning" minOccurs="1" maxOccurs="1"/>

        <xs:element name="schemePartitioning"

                    type="tns:dbSchemePartitioning" minOccurs="1" maxOccurs="1"/>

      </xs:choice>

    </xs:sequence>

  </xs:complexType>

 

  <xs:complexType name="dbListPartitioning">

    <xs:sequence>

      <xs:element name="partition"

                  type="tns:dbPartitionByMultiValue" minOccurs="1" maxOccurs="unbounded"/>

    </xs:sequence>

  </xs:complexType>

 

  <xs:complexType name="dbRangePartitioning">

    <xs:sequence>

      <xs:element name="partition"

                  type="tns:dbPartitionByValue" minOccurs="1" maxOccurs="unbounded"/>

    </xs:sequence>

  </xs:complexType>

 

  <xs:complexType name="dbHashPartitioning">

    <xs:sequence>

      <xs:element name="partition"

                  type="tns:dbPartition" minOccurs="1" maxOccurs="unbounded"/>

    </xs:sequence>

  </xs:complexType>

 

  <!-- SQL Server only -->

  <xs:complexType name="dbSchemePartitioning">

    <xs:attribute name="tablePartitionScheme" type="xs:string" use="required"/>

    <xs:attribute name="indexPartitionScheme" type="xs:string" use="required"/>

  </xs:complexType> 

 

  <xs:complexType name="dbTablespaceDefinition">

    <xs:attribute name="tablespace" type="xs:string" use="optional"/>

    <xs:attribute name="indexspace" type="xs:string" use="optional"/>

  </xs:complexType>

 

  <xs:complexType name="dbPartition">

    <xs:sequence>

        <xs:element name="tablespaceDefinition"

                    type="tns:dbTablespaceDefinition" minOccurs="0" maxOccurs="1"/>

    </xs:sequence>

    <xs:attribute name="name" type="xs:string" use="required"/>

  </xs:complexType>

 

  <xs:complexType name="dbPartitionByValue">

    <xs:sequence>

        <xs:element name="tablespaceDefinition"

                    type="tns:dbTablespaceDefinition" minOccurs="0" maxOccurs="1"/>

    </xs:sequence>

    <xs:attribute name="name" type="xs:string" use="required"/>

    <xs:attribute name="value" type="xs:string" use="required"/>

  </xs:complexType>

 

  <xs:complexType name="dbPartitionByMultiValue">

    <xs:sequence>

        <xs:element name="values" type="tns:dbValueList" minOccurs="0" maxOccurs="1"/><!-- minOccurs=0 for backward compatibility -->

        <xs:element name="tablespaceDefinition" type="tns:dbTablespaceDefinition" minOccurs="0" maxOccurs="1"/>

    </xs:sequence>

    <xs:attribute name="name" type="xs:string" use="required"/>

    <xs:attribute name="value" type="xs:string" use="optional"/> <!-- must still exist for backward compatibility -->

  </xs:complexType>

 

 <xs:complexType name="dbValueList">

    <xs:sequence>

        <xs:element name="value" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>

    </xs:sequence>

  </xs:complexType>

 

</xs:schema>