Within the schema designer, the term "field" is used to refer to a data item, attribute or column definition.
The fields in the schema designer application use a variety of data types supported by a wide variety of databases.
The basic field types supported are.
text | A text or character field. A maximum length can be set. |
number | A general number field. Stored the same as double. |
smallint | A 2-byte (short) integer field. |
integer | A 4-byte integer field. |
bigint | An 8-byte (long) integer field. |
double | A double-precision (8-byte) floating point number. |
decimal | A number with a define number of digits (the scale), of which some are decimals (the precision). For example, a number with a scale of 5 and a precision of 2 can hold numbers up to 999.99. |
date | A date. |
timestamp | A timestamp (date and time). |
boolean | A true or false value. |
The schema designer also supports fields used to link between entities. This is covered in a later section.
To create fields, use the New button from a data definition library, and select the Field option. This will let you set:
- A name for the field.
- A reference for the field (used to generate a column name, for example). This must use only the letters a-z, 0-9 and the underscore. Leave the reference blank to have a reference generated from the name.
- The data type.
- A description of the field.
For text fields, use the Text tab to set the maximum length, if required.
For decimal fields, use the Decimal tab to set the scale and precision.
Set the mandatory indicator to indicate that the record must always contain the field. How this is processed depends on the system. The Data Hub ignores the mandatory indicator.
The field information is derived into a Node options field. You can enter Node options also - values you enter will override those from the field definition.
As well as the general Field type, there are specific field types for each of the data types. You can use these if you prefer. If you have used a specific field type and you need to change the data type, use the Change type option (in the schema designer explorer, when looking at the field in browse view) to select a different field type.