Create ring design database
A Ring Design database is a Surpac Geological Database with some specific additional mandatory fields and tables. After the database is created, the GEOLOGICAL DATABASE tools can be used to maintain the database.
To run this function: Choose Design > Ring design > Ring design > Create ring design database, or...
Database Name
Enter the name of the database you wish to create.
Choose Apply to apply the function or Cancel to cancel the function. If the named .ddb file already exists, the function finishes. If the specified name is the name of a new file, the CREATE DEFINITION FOR NEW DATABASE FORM will be displayed to confirm that you wish to create this database.
Choose Apply to verify creation of the database definition or Cancel to re-enter the database name. If you apply the form, the CHOOSE DATABASE TYPE form will be displayed.
Database Name
Displays the name of the database being created.
Database Type
Enter the type of the database to be created.
ODBC connect string
Enter the ODBC connection string for the database.
y x z survey and sample co-ordinates
A Ring Design database contains certain fields for storing sample and charge from and to coordinates and down hole survey coordinates.
Valid entries are:
- STORED - fields contain stored data whereby you already have the coordinates and want to load them into the database, or
- CALCULATED - the program will calculate the values for the relevant x, y z fields every time they are required.
Stored data will allow for faster processing as once the data is in the database the coordinates will not have to be repeatedly calculated, but it will increase the size of your database. It is recommended to use calculated.
Choose Apply to display the CHOOSE OPTIONAL TABLES FOR NEW DATABASE form. This function will automatically build tables for charge, collar, contacts, pivots, sample, styles, survey, and translation.
The name and type of database and a list of the mandatory tables are displayed at the top of the form.
Table name
Enter the name of the tables that you wish to create.
Table Type
Enter the type of table that you wish to create.
Valid entries are:
- interval - interval table types are for standard 'depth from/depth to' types of data, such as drill hole samples,
- point - point table types are specifically for data that relates to a single point down the hole, such as downhole geophysical information.
- discrete - discrete sample tables are not directly related to the other tables in the database, i.e. the collar, survey, interval and point tables, but they provide a very useful mechanism for storing sample data which is typically collected during geochemical soil sampling programs.
Time Dependent
Optional tables can be created to store time dependent data, that is, the position of the sample does not change, but repeated samples are taken in the same position over time. For example, measurements of groundwater pressure, and contaminants, etc., where the observations change with time. Data that is not time dependent will only allow for one sample observation to be stored at the same position down the hole. If another reading is taken, then you will need to decide whether to overwrite the original reading or store the second value in another field. Sample and geological data are examples of non time dependent data.
Enter 'y' if a time dependant table is requested, otherwise Time dependant tables will have a field samp_date for recording the sample date.
Complete the CHOOSE OPTIONAL TABLES FOR DATABASE form and choose Apply to display the DEFINE MANDATORY AND OPTIONAL FIELDS FOR DATABASE TABLES form.
This form permits you to define the characteristics for all the tables in the database which you are about to create. A number of scrolling regions are displayed to permit you to define the necessary inputs. During the course of entering the data you will find it necessary to scroll up and down through the form to make the necessary entries.
For each table which is to be created in the database, there are two scrolling regions for making entries. The first scrolling region is for defining the mandatory field characteristics and the second scrolling region is for defining the optional field characteristics. Each of these scrolling regions and the entries which must be made are described in more detail below.
Define mandatory fields for (table name)
The mandatory fields for each table in the database are already partially defined and meaningful defaults are provided for each of the mandatory fields. The field names and field types for the mandatory fields cannot be changed. The inputs over which you have control are:
Nulls
Enter ``Y'' if null values are to allowed to be stored in a field otherwise enter ``N''.
At this time Nulls are handled differently to most database management systems. For character fields storing blanks is equivalent to a NULL while for numeric fields storing blanks (sometimes considered as NULL) will result in a ZERO being stored in the field.
Index
Define what type of index is required for this field. All mandatory indexes are created automatically for the database. The only field for which this input is permitted at this point is the samp_id field in an interval or point table.
Valid entries are:
- none - no index will be created
- unique - a unique index will be created
- duplicate - an index which permits duplicate values to be stored will be created
Length
This is the length of the field in which the data is to be stored, and should be large enough to include the decimal point and decimal places when the field type is real.
No Dec
This is the number of decimal places to be stored and is only necessary if the field type is real.
Low Bound
For numeric fields enter the minimum value which may be entered.
High Bound
For numeric fields enter the maximum value which may be entered.
Define optional fields for (table name)
The optional fields for each table in the database must be defined completely, this includes the field name, field type and also the parameters which have already been explained for the mandatory fields.
Field name
Enter the name of the field which is to be created. 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. This is included for completeness although it is unlikely to be used.
- character - character data. Hole IDs, sample IDs and geology codes are stored as character data.
- datetime - date and time to be entered in the format yyyy-mm-dd hh:mm:ss. Trailing fields are assumed to be zero if they are not entered. 1995-01-12 is equivalent to 1995-01-1200:00:00.
- 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
Enter "Y" if null values are to allowed to be stored in a field otherwise enter "N".
At this time Nulls are handled differently to most database management systems. For character fields storing blanks is equivalent to a NULL while for numeric fields storing blanks (sometimes considered as NULL) will result in a ZERO being stored in the field.
Length
This is the length of the field in which the data is to be stored, and should be large enough to include the decimal point and decimal places when the field type is real.
No Dec
This is the number of decimal places to be stored and is only necessary if the field type is real.
Case
This is the case of characters which are required for the field. This is only necessary if the field type is character. Valid entries are:
- mixed - mixed case characters may be entered
- upper - only upper case characters may be entered
- lower - only lower case characters may be entered
Low Bound
For numeric fields enter the minimum value which may be entered.
High Bound
For numeric fields enter the maximum value which may be entered.
Valid Entries
You may want to limit the character data to be entered into a field to a predefined set of values which you may enter here. Each separate value must be separated by a semi-colon e.g. ";OVB;GRA"
If you have a large number of values, it is advisable to enter them into the translation table. The valid entries are designated as being stored in the translation table by entering the "@" symbol followed by the field name in the translation table which contains the permitted values.
If you have your valid entries stored in the translation table, then you must enter "@" translation table field name here to tell the system to look in the translation table when validating input for this field. For example enter "@code".
Phys or Virt
You must indicate whether there will be physical data stored in this field (see the explanation regarding physical and virtual fields), or whether the field is a virtual field which will contain a function for translating values from an associated physical field.
Reference field
If the field is a virtual field then you must enter the name of the reference or physical field from which values are to be extracted prior to translation by the function associated with this field.
When all the mandatory and optional fields for each of the tables in the database have been entered choose Apply to display the CONFIRM DATABASE CREATION form prior to creating the database.
Choose Cancel to return to the DEFINE ALL FIELDS FOR ALL TABLES form and make any changes. Choose Apply to create the database files, display the GEOLOGICAL DATABASE PROCESSING DATA menu and a message to indicate successful creation of the database will appear in the message window.
A file named dbname.DDB is created after successful creation of the database.