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.
<column /> *
|Aunder||string||If you want to create a subtype, you must indicate the name of the parent object, from which it will inherit its attributes.|
|Ecolumn||Columns that make up the structure. See section DDL:COLUMN.|
In the element type, columns are indicated with the column element, in the same way as in the element DDL:TABLE.
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.
<type name='r_main'> <column name='codigo' type='integer' required='y' /> <column name='nombre' type='char' size='40' /> </type>
<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>