You are here: Menu Commands > Design > Blast design > Database > Administration > Create field
GEOVIA Surpac

Create field

With this function, you can add a field to a table.

Prerequisites: A database is open.

To run this function: Choose Survey > Survey database > Administration > Create field, or Database > Database > Administration > Create field, or Design > Blast design > Database > Administration > Create field, or...

  • In the Function Chooser, type DB ADD FIELD, and press ENTER.
Fields on the Add fields to table form

Field Description
Define optional fields for The name of the table in which to create the field.
Name The name of the field to create. Names must start with a letter, and contain only letters, numbers and underscore characters.
Type

Enter the field type for the data which is to be stored in the field. Valid entries are:

  • boolean - only TRUE and FALSE values may be stored
  • character - character data
  • datetime - date and time to be entered in the format yyyy-mm-dd hh:mm:ss
  • duration - a duration to be entered in the format yyyy-mm-dd hh:mm:ss
  • integer - integer data (numeric data with no decimal places)
  • real - real data (numeric data with decimal places)
Nulls Whether or not nulls are allowed in the field. For a character field, storing a blank is equivalent to a NULL. For a numeric field, storing blanks causes a ZERO to be stored in the field.
Length The length of the field in which the data is to be stored. Length should be large enough to include the decimal point and decimal places when the field type is real.
No Dec The number of decimal places to be stored. No Dec is necessary only if the field type is real.
Case

The case of characters which are required for the field. This is necessary only if the field type is character. Valid entries are:

  • lower - only lower case characters may be entered
  • upper - only upper case characters may be entered
  • mixed - mixed case characters may be entered
Low Bound For numeric fields, the minimum value you can enter.
High Bound For numeric fields, the maximum value you can enter.
Valid Entries

You can use this field to limit the character data that people can enter to a predefined set of values. Each separate value must be separated by a semi-colon, for example ";OVB;GRA"

If you have a large number of values, it is better to enter them into the translation table as described here. The valid entries are designated as stored in the translation table by entering the "@" symbol followed by the field name in the translation table which contains the permitted values.

If the valid entries are stored in the translation table, you must enter "@(translation table field name) here to tell the system to look in the translation table when validating input for this field.

Phys, Virt, or Exp

You must indicate whether physical data is stored in this field, or whether the field is a virtual field which contains a function for translating values from an associated physical field.

  • physical
  • Any field in which you wish to store data must be defined as a physical field, that is, data is physically stored in the field. See the explanation regarding physical and virtual fields.

  • virtual
  • A virtual field has no space reserved in the database table for it. Instead a special translation function is defined to convert internally stored values to a preferred value for display purposes.

  • expression
  • This permits you to enter an algebraic expression using field names in the database table as variables to derive a suitable value at the time a value is retrieved from the field.

Reference field or Expression

If the field is a virtual field, you must enter the name of the reference field from which values are to be extracted before translation by the function associated with this field. If the field is an expression, enter the expression.

Output

The new field is created in the table you specified.