You are here: Menu Commands > Design > Blast design > Database > Map the blast database
GEOVIA Surpac

Map the blast database

Surpac functions that use the geological database, or other type of database, make the assumption that specific tables and fields exist in the database that describes drillhole data. If you have a database that you want Surpac to connect to, and it does not have these mandatory table or field names, you must map the database so that the database functions can work correctly. Mapping the database means that you specify which tables and fields in your database correspond to the table and field names Surpac requires.

You can also use DB MAPPER to define a view of your database by specifying which tables and fields you want Surpac to use. This is useful if you have a very large database and you want Surpac to use information from only a few of the tables. You can also add validation information to fields in your tables using DB MAPPER. The validation information lets Surpac check the integrity of the data that is stored or modified by Surpac in your database.

To run this function: Choose Database > Database > Map the database, or Survey > Survey database > Map the database, or Design > Ring design > Ring design > Map the ring design database, or Design > Blast design > Database > Map the blast database, or...

  • In the Function Chooser, type DB MAPPER, and press ENTER.
  • In the Function Chooser, type BLAST DB MAPPER, and press ENTER.

After you have mapped your database, a .ddb file is produced that Surpac uses to connect to your database. If you rename or change the configuration of your database, you can use DB MAPPER to update the .ddb file.

Fields on the Select the database to map form

Field Description
Database type

The type of database to map. Options are:

  • access
  • Note: To map to a Microsoft Access database in Surpac 64-bit, you need Microsoft Access 64-bit (or 64-bit OLEDB drivers). Similarly, if you are running Surpac 32-bit, you need Access 32-bit (or 32-bit OLEDB drivers).

  • paradox
  • ODBC
  • You can use ODBC to connect to a SQL Server database or to a different corporate database.

  • oracle
Look in The folder where the database you want to map is located.
Up folder button Moves up one folder level.
New folder button Creates a new folder in the current location.
Simple list button Lists the available databases.
Detailed list button Lists the available databases, their file size, and the date that the database was last modified.
File name The name of the file you have selected.
Files of type

The file types available in the Look in folder. The file types set by default depend on the Database type you selected.

If you selected access, the default file types are .accdb, .mdb, and .dsa. If you selected paradox, the default file types are .db and .pdx.

Select the ODBC data source

Radio button options are displayed for each driver and ODBC database connection you have available.

Create new data source button Allows you to create a new ODBC data source so that you can connect to an existing database, to which you have local or network access, using ODBC.
Database name The name and location of the Oracle ™ database.
Password required to open database
  • Selected: A password is already required to open the database you want to map. If you select this option, after you enter the database name, you are prompted to enter the password.
  • Cleared: You can open the database you want to map without a password.
Audit database
  • Selected: The AUDIT DATABASE function is run at the end of the mapping process.
  • Cleared: The AUDIT DATABASE function is not run at the end of the mapping process.
Next button Go to the next form in the mapping process.
Cancel button Cancel the mapping process.

After you click Next, the Select the name of the ddb file form appears.

Fields on the Select the name of the ddb file form

Field Description
ddb file name The name of the .ddb file that is created in Surpac. By default the ddb file name is the same name as the database selected, except that the file extension is .ddb.
Prev button Go to the previous form in the mapping process.
Next button Go to the next form in the mapping process.
Cancel button Cancels the mapping process.

After you click Next the Map the database form appears.

Fields on the Map the database form

Field Description
Source database

A nested structure of folders, where each folder represents a table in the database you are mapping. Within each folder is a list of the fields that exist in each table, and a subfolder called Indexes. The Indexes folder contains subfolders for each index of the table. The subfolders contain the fields that make up each index.

You map the tables and fields in the database to the fields in the Surpac database by dragging them from the Source database to the Surpac database in the Mapping detail.

Mapping detail The tables and fields in the Surpac database. The Mandatory Tables (that is, the collar and survey tables) must be mapped. Other tables are optional and you map them only if you want to use the data in those tables.
Database specifics
SQL extra

