#### Transformation rules

When an XML schema is transformed to a relational schema automatically, the following transformation rules will be applied:

- A simple element in the XML schema will be transformed according to the following two rules:
  - If the Is Multiple property is set to true, elements will be transformed to a relational table. Contents of the simple element will be transformed to records of a column in the table and the column is named the same with the element.
  - If the Is Multiple property is set to false, contents of the simple element will be transformed to columns in the table transformed from the parent element of the simple element, and columns are named the same with the simple element.

  Note: The value of the Is Multiple property of a simple element is defined by the value of its maxOccurs property in the XSD. If you modify it and make it not match with the maxOccurs property in the transformation process according to your requirements, the element will be transformed according to the Is Multiple property regardless of the maxOccurs property. The following are the two conditions:

  - If the value of maxOccurs property of a simple element in XSD is greater than 1 or unbounded, but its Is Multiple property is modified to False in the transformation process, then only the last content of this element in XML instance can be transformed to a column.
  - If the value of maxOccurs property of a simple element in XSD is less than or equals to 1, but its Is Multiple property is modified to True in the transformation process, then the element will be transformed to a table with only one column and one record.
- Attribute(s) of an element in the XML schema will be transformed to column(s) in the table, which is transformed from the element.
- A complex element in the XML schema will be transformed to a relational table. Contents of complex elements may contain three kinds of sub-nodes: text, simple element and sub-complex element.
  - Text in the XML will be ignored in the transformation process.
  - Each simple element will be transformed to a column in the table according to the rules above.
  - Each sub-complex element will be transformed to a table according to the rules above.

Here presents four illustrative examples for you to understand the transformation rules more easily:

- Example 1: Transforming a simple element occurred more than once to a table
- Example 2: Transforming a simple element occurred once or not occurred to a column
- Example 3: Transforming an attribute of an element to a column
- Example 4: Transforming a complex element to a table