1 Type

The element type allows you to create record structures that can be used by tables or by other type objects. The use of these structures also allows the creation of hierarchical data structures. Structures are very useful when creating several tables with the same composition of columns. To assign a column structure to a table, simply specify in the type attribute of the table element the name of the object assigned in the name attribute.

<type
    name='name'
    under='under'
>
    <column /> *
</type>

Information

In the element type, columns are indicated with the column element, in the same way as in the element DDL:TABLE.

2 Examples

In the following example two type elements are created. The first has a two-column data structure; in the second object there is an attribute under with the name of the first object, from which it will inherit its properties.

Example
Copy
<type name='r_main'>
    <column name='codigo' type='integer' required='y' />
    <column name='nombre' type='char' size='40' />
</type>
Example
Copy
<type name='r_aux' under='r_main'>
   <column name='imploc' type='decimal' size='14, 2' required='y' />
   <column name='impdiv' type='decimal' size='14, 2' required='y' />

</type>