An SQL statement to run on the database after the connection is made.

Note: SQL extra is available only if you ran the DB MAPPER function.

Tables
  • Selected: The tables in the database are displayed in the Source database.
  • Cleared: The tables in the database are not displayed in the Source database.

Note: Available only when you are mapping an ODBC database.

Views
  • Selected: The stored queries for the tables in the database are displayed in the Source database.
  • Cleared: The stored queries for the tables in the database are not displayed in the Source database.

Note: Available only when you are mapping an ODBC database.

Procedures
  • Selected: Procedures are displayed in the Source database. Procedures are stored in the source database. They are used for data validation and to limit access to data.
  • Cleared: Procedures are not displayed in the Source database.

Note: Available only if an ODBC database is being mapped.

Systables
  • Selected: The system tables created by the database are displayed in the Source database.
  • Cleared: The system tables created by the database are not displayed in the Source database.

Note: Available only if an ODBC database is being mapped.

Synonyms
  • Selected: Synonyms for database objects are displayed in the Source database. A synonym is an alias for a table, view, or sequence, stored in the source database application.
  • Cleared: Synonyms for database objects are not displayed in the Source database.

Note: Available only when you are mapping an ODBC database.

Refresh the tree button Updates the Source database folders to show only the database specifics you have selected. That is, the Tables, Views, Procedures, Systables, or Synonyms.
Prompt id
  • Selected: You are prompted for an id when you connect to the database.
  • Cleared: You are not prompted for an id when you connect to the database.

Note: Available only if an ODBC database is being mapped.

Oracle role

An SCL statement that you can use to set roles for an Oracle database.

Note: Available only if an ODBC or Oracle database is being mapped.

Table mask

The tables that are available to be mapped in your database. For example, if you enter "db" all of the tables that have names starting with "DB" are active, and other tables are unavailable.

Note: Available only when you are mapping an ODBC database.

User mask

The tables that are available to be mapped in your database. For example, if you enter "geologist" all the tables available to the users with the role "geologist" are available.

Note: Available only when you are mapping an ODBC database.

Field and index information
Field type

The type of information contained in the field. Options are:

  • character
  • real
  • integer
  • datetime
  • duration
  • boolean
  • memo
Nulls allowed
  • Selected: Null values are permitted in the field.
  • Cleared: Null values are not permitted in the field. If a process attempts to add a null value to this field a warning message is written to the message window.
Length The number of characters that you can view in, or add to, the field. The default value is the maximum length of the field in the Source database.
Case

The case that the field values are written in. Options are:

  • lower
  • mixed
  • upper

Note: Available only if character or memo are selected as the Field type.

Valid values

The list of character values that you can view in, or add to, the field. You can enter a list of values with each entry separated by a semicolon (;).

Note: Available only if character is selected as the Field type.

No decimals

The number of decimal places that you can view in, or add to, the field.

Note: Available only if integer or real are selected as the Field type.

Low bound

Lowest value that you can view in, or add to, the field.

Note: Available only if integer or real are selected as the Field type.

High Bound

Highest value that you can view in, or add to, the field.

Note: Available only if real is selected as the Field type.

Prev button Go to the previous form in the mapping process.
Finish button Finish the mapping process and connect to the database.
Cancel button Cancels the mapping process.
(missing or bad snippet)

Output

A database definition file (.ddb) is created that specifies the parameters of the Surpac database tables and fields. You use the .ddb file to work with the database in Surpac.

If you want to change the Surpac view of your database, you can run DB MAPPER again. It reads the current definitions and allows you to change the database configuration.

Troubleshooting

If the hole_path field, in the collar table, is not mapped, a warning message is written in the message window, that the hole path will be treated as a calculated constant "Curved".

If a mandatory field has not been mapped, the Message window states the name of the field and the table it is in.

If some geological database functions do not work correctly, try using lower case for names of tables and fields. The sample databases supplied by Surpac and new databases use lower case, and any problems that occur could relate to case sensitivity.

See also