You are here: Menu Commands > Database > Database > Administration > Create table
GEOVIA Surpac

Create table

You can use this function to create a new table in your current database. You can store up to 47 optional tables in a database.

Prerequisites: A database is open.

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

  • In the Function Chooser, type CREATE TABLE, and press ENTER.
Fields on the Choose name and type for new table form

Field Description
Database Name

Read-only. The name of the current database.

Table Name

The name of the table to create. If you enter a table name that already exists in the database, an error message is displayed in the Message window.

Table Type

The type of table to create:

  • interval. Interval table types are for standard 'from/to' type of data, such as drill hole assays.
  • point. Point table types are specifically for data that relates to a single point, such as downhole geophysical logs.
  • discrete. Discrete sample tables are not directly related to the other tables in the database; that is, the collar, survey, interval and point tables, but they provide a very useful mechanism for storing sample data which is typically collected by geochemical soil sampling programs.
Time Dependent

In a time dependent table, the position of the sample does not physically change, but repeated samples are taken in the same position over time. Examples of this type of database include measurements of groundwater pressure, and flow rates.

When you click Apply, the Define all fields for all tables form is displayed.

This form permits you to define the characteristics of all the fields in the table which you are about to create.

The mandatory fields for the table are already partially defined and meaningful defaults are provided for each of the mandatory fields. You cannot change the field names and types of the mandatory fields. The inputs over which you have control for mandatory and optional fields are shown in the following table.

Fields on the Define all fields for all tables form

Field Description
Nulls

Whether or not nulls are allowed in the field.

For character fields storing blanks is equivalent to a NULL. For numeric fields storing blanks causes a ZERO to be stored in the field.

Index

The type of index that is required for this field. All mandatory indexes are created automatically for the database. The only field for which you can enter an Index value is the samp_id field in an interval or point table.

  • none - no index is created
  • unique - a unique index is created
  • duplicate - an index that permits duplicate values to be stored is created
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 only necessary if the field type is real.
Low Bound For numeric fields, the minimum value which you can enter.
High Bound For numeric fields the maximum value which you can enter.
Case

The case of characters which are required for the field. This is only necessary 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
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 table is created.