Data Design Tutorial 8

77
gINT Tutorial Using Data Design

Transcript of Data Design Tutorial 8

Page 1: Data Design Tutorial 8

gINT Tutorial

Using Data Design

Page 2: Data Design Tutorial 8

USING DATA DESIGN

gINT Software, Inc. www. gintsoftware.com

The information in this publication is subject to change without notice and does not represent a commitment on the part of gINT Software. The software described in this document is furnished under a license agreement or nondisclosure agreement. The software must be used or copied only in accordance with the terms of the agreement.

Printed November 7, 2008

Disclaimer: Every effort was made to ensure accuracy. However, gINT Software makes no warranty as to the correctness of this information or the supplied files.

All rights reserved worldwide. No part of this publication may be reproduced in any form or by any means without the prior written consent of gINT Software. Comments are welcome and become the property of gINT Software. gINT® is a registered trademark of gINT Software. All other products mentioned are trademarks or registered trademarks of the respective producers.

© Copyright 1985-2007 by gINT Software, Inc. Printed in the United States of America

Web Site: www.gintsoftware.com E-mail: [email protected] Sales: [email protected]

Page 3: Data Design Tutorial 8

USING DATA DESIGN

Table of Contents Using this Tutorial...................................................................................................... 1

Setting up Sample Files ............................................................................................. 1 Overview of DATA DESIGN............................................................................................ 2 Relational Databases and gINT....................................................................................... 3

Keys and Key Sets.................................................................................................... 4 Creating and Customizing a Database.............................................................................. 6

Customizing the PROJECT and POINT Tables.................................................................... 8 Adding the SAMPLE Table.......................................................................................... 11 Adding the LITHOLOGY Table ..................................................................................... 14 Adding a WATER LEVELS Table ................................................................................... 16 Adding WELL DETAILS and WELL CONSTRUCTION Tables ..................................................... 17 Generating a Project and Importing the Data.................................................................. 20

Considerations for Good Database Design........................................................................24 Data Type ............................................................................................................ 24 Calculated Fields.................................................................................................... 24 Lookups............................................................................................................... 24 Required Fields...................................................................................................... 25 Unrelated Fields in the Same Table ............................................................................. 25 Metadata: Data about Data ....................................................................................... 25 Table Relationships................................................................................................. 25 Validations using Field Rules and gINT Rules Code ............................................................ 25 Transparency and Documentation................................................................................ 26

Library Tables..........................................................................................................27 Attribute Tables..................................................................................................... 27

Correspondence Files ................................................................................................30 User System Data......................................................................................................37 Component Lithology Descriptions ................................................................................38

Generating Component-Based Lithology Descriptions ........................................................ 38 Benefits of Component Lithology................................................................................. 41 Understanding How a Component Description Structure Works............................................. 41 The Component Data Entry Table and Lookup Tables ........................................................ 42 The Component Formatting Library Table ...................................................................... 43 Adding Component Fields.......................................................................................... 44 Adding Formatting Elements ...................................................................................... 46 Understanding the ComponentDesc() Function ................................................................ 49

DATA DESIGN Utilities ................................................................................................51 User Interface Manipulation Utilities ............................................................................ 51

List (Tables Menu)............................................................................................... 51 Input Sequence (Tables Menu) ................................................................................ 52 Group Sequence (Tables Menu) ............................................................................... 52

Utilities to Import or Merge Tables and Fields ................................................................. 53 Import Table (Tables Menu) ................................................................................... 53 Import Multiple Tables (Tables Menu)....................................................................... 54 Merge Fields from Current File (Tables Menu) ............................................................. 55

gINT Software, Inc. www. gintsoftware.com

Page 4: Data Design Tutorial 8

USING DATA DESIGN

gINT Software, Inc. www. gintsoftware.com

Merge Fields from Other File (Tables Menu) ............................................................... 56 Merge All Tables and Fields (Tables Menu) ................................................................. 57 Build From Reports (File New Data Template menu) .................................................. 57 Convert Projects (UTILITIES tab).............................................................................. 58

Information Gathering Utilities ................................................................................... 60 Print (File Menu) ................................................................................................ 60 Compare Databases (Tools Menu) ............................................................................ 62 Combined Database Characteristics (Tools Menu) ......................................................... 64 References to Current Field (Tables References menu) ............................................... 65 References to All Fields in Current Table (Tables References menu)............................... 66 References to All Fields in All Tables (Tables References menu).................................... 66 References to Current Field (File Menu in User System Data Application)............................ 67 References to All Fields (File Menu in User System Data Application)................................. 68 References to This Lookup (File Menu) ...................................................................... 68

Miscellaneous Utilities ............................................................................................. 70 Replace Field Names (Tools Menu) ........................................................................... 70 Assign Data Template to Reports (Tools Menu) ............................................................ 72 Last Update Field and Point Sort Field (Tables Menu) .................................................... 72

Page 5: Data Design Tutorial 8

USING DATA DESIGN

Using this Tutorial This tutorial is designed for intermediate level gINT users, and is intended for self-study. It covers the DATA DESIGN tab in detail, including an in-depth demonstration of project database and template construction, as well as library tables, user system data, correspondence files, and setting up component lithology descriptions. The tutorial employs detailed explanations of conceptual topics, and also has you perform step-by-step instructions in gINT.

If you learn better with direction from an instructor, you might want to take the gINT University course gINT 003 -- Data Design. The course takes two hours, performed over the internet with a live instructor, and parallels the material in this tutorial. Other instructional options include gINT Summit Trainings at your site or in various cities. For training options involving instructors, see www.gintsoftware.com/support_training.html.

You should be familiar with gINT data entry and basic output (including preview and printing, and the zoom tools) before working through this tutorial. We recommend you work through the Performing Data Entry tutorial or take the gINT University class gINT 001 - Introduction to gINT: Data Entry and Basic Output if you do not have that familiarity.

Setting up Sample Files

Before starting the tutorial, you need the following:

• gINT Version 8 installed on your computer

• Sample files installed in the appropriate subfolders of the \gINT\ installation folder (usually C:\Program Files\gINT\)

To obtain and install the sample files, do the following:

1. Go to www.gintsoftware.com/support_doc.html.

2. Click on the link ‘Standard Data Files for All gINT Tutorials’.

3. Extract the following files to the indicated locations:

File Destination

training.glb \gINT\libraries\

training.gpj \gINT\projects\

surfaces.gpj \gINT\projects\

corresp file test data.xls \gINT\projects\

data entry.gdt \gINT\datatmpl\

Note: If these files are already present in the indicated locations because of working on another tutorial, you do not need to replace them.

gINT Software, Inc. www. gintsoftware.com

1

Page 6: Data Design Tutorial 8

USING DATA DESIGN

Overview of DATA DESIGN The DATA DESIGN application group enables you to create and modify data structures in gINT, especially project databases and their corresponding data templates. While the INPUT application group provides some basic features for manipulating field properties (and provides the ability to create tables and change their properties), serious database design and redesign work should be performed in DATA DESIGN.

In addition to the Project Database tab, where project or (equivalently) data template design is performed, are various tabs for designing and populating data structures that are stored in the current library. These include the Library Tables, Library Data, Lookup Lists and Readings Lists tabs. Also provided are the User System Data tab, used for defining user functions that perform calculations and decision logic based on database (and other) data. User system data items can be referenced by other functions, by report entities, and elsewhere. Finally, DATA DESIGN provides a Correspondence Files tab, which is a user interface for creating and modifying the correspondence files that define complex import and export operations.

We will discuss project database design first, creating a simplified but fully functional template and database modeled after gINT standard databases such as gint std us.gpj. Next we will discuss some broader issues in database design. Finally, the other tabs in DATA DESIGN will be introduced or revisited.

gINT Software, Inc. www. gintsoftware.com

2

Page 7: Data Design Tutorial 8

USING DATA DESIGN

Relational Databases and gINT As described in the module on performing data entry, a project database utilizes tables, and fields within those tables. As with any relational database, the records in certain tables in a project have “one-to-many” relationships with the records in certain other tables. This can be illustrated as follows:

A one-to-one relationship is one in which each parent record has at most one child record in the child table. This makes the child table effectively an extension of the parent table. A one-to-one table separates out fields from the parent table that are in a logical category, making data easier to find with minor impact to database structure.

The benefit of a relational database over a so-called “flat file” storage format like Excel is that relationships between records exist and are enforced. When you delete a parent record, all of the child records are deleted. When you change the PointID (borehole number) in the parent point record, it changes in all the children so that they still have the same parent. Therefore, there are never any orphan records. Another way of saying this, using standard database terminology, is that referential integrity is maintained.

gINT Software, Inc. www. gintsoftware.com

3

Page 8: Data Design Tutorial 8

USING DATA DESIGN

The following is a database diagram that shows the relationships between the tables in a database we will create shortly (which is a simplified version of a standard gINT database structure). Remember that each pitchfork-shaped connector line represents a one-to-many relationship, with the single-line end representing the “one” (parent record) and the 3-line end representing the “many” (child records), and each plain connector line represents a one-to-one relationship:

The POINT table is the parent in one-to-many relationships with three child tables: LITHOLOGY, SAMPLE and WATER LEVELS. It also has a one-to-one relationship with the WELL DETAILS table, and the WELL DETAILS table in turn is the parent in a one-to-many relationship with WELL CONSTRUCTION. The purpose of the WELL DETAILS/WELL CONSTRUCTION data design is discussed in a later section.

In non-Enterprise versions of gINT, the PROJECT table does not have a direct relationship with the POINT table (in the relational database sense that a foreign key in the child table creates a linkage to a master key in the parent). There is only an implied linkage between PROJECT and POINT, in that every project database has only one project record, and all of the POINT records reside in the same database file with it. So a parent-child relationship exists, but it is not implemented through key relationships.

Keys and Key Sets

A key field or key is a field used for specifying a particular row or a set of rows in a table. If you know the value of the key, you can access the corresponding row. For example, the PointID field in the POINT table holds unique borehole numbers. If you request the POINT table row that has a PointID value of B-2, the row that has that value in PointID is accessed.

A key set is a combination of key fields, collectively used to specify a row or rows. In the POINT table it is sufficient to use a single key field to identify a row. In the LITHOLOGY table, however, it is not possible to identify rows uniquely with a single key. If you request all rows with a PointID of B-2, you will get multiple rows at different depths. If you request all rows with a Depth of 10, you will get records at this depth in multiple boreholes. Only by specifying that the PointID is B-2 and the Depth is 10 do you get the desired row. This key set is expressed as ‘PointID,Depth’.

gINT Software, Inc. www. gintsoftware.com

4

Page 9: Data Design Tutorial 8

USING DATA DESIGN

Table relationships (one-to-many and one-to-one) are implemented in a relational database using keys. In tables where the parent is POINT, a PointID (Borehole ID) field is included in each record, and this refers to the parent record in the POINT table. This is shown for SAMPLE table records below, where there is a one-to-many relationship with POINT.

If the parent table and child table have the same key set, a one-to-one relationship is created by gINT. If the child has more keys than the parent (e.g. SAMPLE uses ‘PointID,Depth’ and POINT uses ‘PointID’), it is a one-to-many relationship.

Table relationships maintain a level of automatic validation. You cannot have a child table without a parent table. Relationships are also cascading, which means that if you rename a borehole all the child tables associated with that borehole are updated. Also, if you delete a parent record, all child records for that table will be deleted as well.

For further study, select the Help Index Table Relationships topic.

gINT Software, Inc. www. gintsoftware.com

5

Page 10: Data Design Tutorial 8

USING DATA DESIGN

Creating and Customizing a Database We will create a data template with the database structure previously described.

A database design can be created as either a project or a data template. A data template is just an empty project used for the creation of projects that will hold data. While you can copy data template to project, project to data template, project to project or data template to data template, the recommended approach is to store a single data template that is the most current database structure you use. When you create new projects, you clone them from the master template. When you make changes to the database structure in a project you’re working on, and want to make those changes part of your standard, you save the project structure to your master template. In this way you’ll always build new project databases from your most current database structure.

To create the new data template:

1. Click the DATA DESIGN tab.

2. Select the File New Data Template New Database menu option. You see the Data Template Name dialog box:

gINT Software, Inc. www. gintsoftware.com

6

Page 11: Data Design Tutorial 8

USING DATA DESIGN

3. Name the data template ‘simple project’ and click Save. You see a screen similar to the following:

When you first create a database, gINT starts with two tables: the POINT table and the PROJECT table. These are system tables and you cannot delete them or modify their names. You can enter a Caption for the table if you would like it to be displayed under a different title. The PROJECT table is an empty table, and you can add the fields you want.

4. Select POINT in the object selector.

The POINT table contains the following six fields by default:

• PointID

• HoleDepth

• Elevation

• North

• East

• Plunge

gINT Software, Inc. www. gintsoftware.com

7

Page 12: Data Design Tutorial 8

USING DATA DESIGN

Because they are system fields, they cannot be removed, but you can hide any of them except the PointID and the HoleDepth, which are required fields.

Customizing the PROJECT and POINT Tables

We will add some fields to the initially empty PROJECT table.

1. Select Project from the drop-down object selector box and click on the New button (beneath the fields list) to add a field. ‘>Unnamed<’ appears in the Fields list.

gINT Software, Inc. www. gintsoftware.com

8

Page 13: Data Design Tutorial 8

USING DATA DESIGN

2. Enter a Name property value of ‘Name’ and a Type of ‘Text’. Click Ok. Notice that ‘>Unnamed<’ in the Fields list is replaced by ‘Name’.

‘>Unnamed<’ remains for each new field until you set the required Name property, at which time the name you specify will replace ‘>Unnamed<’ in that list.

3. Add the following additional fields (and specified properties) to the PROJECT table (clicking New to create each field, and Ok to save it after the field properties are entered):

Field Name Type Description Units

Number Text

Client Text

Location Text

The Name and Number fields are for the project name and project number, respectively.

The Units property is strictly for display purposes (in the header of the data entry grid in INPUT) and does not influence calculations.

Next we will caption the POINT table, and make changes and additions to its fields. Do the following:

1. Select the POINT table from the yellow object selector list beneath the menu bar. The list of fields for the POINT table appears as shown:

2. Click the Table Properties icon and in the Caption property, enter ‘Borehole’. Click OK to close the dialog box.

3. Select the PointID field and specify its Caption as ‘Borehole ID’.

4. Select the HoleDepth field, caption it as ‘Total Depth’, change the Type to ‘Double’ (if necessary), and add ‘ft’ for the Units.

gINT Software, Inc. www. gintsoftware.com

9

Page 14: Data Design Tutorial 8

USING DATA DESIGN

5. Select the Elevation field and change the Type to ‘Double’ and add ‘ft’ for the Units.

When a new project is created from scratch, the Elevation field in the POINT table is given an initial data type of ‘Text’. The reason is that users at some companies want to be able, when applicable, to enter ‘NOT SURVEYED’ instead of a numeric value. However, using a Text data type for this field makes expressions using Elevation more complicated. If the ability to enter ‘NOT SURVEYED’ is not needed, it is best to keep this field numeric.

6. For the North and East fields change the Units to ‘ft’.

7. For the Plunge field change the Units to ‘deg’.

8. Click the New button (below the Fields list) and add the following fields:

Field Name Type Description Units

Logged By Text

9. Click OK when you are finished.

gINT Software, Inc. www. gintsoftware.com

10

Page 15: Data Design Tutorial 8

USING DATA DESIGN

Adding the SAMPLE Table

We will add the SAMPLE table next. Do the following:

1. Select the Tables New menu option, click the New icon or press CTRL+N. You see the ‘New…’ table properties dialog box:

This is the same tabbed dialog box that appears when you click the Properties icon for an existing table.

2. Enter the following property settings:

Property Value Comments

Name SAMPLE The table name. You can enter this in lower case, but it will be converted to upper.

Table Help Sample Table. One record for each borehole sample.

Any text entered in the Table Help property is displayed in INPUT when you click the Table Help button in the upper right corner of the gINT window.

Column Header Lines

2 The number of lines of text used for the column headers in the data entry grid in INPUT.

gINT Software, Inc. www. gintsoftware.com

11

Page 16: Data Design Tutorial 8

USING DATA DESIGN

gINT Software, Inc. www. gintsoftware.com

12

Property Value Comments

Key Set PointID,Depth Specifies the combination of key fields that will be required, and (typically) will uniquely identify each record in the table. All tables with POINT as a parent must have at least PointID in their key set. In the case of our SAMPLE table we also need to include Depth, since a sample is always at a specific depth. A PointID and a Depth are enough to uniquely identify each SAMPLE record.

Parent Table POINT The table that SAMPLE will be the child of in a one-to-many relationship.

Group Name Main Group Assigns the tab for the table in INPUT to the Main Group tab. For more complex databases, you may prefer to group the tables under separate group tabs.

3. Click OK to create the table, save the properties, and return to field data entry.

You see the following:

4. Notice that the PointID and Depth fields have been automatically created because they are key fields. Notice also that the Delete button does not appear for these fields, because since they are key fields for the table you are not allowed to delete them. Also you cannot alter their Type property, which is preset.

5. Select the PointID field in the Fields list and enter a Caption of ‘Borehole ID’, then click Ok.

6. Select the Depth field and choose ‘ft’ for the Units.

7. Add the following fields to the SAMPLE table:

Page 17: Data Design Tutorial 8

USING DATA DESIGN

Field Name Type Units Description

Length Single in

Type Text

Number Text

Recovery Length Single in

RQD Length Single in

Blows 1st Integer Blows over the increment only. Refusal is automatically calculated.

Blows 2nd Integer

Blows 3rd Integer

Blows 4th Integer

The Description property for the Blows 1st field enables you to provide hints or instructions to the user during data entry. It appears below the data entry grid when the field is highlighted.

We will add a lookup to the Type field, so that only sample types for which a Sampler symbol exists can be selected.

1. Select the Type field in the Fields list.

2. Click the Browse button next to the Lookup property and select ‘GRAPHIC’ from the Type drop-down list.

3. Select ‘SAMP’ from the list of graphic lookups and click OK.

A lookup of Type ‘GRAPHIC’ generates the list (at input time) from the names of the symbols of the specified type in the current library. This is a useful way to let the user assign existing graphics to database records. In the current case, any Sampler graphic can be assigned to the Type field in a SAMPLE table record, and this graphic’s name specifies which fill to use for the sample in a log or fence report column, as well as the text Sample Type value next to it. Material symbols are assigned similarly to LITHOLOGY records.

gINT Software, Inc. www. gintsoftware.com

13

Page 18: Data Design Tutorial 8

USING DATA DESIGN

4. Check the Must use Lookup option. This restricts the user during input to select a value from the lookup list, and not enter a custom value.

5. When you are finished, the Type field definition should look similar to the following:

Adding the LITHOLOGY Table

Next we will add the LITHOLOGY table to our project database.

1. Click the New icon or select the Table New menu option.

2. Enter the following property settings:

Property Value

Name LITHOLOGY

Column Header Lines 2

Key Set PointID,Depth

Parent Table POINT

Group Name Main Group

Notice that, as with SAMPLE, the LITHOLOGY table is defined as a child table of POINT, with a key set of ‘PointID,Depth’. As with samples, each lithology layer is distinguished by its depth within a specific borehole.

The PointID and Depth fields are automatically added to the Fields list.

3. Change the following values in existing fields:

gINT Software, Inc. www. gintsoftware.com

14

Page 19: Data Design Tutorial 8

USING DATA DESIGN

Field Name Caption Units

PointID Borehole ID

Depth ft

4. Add each of the following fields to the table by clicking the New button beneath the fields list, specifying the properties, then clicking OK:

Field Name Type Units Lookup Must Use Lookup

Notes

Bottom Double ft

Graphic Text Graphic!matl Check this option.

User selects from the names of material symbols in the library.

USCS Text Lookup!uscs Check this option.

User selects from the USCS lookup list in the library (this is maintained in DATA DESIGN Lookup Lists).

Description Memo

Line Type Text Graphic!linetype User selects from the built-in list of line types in gINT. If no value is entered during input, the system uses ‘Solid’ in reports.

Your LITHOLOGY table should look similar to the following:

gINT Software, Inc. www. gintsoftware.com

15

Page 20: Data Design Tutorial 8

USING DATA DESIGN

Adding a WATER LEVELS Table

Next we add a table called WATER LEVELS that holds water level records for each borehole. It will be a child table of POINT, similar to SAMPLE and LITHOLOGY in this regard, but unlike these other child tables, will use a secondary key other than Depth. Water level information is keyed on reading events, such as ‘At Time of Drilling’, ‘End of Drilling’, and ‘After Drilling’. Reports will look for water level data by searching for the ATD event for borehole ABC, not for a particular depth value (although a depth value will be present in the record).

The available key sets for a child of POINT are PointID in combination with one or more Depth, DateTime, and ItemKey fields. Depth stores depth in a borehole, and DateTime stores the date and time of a measurement or other event. An ItemKey field is for situations where a key is needed that is not Depth or DateTime.

Multiple ItemKey fields can be defined in a key set, as needed (using ItemKey, ItemKey2 and so on). Once an ItemKey field is defined, you caption it with a user-friendly name so that the user sees a more obvious field name.

To create the WATER LEVELS table, do the following:

1. Click the New icon or select the Table New menu option.

2. Enter the following property settings:

Property Value

Name WATER LEVELS

Column Header Lines 2

Key Set PointID,ItemKey

Parent Table POINT

Group Name Main Group

3. Change the following values in existing fields:

Field Name Caption Lookup Must Use Lookup

PointID Borehole ID

ItemKey Reading Event Libtbl!water level event Check this option.

4. The ‘water level event’ library table is provided in the training.glb library and includes values for three standard water level event types. To see this, go to DATA DESIGN Library Data, and select WATER LEVEL EVENT in the object selector. After viewing the library table, return to DATA DESIGN Project Database.

5. Add each of the following fields to the table by clicking the New button beneath the fields list, specifying the properties, then clicking OK:

gINT Software, Inc. www. gintsoftware.com

16

Page 21: Data Design Tutorial 8

USING DATA DESIGN

Field Name

Type Units Caption Notes

Date/Time Date/Time For entry of the date and time of the reading event.

Hours After Double This value is specifically for AD (After Drilling) events.

Depth Double ft Depth Below Monitoring Point

The depth value used to position a water level indicator graphic next to the log or fencepost is computed by deducting the Measuring Point Stick Up from the Depth Below Measuring Point.

Monitoring Point Stickup

Double ft

Notes Text

Adding WELL DETAILS and WELL CONSTRUCTION Tables

There are two possible implementation approaches worth considering for well data:

• Implement a single well data table as a child of POINT with a ‘PointID,Depth’ key set. Each record will contain specifications for each well section (or callout, or both) at a specific depth or depth range. Borehole-level fields such as Casing Top Elev and Casing Type will be created in the POINT table.

• Implement two tables as a split-screen parent and child:

• WELL DETAILS, having a 1-to-1 relationship with POINT, and holding the borehole-level fields (Casing Top Elev and Casing Type).

• WELL CONSTRUCTION, a child of WELL DETAILS, holding the specifications for each well section and/or callout.

gINT Software, Inc. www. gintsoftware.com

17

Page 22: Data Design Tutorial 8

USING DATA DESIGN

These two approaches are illustrated here:

POINT Table

WELLTable

POINT Table

WELL CONSTRUCTION

Table

WELL DETAILS

Table

1:1

1:many1:many

Single Well Table Approach

Split Well Table Approach

The benefit of the single well table approach is its simplicity. The benefit of the split well table approach is that all data related to a well appears in the same tab in INPUT, so that the user does not need to know to enter borehole-level well data in the Borehole tab and everything else in the Well tab. We will implement the split well table approach, which is consistent with the training.gpj database and several standard gINT databases such as gint std us.gpj.

To create the WELL DETAILS table, do the following:

1. Click the New icon or select the Table New menu option.

2. Enter the following property settings:

Property Value Comments

Name WELL DETAILS

Caption Well Specifies the name in the tab for the table in INPUT

Column Header Lines 2

Key Set PointID

Parent Table POINT

One to One Relation checked

Show All Parent Keys checked Causes the borehole number (PointID field) to be displayed in the rows during data entry.

Group Name Main Group

gINT Software, Inc. www. gintsoftware.com

18

Page 23: Data Design Tutorial 8

USING DATA DESIGN

3. Change the following values in existing fields:

Field Name Caption Units

PointID Borehole ID

4. Add each of the following fields to the table by clicking the New button beneath the fields list, specifying the properties, then clicking OK:

Field Name Type Units

Depth Double ft

Casing Top Elev Double ft

Casing Type Text

Next, create the WELL CONSTRUCTION table, as follows:

1. Click the New icon or select the Table New menu option.

2. Enter the following property settings:

Property Value Comments

Name WELL CONSTRUCTION

Column Header Lines 2

Key Set PointID,Depth

Parent Table WELL DETAILS Specifies the WELL DETAILS table as the parent table instead of POINT

Group Name Main Group

3. Change the following values in existing fields:

Field Name Caption Units

PointID Borehole ID

Depth ft

gINT Software, Inc. www. gintsoftware.com

19

Page 24: Data Design Tutorial 8

USING DATA DESIGN

4. Add each of the following fields to the table by clicking the New button beneath the fields list, specifying the properties, then clicking OK:

Field Name

Type Units Lookup Must Use

Lookup

Description

Bottom Double ft If blank, the Pointer and Description will be placed at Depth, otherwise at the midpoint between Depth and Bottom.

Graphic Text Graphic!well checked

Pointer Text Lookup!well pointers checked Arrows pointing from well text to graphics

Description Text

The lookup for the Graphic field includes the names of all Well composite symbols in SYMBOL DESIGN in the current library. The lookup for the Pointer field includes the contents of the Well Pointers lookup list in DATA DESIGN Lookup Lists. The log or fence report form must use special logic to assign the correct pointer symbol and position to the pointer and description, based on the Pointer field selection.

Finally, we need to specify WELL CONSTRUCTION as the split-screen child of WELL DETAILS. This was not possible before because WELL CONSTRUCTION did not exist yet.

1. Select ‘WELL DETAILS’ in the object selector.

2. Click the Properties icon. The DATA TABLE PROPERTIES dialog box opens.

3. In the Split Screen Child drop-down list, select ‘WELL CONSTRUCTION’.

4. Click OK.

This completes the creation of the tables, fields and relationships for the simple project.gdt data template. It can now be used to generate project databases.

For further study on defining tables and fields, select the Help Contents Data Design Application Project Databases topic.

Generating a Project and Importing the Data

Next we will generate (“clone”) an empty project from the data template we just created, and populate it with data by importing. Perform the following steps:

1. In INPUT, select File New Project Clone Data Template. The Clone From browse window opens for selecting the source data template.

2. Enter simple project.gdt and click Open. The ‘New Project Name browse’ window appears.

3. Enter simple project.gpj and click Save.

gINT Software, Inc. www. gintsoftware.com

20

Page 25: Data Design Tutorial 8

USING DATA DESIGN

4. Go to the INPUT application group, and click on the Project and Borehole tabs to see that the tables are correctly structured but empty. You cannot view the other tables in INPUT yet because you don’t have any POINT table records to reference.

5. Select File Import/Export Import from Database.

6. Click the Browse button next to the Database field, and browse to and open training.gpj in \projects.

7. Leave the other default values and click OK. The import status log appears.

gINT Software, Inc. www. gintsoftware.com

21

Page 26: Data Design Tutorial 8

USING DATA DESIGN

8. Examine the messages in the status log. Notice that records were imported into all seven tables, but that eight fields—seven POINT table fields and one PROJECT table field—in the source database (training.gpj) did not have counterparts in the destination database (simple project.gpj) and could therefore not be imported.

Information of this kind in import status logs is useful for determining if there are data structure incompatibilities. In the present case, we know that the missing fields in simple project.gpj are not needed. However, in other circumstances, messages in the status log may alert you to problems to resolve by adding fields, changing field properties, or creating mappings between the two projects using a correspondence file (discussed shortly).

9. Click OK to close the status window.

10. To verify that your tables have data, and that the desired structure was created, click on each of the table tabs.

After creating the project and importing data, it is worthwhile to spend a few minutes ensuring that each of the tables displays an optimal set of fields in a useful order, with good column widths and a suitable number of text lines in the header. Consider performing the following manipulations:

• Dragging columns to different locations in the table

gINT Software, Inc. www. gintsoftware.com

22

Page 27: Data Design Tutorial 8

USING DATA DESIGN

• Changing column widths

• Increasing or decreasing the number of text lines in the header

• Hiding columns

These are described in “Formatting Table Grids in INPUT” in the Fundamentals of gINT course.

After making these changes, save them to the data template (select Tools Make Data Template and replace the existing template).

gINT Software, Inc. www. gintsoftware.com

23

Page 28: Data Design Tutorial 8

USING DATA DESIGN

Considerations for Good Database Design A database structure can be optimized to minimize errors and increase usability.

Your data structure should match your data collection. For example, if your geologists log holes by recording top depth and bottom depth, do not configure the database for top depth and length.

You should create a configuration that will minimize data entry errors and increase efficiency. Methods are discussed below for doing this.

We recommend the white paper called Geotechnical Data Management Issues for Transportation Authorities on our website.

To view this paper, go to the gINT Software Web site at www.gintsoftware.com and select Articles White Papers Geotechnical Data Management Issues for Transportation Authorities.

Data Type

Appropriately setting the data type of a field reduces errors, and provides control over what can or cannot be entered. We recommend you follow these guidelines:

• Avoid setting a field type to Text unless it really is intended to hold text.

• Numbers should go in Integer, Single, Long or Double fields, depending on the numeric type and size.

• Dates should go in Date/Time fields.

• True/False (Yes/No) information should be in Boolean fields.

• Mixing multiple pieces of numeric information in a text field is a poor strategy. Such a field should be split into multiple numeric fields.

Calculated Fields

Avoid externally calculated fields in your database. Let the report do the calculations.

Lookups

Use lookups in a database to limit the user to specific choices. This gives you consistency and the ability to query.

For example, you may have a field called Drilling Method. Without a lookup, users can type any entry they want to in the field. If you run a query that asks “how many holes did we drill using a hollow-stem auger” you will not get an accurate calculation, because different users will enter the same data in a different manner. With a lookup, the user is restricted to a limited set of choices, and these can be queried.

Lookups also speed up data entry, and eliminate misspellings and typographical errors.

gINT Software, Inc. www. gintsoftware.com

24

Page 29: Data Design Tutorial 8

USING DATA DESIGN

Required Fields

Required fields force a user to enter data.

Key fields are required by default, and this cannot be changed. A non-key field can be made Required or Optional using the Required property of the field.

If information is critical and must be included in every record, make the field Required.

Some requirements are data dependent, meaning the data itself determines whether the field should be required or not. In these cases, leave the field Optional, or create a gINT rule that compels data entry in the field only under certain conditions.

Unrelated Fields in the Same Table

A table should only contain fields that relate to each other.

Each table should hold records that correspond to a particular type of thing in the real world, like a lithology layer, a water level reading or a lab test. The fields in the table should be qualities or attributes of that real-world “thing.” Unrelated fields should be in other tables.

Metadata: Data about Data

Metadata is data that describes data. Metadata is used to specify what data is needed to qualify its values in a meaningful way, and is important for good quality data.

For example, if you are working with standard penetration test results, what type of sampler was used? What were the weight and fall of the hammer? Each of these pieces of information impacts how the values can be used in analysis.

Table Relationships

Databases, in gINT and elsewhere, rely on one-to-many (and, to some extent, one-to-one) relationships to define how the tables interrelate.

When creating tables, think carefully about what data, in the real world, has one-to-many relationships with what. Then structure your table key relationships to implement this in your database.

Validations using Field Rules and gINT Rules Code

Data validation means checking the data when it is entered, and refusing to allow the new data to remain unchanged if it fails to meet certain predefined criteria.

Validation checks are implemented in the following ways:

• Automatic validation checks: gINT provides various automated validations of your data, mainly through native database rules, such as preventing duplicate records, data inappropriate for a specified data type (text in a numeric field), and child records without associated parent records.

gINT Software, Inc. www. gintsoftware.com

25

Page 30: Data Design Tutorial 8

USING DATA DESIGN

• Field rules: These are specified using the Field Rules property in the Field Properties, and enable you to set some very basic restrictions on data entered into a field (such as maximum and minimum values for numbers) and simple processing (such as rounding for numbers, or applying uppercase or lowercase to text).

• gINT Rules Code: For more extensive validation and data manipulation routines, the gINT Rules facility should be used, either by you (if you have programming experience) or as custom work purchased from gINT Software. gINT Rules is a programming module in gINT that enables (among other things) complex validation and calculations on input. Here are some possible validations that could be implemented using gINT Rules:

ο RQD must be less than or equal to sample recovery.

ο Layers must not overlap nor have gaps.

ο Depth-related data cannot have depth values deeper than the hole depth.

ο If a soil is a “clay” the consistency cannot be “very loose”.

Transparency and Documentation

Transparency is the “obviousness” of the database. A transparent database is unmistakably labeled for both tables and fields. To make a database transparent, set up the structure using the names of tables and fields that reflect your data entry source.

Documentation is also a way to keep the database transparent. Use the Description property in a table or field, and the Table Help property in a table to elaborate on the purpose of the field or table, to give additional information, or to explain field dependencies. The basic rule about database documentation is to keep it in the database as much as possible. However, do not overuse these fields.

In INPUT, the user will see the Description property of a field at the bottom of the gINT software window when that field is highlighted, and can view table help by clicking the Table Help button.

gINT Software, Inc. www. gintsoftware.com

26

Page 31: Data Design Tutorial 8

USING DATA DESIGN

Library Tables Library Tables are single-table databases used for indirectly specifying data that may be common to many projects, such as client or company data items. Library tables are the same as project database tables except that there are no relations between them, and they are stored in the library (.glb) file rather than the .gpj file. Library tables have three main purposes:

• Lookup lists with greater flexibility

• Attribute tables

• Component models

Setting up a lookup in INPUT using a library table is described in the Performing Data Entry module or tutorial. Component models are described later in the present module.

Attribute Tables

Whereas the lookup tables we have previously seen have a single column, attribute tables are multiple-column library tables. Typically an attribute table consists of a key field and multiple “attribute” (dependent) fields. When a lookup is performed on the key value, one, several, or all of the corresponding attribute values are returned. This is useful in INPUT for displaying descriptive information in drop-down selection lists. It also provides the means to create tables of multi-attribute lookup data in the library, and to standardize this data and not have to recreate it with every project. The user can enter an identifier value only (the key), and report entities can look up the attribute values by performing a lookup on the key at output time.

To see how descriptive information in an attribute table can assist the user in making a lookup selection in INPUT, do the following:

1. Go to INPUT Water Levels.

2. Click in the Reading Event field in the first record. Notice that a two-column selection list appears, with the reading event code in the first column and a description in the second column.

3. Pres Esc to close the selection list, then right-click in a cell in the Reading Event column and select Field Properties. Notice that the Lookup field has the value ‘Libtbl!water level event’, which means that the Reading Event field is configured to use the WATER LEVEL EVENT library table.

4. Go to DATA DESIGN Library Data.

gINT Software, Inc. www. gintsoftware.com

27

Page 32: Data Design Tutorial 8

USING DATA DESIGN

5. Select ‘WATER LEVEL EVENT’ in the object selector. Notice that the library table has three columns.

6. Click the Properties icon. Notice that the Key Field is ‘Code’, Hide Lookup Key is checked, and Number of Fields Shown in Dropdown is 2. This configures INPUT to hide the Code field and show the Event and Description fields in selection lists.

To create an attribute table with multiple attributes, do the following:

1. Go to DATA DESIGN Library Tables.

2. Select File New.

3. Enter the following values:

Property Value

Name CASING TYPE

Column Header Lines 2

Key Field Name Casing Identifier

Hide Lookup Key unchecked

Number of Fields Shown in Dropdown 4

gINT Software, Inc. www. gintsoftware.com

28

Page 33: Data Design Tutorial 8

USING DATA DESIGN

4. Click OK. Add the following fields to the Fields list:

Name Type Units

Outside Diam Double in

Inside Diam Double in

Hammer Weight Integer

Hammer Fall Integer

5. Click the Library Data tab. Enter the following values:

Casing Identifier Outside Diam

Inside Diam

Hammer Weight

Hammer Fall

A-5-B 3 3.5 300 18

A-5-C 6 6.5 400 36

A-6 4 4.25 300 36

6. Go to INPUT Borehole.

7. Select Tables Add Field. Enter the following values:

Field Value

Name Casing Type

Type Text

Lookup Libtbl!casing type

Must Use Lookup checked

Allow Additions in Input unchecked

8. Click OK. The Casing Type field is created.

9. Click the drop-down arrow for the Casing Type field in the ‘B-1’ borehole record. Notice that all of the data for each casing type is presented, and that when you select a row in the selection list, the Casing Type field is populated with the Casing Identifier from the library table.

gINT Software, Inc. www. gintsoftware.com

29

Page 34: Data Design Tutorial 8

USING DATA DESIGN

Correspondence Files When the table-and-field structure of an imported spreadsheet, Access database, delimited text file, or gINT project does not match that of the project you’re importing into, you use a correspondence file to specify the mappings between fields in the source and fields in the target. Similarly, you can use a correspondence file on export to create a file with a different structure than the source project. In addition to directly mapping source fields to their destination tables, you can also perform processing on the data in the fields to make necessary conversions.

Correspondence files are text files with a specific syntax. Generally they are stored in the \gINT\datatmpl\ folder. Correspondence files for import are usually given a .GCI filename extension, and those for export a .GCX extension. Once you have created a correspondence file for data files of a particular format, you can use it for import of these files as often as needed.

Note: You can use a .GCX file for import or a .GCI for export if desired, as the file syntax is the same.

gINT provides the DATA DESIGN Correspondence Files utility application for creating and editing correspondence files. You could create correspondence files with a text editor, but the application is faster to use and less error-prone.

We will demonstrate the creation of a correspondence file for import of a supplied Excel file called corresp file test data.xls. Do the following:

1. Open the corresp file test data.xls file in Excel. It is located in \gINT\projects\. Click on each of the sheet tabs, and notice the following:

• POINT tab: This tab has borehole data, and will import to the POINT table in simple project.gpj. Several fields do not have counterparts in the project, and will not be included in the import. HOLE_LOG corresponds to Logged By in the project.

• GEOL tab: This tab provides lithology data. PointID and Depth are the same as in the LITHOLOGY table in the project. GEOL_BASE corresponds to the Bottom field. GEOL_DESC corresponds to Description. GEOL_LEG provides graphic codes, but these do not match the material symbols used in our project, and so will have to be translated.

• SAMP tab: This tab provides sample data. PointID and Depth are the same as in the SAMPLE table in the project. SAMP_BASE provides a bottom depth for each sample, but since our project uses Depth and Length rather than Depth and Bottom, this must be converted to Length. SAMP_TYPE will require translation to Type codes that correspond to sampler graphics found in our library. SAMP_PREC provides recovery values as a percentage; we will ignore this field for now and set up conversion to Recovery Length in a later exercise.

2. Close Excel.

Note: You cannot use an Excel file as a source file for creating mappings in the Correspondence Files application while it is still open in Excel.

gINT Software, Inc. www. gintsoftware.com

30

Page 35: Data Design Tutorial 8

USING DATA DESIGN

3. Go to DATA DESIGN Correspondence Files.

! 4. Select File New File. This starts a new correspondence (GCX or GCI) file.

5. Select File Save As, and specify a filename of test import.gci in \gINT\datatmpt\. Click Save.

6. In Source File, click the Browse button, specify ‘Excel files’ for Files of Type, and select corresp file test data.xls in \gINT\projects\, then click Open. This is the spreadsheet to be used as a model for Excel files to be imported.

7. In Target File, click the Browse button and select simple project.gpj in \gINT\projects\, then click Open. This is the project database we will import into, with the aid of the correspondence file.

8. Click the drop-down arrow on the Target Table drop-down list. Notice that the table names in simple project.gpj are listed. Select ‘POINT’ in the list. Notice that a list of fields from the POINT table appears in the Target Field column of the mapping table.

gINT Software, Inc. www. gintsoftware.com

31

Page 36: Data Design Tutorial 8

USING DATA DESIGN

Each Target Field is what is being mapped to (in the destination project). You need to provide a Source Expression to specify what you are mapping from (for those fields that are mapped from the source spreadsheet).

9. Select a Default Source Table of POINT. This is the name of the table (actually the sheet) in the source spreadsheet that maps to the POINT table in simple project.gpj.

10. In the Data Tool (shown below), set the Table drop-down selection to POINT and click the drop-down for Field to see which fields are available in the POINT sheet in the spreadsheet.

11. Click in the Source Expression to the right of ‘PointID’. In the Data Tool, select a Table of ‘POINT’ and a Field of ‘PointID’, then click Paste. Press Tab to exit the Expression popup.

‘<<POINT.PointID>>’ appears in the Source Expression.

12. Enter the following values in the mapping table for POINT, using the Data Tool:

Target Field Source Expression

PointID <<POINT.PointID>>

HoleDepth <<POINT.HoleDepth>>

Elevation <<POINT.Elevation>>

North <<POINT.North>>

East <<POINT.East>>

Plunge <<POINT.Plunge>>

Logged By <<POINT.HOLE_LOG>>

13. Click Save to save the mappings to the correspondence file.

gINT Software, Inc. www. gintsoftware.com

32

Page 37: Data Design Tutorial 8

USING DATA DESIGN

14. Next you create mappings into the LITHOLOGY table. Select ‘LITHOLOGY’ in the Target Table drop-down list, ‘GEOL’ in the Default Source Table, and ‘GEOL’ in the Table drop-down in the Data Tool. Enter the following:

Target Field

Source Expression

PointID <<GEOL.PointID>>

Depth <<GEOL.Depth>>

Bottom <<GEOL.GEOL_BASE>>

Graphic <<Case(<<GEOL.GEOL_LEG>>,=104,CONCRETE,=102,FILL,=403,SM,=810,BASALT)>>

USCS <<Omit>>

Description <<GEOL.GEOL_DESC>>

Line Type <<Omit>>

The expression for the Graphic field converts from material codes used by the person who supplied the spreadsheet into equivalent material symbol codes in our library. The Case() function works as follows:

• If GEOL.GEOL_LEG=104, return ‘CONCRETE’

• If GEOL.GEOL_LEG=102, return ‘FILL’

• If GEOL.GEOL_LEG=403, return ‘SM’

• If GEOL.GEOL_LEG=810, return ‘BASALT’

The <<Omit>> value in the USCS and Line Type fields is not required for successful data conversion, but will eliminate warning messages for these fields in the status log that is generated during import. To paste <<Omit>> into a field using the Data Tool, select a System value of ‘Data Items’ and an Items value of ‘Omit’, then click Paste.

15. Click Save .

gINT Software, Inc. www. gintsoftware.com

33

Page 38: Data Design Tutorial 8

USING DATA DESIGN

16. To create mappings for the SAMPLE table, select ‘SAMPLE’ in the Target Table, ‘SAMP’ in the Default Source Table and ‘SAMP’ in the Table drop-down in the Data Tool. Enter the following:

Target Field Source Expression

PointID <<SAMP.PointID>>

Depth <<SAMP.Depth>>

Length <<Calc((<<SAMP.SAMP_BASE>> - <<SAMP.Depth>>) * 12)>>

Type <<Case(<<SAMP.SAMP_TYPE>>,=P,SH,=SPTLS,SPT,=U100,UD,=U76,UD)>>

Number <<SAMP.SAMP_REF>>

Recovery Length <<Omit>>

RQD Length <<Omit>>

Blows 1st <<Omit>>

Blows 2nd <<Omit>>

Blows 3rd <<Omit>>

Blows 4th <<Omit>>

Moisture Content <<Omit>>

The expression for the Length field calculates Length by subtracting the ‘Depth’ value in the spreadsheet from the ‘SAMP_BASE’ (bottom) value to get the sample length in feet, then multiplying by 12 to obtain inches.

The expression for the Type field (sample graphic) is comparable to what was done for the lithology graphic. The Case() function returns the following:

• If SAMP.SAMP_TYPE=’P’, return ‘SH’

• If SAMP.SAMP_TYPE=’SPTLS’, return ‘SPT’

• If SAMP.SAMP_TYPE=’U100’, return ‘UD’

• If SAMP.SAMP_TYPE=’U76’, return ‘UD’

17. Click the Set Empty Sources to <<Omit>> button. This sets the Default Source Table to <<Omit>> for all tables we’re not creating mappings for, and ensures that nothing is imported into these tables.

18. Click Save .

gINT Software, Inc. www. gintsoftware.com

34

Page 39: Data Design Tutorial 8

USING DATA DESIGN

19. Select File View As Text to view the contents of the test import.gci (alternately you could open it with Notepad or another text editor in \gINT\datatmpl\). Notice how this correspondence file captures the conversion settings you specified.

20. Select File View As Text again to uncheck this option, and restore the standard correspondence file builder view.

To test the import feature using the new correspondence file, do the following:

1. Go to INPUT Borehole.

2. Select File Import/Export Import from Excel File.

3. Click the Browse button for Excel File, and select corresp file test data.xls in \gINT\projects\.

gINT Software, Inc. www. gintsoftware.com

35

Page 40: Data Design Tutorial 8

USING DATA DESIGN

4. Click the Browse button for Correspondence File, and select test import.gci in \gINT\datatmpl.

5. Leave Overwrite Options set to ‘Never’, and click OK.

6. Look at the results in the status log, then click OK to dismiss it.

7. Select ‘Test1’ in the Borehole tab, then view the records for this point in the Sample and Lithology tabs.

8. Return to the Borehole tab, and delete the ‘Test1’ record.

gINT Software, Inc. www. gintsoftware.com

36

Page 41: Data Design Tutorial 8

USING DATA DESIGN

User System Data The User System Data application enables you to create user system data items. User system data items (user data items, for short) are expressions you can create, store and re-use. These can be referenced in any property setting that accepts expressions, and are particularly useful in report entity properties. User data items perform calculations, comparisons, and simple decision logic, and can execute system functions. They can incorporate data from database fields as well as the results from other user data items. User data items are also useful for storing constants, such as maximum clay grain size, in a centralized place such that a change to the constant is made once and reflected in multiple places.

Note: User system data items are not to be confused with data items, which are supplied with the software and not editable by users.

The construction and use of user system data items is demonstrated in the Log Report Design tutorial, gINT University course (gINT 004), or module in the gINT Training Summit.

gINT Software, Inc. www. gintsoftware.com

37

Page 42: Data Design Tutorial 8

USING DATA DESIGN

Component Lithology Descriptions The use of a single Description field in the LITHOLOGY table to hold material descriptions has various limitations that can be overcome by splitting it into many fields that are combined into a single description at output time. This multiple-field lithology description approach is called component lithology.

Generating Component-Based Lithology Descriptions

The training.gpj project and training.glb library are already configured to use component lithology tables to generate material descriptions. In particular, soil-related components of a description can be entered in the LITHOLOGY SOIL table, and rock-related components in the LITHOLOGY ROCK table. When both are unused, and a description is directly entered in the LITHOLOGY table, the one in LITHOLOGY is all that appears in a report. To see component lithology demonstrated, do the following:

1. Go to INPUT.

! 2. Ensure that training.gpj project is open (File Open Project, then browse to training.gpj in \gINT\projects).

3. If the Soil Components and Rock Components tabs do not currently appear, click the List icon, and uncheck the Hide field for ‘LITHOLOGY SOIL’ and ‘LITHOLOGY ROCK’.

4. Click the Lithology tab, and select ‘B-1’ in the object selector. Notice that the Description field in the first row (for Depth=0) reads as follows:

Gray-brown clayey sandy gravel, medium dense to dense, moist to wet, gravels subrounded up to 2" diameter

gINT Software, Inc. www. gintsoftware.com

38

Page 43: Data Design Tutorial 8

USING DATA DESIGN

5. Click the Soil Components tab. This tab is for editing the LITHOLOGY SOIL table, which has a one-to-one relationship with LITHOLOGY.

Notice that we are still in borehole ‘B-1’, there is one empty row for each Depth value in the LITHOLOGY table, and there are several columns (each one for a different piece of a lithology description).

6. Enter the following in the first row:

Field Value

USCS Group Name Clayey gravel with sand

USCS GW-GC

Color 1 Shade grayish

Color 1 brown

Primary Moisture moist

Secondary Moisture wet

Primary Consistency medium dense

Secondary Consistency dense

Additional Description gravels subrounded up to 2" diameter

7. Go to OUTPUT Logs.

gINT Software, Inc. www. gintsoftware.com

39

Page 44: Data Design Tutorial 8

USING DATA DESIGN

8. Select ‘GENERAL BH/TP/WELL’ in the object selector, specify a Borehole ID of ‘B-1’, and

preview the report. Using the Quick Zoom tool, zoom in on the description in the uppermost lithology layer.

Notice that there are two lithology descriptions appended to each other in the first layer—one from combining the components we specified in the Soil Components tab:

CLAYEY GRAVEL WITH SAND, (GW-GC), grayish brown, moist to wet, medium dense to dense, gravels subrounded up to 2" diameter

followed by one from the Description field in the LITHOLOGY table:

Gray-brown clayey sandy gravel, medium dense to dense, moist to wet, gravels subrounded up to 2" diameter

9. Close the preview and go to INPUT Lithology. Delete the contents of the Description field for the first row.

10. Go to OUTPUT Logs, select Borehole ID ‘B-1’, preview the report, and zoom in on the ‘Material Description’ in the first row. Notice that it now only displays the material description generated from the Soil Components tab:

gINT Software, Inc. www. gintsoftware.com

40

Page 45: Data Design Tutorial 8

USING DATA DESIGN

The ‘GENERAL BH/TP/WELL’ report is designed to display the component description from the LITHOLOGY SOIL (Soil Components) or LITHOLOGY ROCK (Rock Components) tab, if present, followed by the non-component description from the LITHOLOGY table, if present. If one is missing, only the other displays.

Benefits of Component Lithology

Now that you have used a component lithology description table to construct a material description, you can better understand how the component approach differs from the non-component approach. Component lithology provides the following benefits:

• Consistency: Description components usually have lookups associated with them, which increases consistency and makes for faster data input.

• Built-In Formatting: The order of the components in the final output, the case (upper, lower, title), font style (bold, italic, underline), punctuation, and delimiters (parentheses, square brackets, etc.) are set up in DATA DESIGN and REPORT DESIGN. This takes formatting out of the hands of the users, speeding up data entry and creating consistent formatting.

• Enforced Attribute Selection: By pre-specifying which components are in the component description structure, the user is forced to choose between attributes that are required instead of including some random selection of data.

• Selective Reporting: On a log form you may want to see the entire material description but on a fence you probably just want to see some abbreviated form (loose sand, firm clay, etc.). The component model enables you to selectively include components in the lithology descriptions for different reports.

• Query Opportunities: You can filter on any combination of components in OUTPUT, enabling you to query or report only layers with certain characteristics.

• Validation: gINT Rules can be written to prevent descriptions like “hard sand” or “loose clay”.

Understanding How a Component Description Structure Works

The component data entry table, LITHOLOGY SOIL in the previous example, contains a set of data entry fields whose values are combined in some predefined way to form a description. A user can enter some of these fields and not others, as we have just seen, and a valid, properly formatted description will result. The component data entry table, where the user performs data entry, is one of four elements of a component description structure that creates, in this case, component-based lithology descriptions. This is illustrated in the following diagram:

gINT Software, Inc. www. gintsoftware.com

41

Page 46: Data Design Tutorial 8

USING DATA DESIGN

There are four elements to a component description structure:

• Lookup Tables

• Component Data Entry Table

• Component Formatting Table

• ComponentDesc() Function

We will examine each of these separately.

The Component Data Entry Table and Lookup Tables

The component data entry table (LITHOLOGY SOIL) provides fields for user data entry, one field for each component. The component data entry table is linked in a one-to-one relationship to the table (LITHOLOGY) to which it is, in essence, providing a description string. To see this, do the following:

1. Go to INPUT Lithology.

2. Notice that there is a row for 0 to 4 feet, another for 4 to 10 feet, one for 9 feet, and so on.

3. Go to INPUT Soil Components.

4. Notice that each row in LITHOLOGY SOIL is at a depth that corresponds to the rows in LITHOLOGY.

5. Go to DATA DESIGN Project Database and open the current project. Select ‘LITHOLOGY SOIL’ in the object selector.

6. Click the Properties icon. Notice (in the middle of the window) that the Parent Table is ‘LITHOLOGY’ and One To One Relation is checked.

This creates LITHOLOGY SOIL as a 1-to-1 child of LITHOLOGY, effectively providing an extended set of fields in each LITHOLOGY record.

gINT Software, Inc. www. gintsoftware.com

42

Page 47: Data Design Tutorial 8

USING DATA DESIGN

Note: The component fields could have been added directly to the LITHOLOGY table instead of creating a new table (especially when the number of components is small). For larger sets of components, a 1:1 child table is a better way to organize the component data.

7. Click OK to close the properties window.

8. Click on ‘USCS Group Name’ in the Fields list. Notice that it has a Type of ‘Text’, a Lookup value of ‘Libtbl!soil uscs group name’ and that Must Use Lookup is checked.

For all fields in a component data entry table (other than the key fields, which are PointID and Depth in this case), you will typically specify a ‘Text’ data type, and a required lookup using either a lookup list or a library table.

9. Click on other fields in the Fields list, such as ‘USCS’ and ‘Color1 Shade’. Notice the names of the lookups specified in the Lookup property.

10. Click the Library Data tab. In the object selector, choose ‘SOIL USCS GROUP NAME’. Notice the list of USCS groups. You selected one of these from a lookup when you entered data into the USCS Group Name field in the LITHOLOGY SOIL table earlier.

The Component Formatting Library Table

The formatting of a component-generated lithology description is defined in a special library table called a component formatting library table (or just component formatting table). A row is created in the component formatting table for each field to be output from the component data entry table. Properties in this row specify various attributes of how the data entry table field will be presented in the component description that is output: the field’s order in the description, its capitalization, words or punctuation to follow the field’s value, character formatting and so on.

The component formatting library table for our component structure is called DESCRIPTION SOIL LITHOLOGY. We will examine the contents of this specialized library table. Perform the following steps:

1. While still in DATA DESIGN Library Data, select ‘DESCRIPTION SOIL LITHOLOGY’ in the object selector. The following appears:

2. Notice how the Data Expression values in the seven rows reference fields in the LITHOLOGY SOIL table. Also notice these other columns:

ο Data Joiner and Data Expression 2: These two fields are used to combine two data entry table values into one expression. For example, Row 6 specifies that it is to generate a combined expression from the contents of Primary Moisture and Secondary Moisture in LITHOLOGY SOIL, separating them with the word “ to ”. If Primary Moisture is ‘moist’ and Secondary Moisture is ‘wet’, the result is ‘moist to wet’. However if Secondary Moisture is left blank, the result is ‘moist’. This is because the Data Joiner is dropped when the

gINT Software, Inc. www. gintsoftware.com

43

Page 48: Data Design Tutorial 8

USING DATA DESIGN

Data Expression 2 is empty. As a result, users can enter neither, one, or both moisture values, and still have an acceptable looking result in the output.

ο Override Case: If specified, can be used to capitalize the component field’s data. Notice that this has been used to capitalize the USCS Group Name.

ο Separator: The separator text is inserted after the referenced field if the field has a value. For example, if there is a USCS Group Name value, it will be followed by a comma, and if there isn’t a value, the comma will be omitted.

ο Delimiter: If there is a value, the delimiter brackets are inserted around it.

We will make some changes to the formatting specifications then view the result.

3. We want to move the USCS code (in the second row) before the USCS Group Name (in the first row). To do this, you right-mouse-button drag the light blue square at the left of the USCS row upwards. In other words, position the mouse pointer in the light blue square of the row to move, press and hold the right mouse button, drag the mouse upwards one row, and release the button. The dragged row is dropped at the location indicated by the insertion line.

4. Delete the Delimiter value from the first (USCS) row. Add it in the second row by clicking in the Delimiter cell and selecting ‘(...)’ from the lookup.

5. Delete the comma from the Separator cell in the first row.

6. Delete the ‘Upper Case’ value from the Override Case cell in the second row.

7. Select OUTPUT Logs, specify a Borehole ID of ‘B-1’, and preview the report. Zoom in on the material description in the first row.

Notice how the lithology description has been rearranged and reformatted without any changes to the data in the component fields.

8. Close the preview.

Adding Component Fields

To add a new component field to a component structure requires adding it to the component data entry table, and also adding a row that refers to it in the component formatting library table. We will add and configure two new component fields, Gradation and Grain Size. Do the following:

gINT Software, Inc. www. gintsoftware.com

44

Page 49: Data Design Tutorial 8

USING DATA DESIGN

1. Go to DATA DESIGN Project Database and open the current project. Select ‘LITHOLOGY SOIL’ in the object selector.

2. Click the New button beneath the Fields list. Enter the following values, then click OK:

Name Lookup Must Use Lookup

Gradation Libtbl!soil gradation checked

3. Move the Gradation field upwards one row, using the Up Arrow button, so it is just before Additional Description.

4. Click the New button beneath the Fields list. Enter the following values, then click OK:

Name Lookup Must Use Lookup

Grain Size Libtbl!soil grain size checked

5. Move the Grain Size field upwards one row, using the Up Arrow button, so it is just before Additional Description.

6. Click the Library Data tab.

7. In the blank row on the bottom of the table, enter the following:

Field Value Comments

Data Expression <<LITHOLOGY SOIL.Gradation>> Click in the destination cell, then select a Table of ‘LITHOLOGY’ and Field of ‘Gradation’ in the Data Tool. Click Paste.

Separator , Comma only—a blank is not required after the comma.

8. In the new blank row on the bottom of the table, enter the following:

Field Value Comments

Data Expression <<LITHOLOGY SOIL.Grain Size>> Use the Data Tool similarly to above.

Separator grained, Include a blank space before the word ‘grained’. None is needed after the comma.

9. Right-click drag the Additional Description row downwards until it is the last row in the table.

10. Go to INPUT Soil Components. Scroll to the right until the Gradation and Grain Size columns are visible.

11. In the first row, specify ‘well graded’ for Gradation and ‘fine to medium’ for Grain Size.

gINT Software, Inc. www. gintsoftware.com

45

Page 50: Data Design Tutorial 8

USING DATA DESIGN

12. Go to OUTPUT Logs, select a Borehole ID of ‘B-1’, and preview the report. Zoom in on the first material description, and notice the changes.

Notice the ‘well graded’ and ‘fine to medium grained’ clauses in the description.

13. Close the preview, and return to INPUT Soil Components. Delete the value from the Gradation column.

14. Go to OUTPUT Logs, specify a Borehole ID of ‘B-1’, preview the report, and zoom in on the first material description. Notice that the gradation clause has been removed without any disruption of the formatting.

15. Close the preview.

Adding Formatting Elements

You are not restricted to the seven formatting fields in the component formatting table we’ve been manipulating. Additional formatting fields can be added with specialized uses. Do the following:

1. Go to DATA DESIGN Library Tables. Notice that there are currently six fields (other than Print Order): Data Expression, Data Joiner, Data Expression 2, Override Case, Separator, and Delimiter.

All of these fields are optional, although we will not remove any because these are all useful.

gINT Software, Inc. www. gintsoftware.com

46

Page 51: Data Design Tutorial 8

USING DATA DESIGN

2. Select Tables Merge Component Description Fields. The Fields to Merge dialog box appears:

3. Any of the listed formatting fields can be added to the component formatting table. We will add Bold, Italic and Underline. Hold down Ctrl, and click ‘Bold’, ‘Italic’ and ‘Underline’ in the list, then click OK.

Notice that the three new formatting fields have been added to the Fields list.

4. Click the Save icon, then click the Library Data tab. Notice that three new columns appear to the right containing checkboxes for Bold, Italic and Underline formatting.

5. In the USCS row, check the Bold checkbox.

6. In the Grain Size row, check the Underline checkbox.

7. In the Additional Description row, check the Italic checkbox.

gINT Software, Inc. www. gintsoftware.com

47

Page 52: Data Design Tutorial 8

USING DATA DESIGN

8. Go to OUTPUT Logs, specify a Borehole ID of ‘B-1’, and preview the report. Zoom in on the material description for the first lithology layer.

9. Notice that the USCS code is now bolded, and the additional description is italicized. However, only part of the grain description is underlined, namely the part before the ‘ grained,’ separator. To correct this we’ll need a Suffix field in the component formatting table.

10. Close the preview and go to DATA DESIGN Library Tables.

11. Select Tables Merge Component Description Fields, select ‘Suffix’, and click OK. The Suffix field is added to the Fields list.

12. Click the Library Data tab. In the Grain Size row, replace the contents of the Separator column with a comma, and enter ‘ grained’ in the Suffix field (include a blank space before the word ‘grained’).

13. Go to OUTPUT Logs, select a Borehole ID of ‘B-1’, preview the report and zoom in on the first material description. Notice that now the entire grain expression is underlined.

14. Close the preview.

Note that the distinction between using a separator vs. a suffix in combination with other formatting is that the element’s formatting will be applied to a suffix or prefix, but not to a separator.

gINT Software, Inc. www. gintsoftware.com

48

Page 53: Data Design Tutorial 8

USING DATA DESIGN

For further information on the formatting that can be implemented using fields in a component formatting table, see Help Index Merge Component Description Fields.

Understanding the ComponentDesc() Function

The ComponentDesc() function is what actually generates a description text string from the contents of a component data entry table and a component formatting table. The function includes the name of the component formatting table as an argument, and uses its contents as a set of specifications from which to build the description—arranging the components in order by Print Order, retrieving the value for each from the field or expression referenced in Data Expression, and formatting it according to the other properties.

The ComponentDesc() function also has two true-false arguments that establish some additional formatting properties. To illustrate this, do the following:

1. Go to REPORT DESIGN Logs. Select ‘GENERAL BH/TP/WELL’ in the object selector if not already selected.

2. Zoom in on the blue ‘Material Description’ column entity near the center of the report. Double-click on the area with the crossed diagonal lines beneath ‘Material Description’.

The COLUMN - TEXT VS DEPTH PROPERTIES window appears.

gINT Software, Inc. www. gintsoftware.com

49

Page 54: Data Design Tutorial 8

USING DATA DESIGN

3. Notice the value in the Text Expression property.

The ‘Material Description’ entity, whose properties we are viewing, generates the Material Description column in the log report. The Text Expression property determines the source of the text that appears at the various depths in the Material Description column. One could set this property to <<LITHOLOGY.Description>>, which would pull the material description values directly from the Description field in the LITHOLOGY table. However, a different technique is used here, one that generates component descriptions instead by calling a user system data item called Description Lithology.

4. Click OK to close the entity properties window, then go to DATA DESIGN User System Data, and select ‘Description Lithology’ in the object selector. The expression reads as follows:

<<ListBuildSepTrim(" ",_ <<User System Data.Description Soil Lithology>>,_ <<User System Data.Description Rock Lithology>>,_ <<LITHOLOGY.Description>>_ )>>

What this expression does is build a description string starting with the string generated by the Description Soil Lithology user data item, followed by a string generated by the Description Rock Lithology user data item, followed by the Description field from the LITHOLOGY table.

Now let’s look at the Description Soil Lithology user data item.

5. Select ‘Description Soil Lithology’ in the object selector. The expression reads as follows:

<<ComponentDesc([DESCRIPTION SOIL LITHOLOGY], false, true)>>

Here is the ComponentDesc() function that we mentioned before, containing three arguments:

• Argument 1: Library table name. Name of the component formatting library table, in square brackets.

• Argument 2: Apply upper case to the first character of each description? (Yes if TRUE, No if FALSE).

• Argument 3: End each description with a period? (Yes if TRUE, No if FALSE)

The present set of argument settings identifies the DESCRIPTION SOIL LITHOLOGY library table we’ve been working with, and specifies that there is no initial capitalization and a period at the end of the description.

gINT Software, Inc. www. gintsoftware.com

50

Page 55: Data Design Tutorial 8

USING DATA DESIGN

DATA DESIGN Utilities There are a number of utilities provided in the Tools and Tables menus that enable you to examine, compare, manipulate, and merge project database tables. Some can operate on library tables as well. These utilities are described and/or demonstrated in this section.

User Interface Manipulation Utilities

User interface manipulation utilities in the Tables menu do not alter the tables, just their visibility or order in the INPUT tabs. These menu options are available in both DATA DESIGN and INPUT, but we will demonstrate them in INPUT to more readily see their effects.

List (Tables Menu)

The List option in the Tables menu (also invoked from the toolbar using the List icon) lists all tables in the current project, and enables you to show or hide particular tables. To demonstrate this, do the following:

1. Go to INPUT. Notice the set of table tabs.

2. Select Tables List or click the List icon. The PROJECT DATA TABLES window appears.

3. Add and remove some checkmarks in the Hide column, for example, if LITHOLOGY ROCK is hidden, expose it, and if TESTS is exposed, hide it. Click OK.

4. Notice your changes reflected in the tab bar.

gINT Software, Inc. www. gintsoftware.com

51

Page 56: Data Design Tutorial 8

USING DATA DESIGN

Input Sequence (Tables Menu)

This command allows you to rearrange the display order of the table tabs in INPUT. Do the following:

1. Select Tables Input Sequence. The Database Table Display Order window appears.

2. Highlight SAMPLE, then click the Up Arrow repeatedly to move it to a position between POINT and LITHOLOGY.

3. Click OK. The Sample tab will have moved to the left.

Group Sequence (Tables Menu)

Table groups provide the means to organize tables into groupings within table group tabs, which reside in a tab bar (along with module tabs such as Site Map or Surfaces) just beneath the application group tab bar. The default table group tab, Main, by default includes all tables, and does not appear unless other module tabs or table group tabs are visible.

You can create custom group tabs and assign tables to them in the table properties in DATA DESIGN. You can subsequently rearrange the order of group tabs using the Group Sequence option in the Tables menu. To demonstrate this, do the following:

1. Go to DATA DESIGN Project Database and reopen the current project.

2. Select LITHOLOGY in the object selector, then click the Properties icon.

3. In New Group, enter ‘Lithology’. Click OK. This creates a new table group tab called ‘Lithology’ and places the LITHOLOGY table inside it in INPUT.

4. Click OK to close the table properties for LITHOLOGY.

5. Select LITHOLOGY SOIL in the object selector, click the Properties icon.

gINT Software, Inc. www. gintsoftware.com

52

Page 57: Data Design Tutorial 8

USING DATA DESIGN

6. In response to the ‘Assign All Child Tables (LITHOLOGY SOIL, LITHOLOGY ROCK) to group Lithology?’ prompt, click Yes.

7. Click the Properties icon. Notice that the Group Name for LITHOLOGY SOIL is ‘Lithology’. Click OK.

8. Go to INPUT. Notice that five tables are under the Main Group tab.

9. Click the Lithology tab. Notice that three tables are under this tab.

10. Select Tables Group Sequence.

11. Highlight ‘Site Map’ and click the Down Arrow to move it beneath ‘Lithology’. Click OK.

12. Notice that the Lithology tab is now prior to the Site Map tab in the tab bar.

Note: The PROJECT and POINT tables do not have a Group Name property. They can only be in the Main group.

Utilities to Import or Merge Tables and Fields

The Tables and File menus in DATA DESIGN provides various ways to copy tables and fields from another database or external file into the current project, or to copy fields from table to table. Note that these utilities just copy structures—to load external data, you would first need to create the new tables and fields with one of these utilities, then import the data using File Import/Export in INPUT.

Import Table (Tables Menu)

The Import Table option in the Tables menu imports a table and its fields, without data, into the current project from another project or template. You can copy the table to the same name in the new location, or rename it. Do the following:

1. Go to DATA DESIGN Project Database.

! 2. Select File Open and open simple project.gpj.

3. Select Tables Import Table. The CHOOSE A DATABASE file browser window appears.

gINT Software, Inc. www. gintsoftware.com

53

Page 58: Data Design Tutorial 8

USING DATA DESIGN

4. Browse to training.gpj in \gINT\projects\ and click Open. The Select table from dialog box appears:

5. In the Source table field, select ‘TESTS’.

6. Click OK. Notice that ‘TESTS’ now appears in the object selector, and the Fields list shows the full set of fields obtained from the TESTS table in training.gpj.

Import Multiple Tables (Tables Menu)

The Import Multiple Tables option in the Tables menu performs the same function as Import Table, namely to import tables and their fields, without data, from another template or project. The advantage of Import Multiple Tables is, as you can guess, to import multiple tables at once instead of one at a time. However, you cannot rename any tables on import the way you can with Import Table.

Do the following:

1. Select Tables Import Multiple Tables. The CHOOSE A DATABASE file browser window opens.

2. Browse to training.gpj and click Open.

3. The Select One or More dialog box appears.

4. Notice that all tables in the source database that are not already present in the target are listed. In the current case, only one table meets this criterion, but in other situations there might be several tables listed.

5. Click Mark All, then click OK.

6. Notice that the object selector now shows ‘LITHOLOGY ROCK’, and the Fields list shows the fields from that table. If there had been multiple tables import, the last one in the selection list would be the one displayed in DATA DESIGN.

gINT Software, Inc. www. gintsoftware.com

54

Page 59: Data Design Tutorial 8

USING DATA DESIGN

Merge Fields from Current File (Tables Menu)

This command copies fields from one table to another in the current database. This is typically used when you want to create or eliminate a table with a one-to-one relationship to another table, and move the fields from one to the other. Do the following:

1. Select ‘POINT’ in the object selector.

2. Select Tables Merge Fields from Current File. The Available Tables dialog box appears.

3. Highlight ‘WELL DETAILS’ and click OK. The Fields to Merge dialog box appears.

4. Click the Mark All button, then OK. A warning message appears to tell you that only the field structures are copied, not the data. Click OK to dismiss the message.

5. Notice that Casing Top Elev and Casing Type are now present in the POINT table. Normally we would now copy the data into these fields in POINT, then delete the WELL DETAILS table. However, this was just for demonstration purposes, so we will delete the new fields from POINT instead.

gINT Software, Inc. www. gintsoftware.com

55

Page 60: Data Design Tutorial 8

USING DATA DESIGN

6. Highlight each of these two fields in turn and click Delete.

Merge Fields from Other File (Tables Menu)

The Merge Fields from Other File option in the Tables menu provides the only means to import field lists from external Excel, CSV, Access or AGS files. It enables the import of fields, up to the entire field list, from one table (or equivalent) in the external file to the current gINT table. Therefore, it does not enable you to import the structures of multiple tables at once, and you must create a table before importing fields into it (unless the table already exists in gINT). Also, all imported fields are created with a Type of ‘Text’, which you will need to change for fields where this is not what is desired. To demonstrate this feature, do the following:

1. Select Tables New. Enter a Name of ‘GEOL’, a Key Set of ‘PointID, Depth’, and a Parent Table of ‘POINT’. Click OK.

2. Select Tables Merge Fields from Other File. A file browser window appears.

3. In the file browser, select a Files of Type of ‘Excel’, then browse to corresp file test data.xls in \gINT\projects. Click Open. A table selection list opens:

4. Select ‘GEOL’ and click OK. A field selection list appears, listing the fields in the GEOL table.

5. Select Mark All, then OK. Click OK to dismiss the warning message that tells you that only structures, not data, are imported.

6. Notice that the fields list from the external GEOL table is now present in the new GEOL table in the project.

gINT Software, Inc. www. gintsoftware.com

56

Page 61: Data Design Tutorial 8

USING DATA DESIGN

Note that the external fields could have been added to any existing table in your project. It is not necessary to add them to a new table, although this is more convenient for the present exercise.

7. Select Tables Delete Table and click OK in the confirmation message box.

Merge All Tables and Fields (Tables Menu)

This is a powerful database utility that should be approached with a bit of caution. What it does is to import the names and properties of all unduplicated tables and fields from a source database into your current database (the source and destination can be projects, templates, or one of each). The resulting merged database contains all tables found in either the destination (current) or source database, and within each table, all fields found in either database. This provides a fast way to incorporate new tables and fields that have been added to another database.

Since the current database is updated with various new tables and fields when you run this option, you should make a backup copy of it before proceeding. Then you open the destination database in DATA DESIGN (if not currently open), select Tables Merge All Tables and Fields, select the source database, and click Open. The process is automatic from there.

We will not demonstrate this option.

Build From Reports (File New Data Template menu)

The Build From Reports menu option enables you to generate a database from the set of fields utilized in a particular set of reports. This relies on the fact that report entities in reports reference particular table-field combinations, and the system can extract these and generate a database consisting of these names. However, the generated fields (other than Depth) will all be of type ‘Text’, and you will have to go through and change field types. To demonstrate this feature, do the following:

1. Select File New Data Template Build From Reports. The BUILD DATA TEMPLATE FROM REPORTS dialog box appears.

gINT Software, Inc. www. gintsoftware.com

57

Page 62: Data Design Tutorial 8

USING DATA DESIGN

www. gintsoftware.com 58

2. Click the Browse button to the right of the Reports to use field. The Reports to use dialog box appears.

3. Select, by Ctrl-Clicking or Shift-Clicking, several reports, then click OK.

4. Click OK to close the BUILD DATA TEMPLATE FROM REPORTS dialog box. The reports are processed, then a file browser window appears for specifying the name of the generated template.

5. Enter the name ‘multi report.gdt’, then click Save. The generated template appears in DATA DESIGN.

! 6. Reopen simple project.gpj.

Convert Projects (UTILITIES tab)

Convert Projects, like Merge All Tables and Fields, is a powerful database conversion utility that should be used carefully. Convert Projects is in the UTILITIES tab, but since it performs a role similar to the other utilities discussed here, it is included.

Convert Projects applies a specified data template to one or more projects, altering their data structures to match the specified template. Unlike the import/merge options in DATA DESIGN, Convert Projects imports data as well as structures into the new database. Additionally, Convert Projects can utilize a correspondence file to map between table-field combinations in the source and destination. This creates a considerable amount of control over the conversion process.

One use for Convert Projects is to update a large number of projects to the most current data template. To demonstrate a simple application of Convert Projects, do the following:

gINT Software, Inc.

Page 63: Data Design Tutorial 8

USING DATA DESIGN

! 1. Go to INPUT. Select File Open and open surfaces.gpj.

2. Click on each of the three table tabs in turn and notice the set of fields in each.

3. Go to UTILITIES Convert Projects.

4. Click the Browse button to the right of Data Template. Select data entry.gdt in \gINT\datatmpl\ and click Open.

5. Click the Browse button to the right of the input databases (large yellow) list box. Select surfaces.gpj in \gINT\projects\ and click Open. (Note that multiple input databases could be selected at this time).

gINT Software, Inc. www. gintsoftware.com

59

Page 64: Data Design Tutorial 8

USING DATA DESIGN

www. gintsoftware.com 60

6. Click Execute. The conversion is processed, and a status log window opens.

7. Click OK to close the status log window. Go to INPUT.

8. Click on each of the table tabs in turn. Note that empty new fields have been added to the PROJECT, POINT, and LITHOLOGY tables without disrupting the existing fields, and empty SAMPLE, WATER LEVELS, and WELL DETAILS/WELL CONSTRUCTION tables.

! 9. Select File Open and open training.gpj.

10. Open Windows Explorer and navigate to \gINT\projects\. Notice that there is a surfaces.org file in addition to the surfaces.gpj project file. The surfaces.org file is a backup of your original. Delete surfaces.gpj and then rename surfaces.org to surfaces.gpj. This restores the original project.

Information Gathering Utilities

Various utilities in the File, Tools and Table menus provide the means to obtain information about a table, a database, or multiple databases. Other utilities generate cross-reference lists that identify relationships between database fields and various places where they are used, including reports, user system data items, and other library objects.

Print (File Menu)

In DATA DESIGN, the Print option in the File menu generates a printout of the properties and fields in the currently selected table. This can be a useful source of information about how a table is configured and what it contains. Do the following:

1. Go to DATA DESIGN Project Databases, and open the current database. In the object selector, choose ‘SAMPLE’.

gINT Software, Inc.

Page 65: Data Design Tutorial 8

USING DATA DESIGN

2. Select File Print, or click the Print icon. The Print Specifications dialog box opens.

3. Select ‘All Pages’ under Print Range.

4. Click the Printer button. Select the appropriate printer in the Printer field. Click OK.

5. Click OK in the Print Specifications window to generate the report.

gINT Software, Inc. www. gintsoftware.com

61

Page 66: Data Design Tutorial 8

USING DATA DESIGN

www. gintsoftware.com 62

The report has an upper section detailing the table properties, and a lower section detailing the names and properties for each field.

Compare Databases (Tools Menu)

The Compare Databases option in the Tools menu enables you to compare the structures of any two databases and view the differences. This is useful for determining which tables and fields are in one database but not the other, or if there are property differences. Note that you can compare two projects, two templates, or a project with a template. Do the following:

1. Select Tools Compare Databases. The COMPARE DATABASES dialog box opens.

gINT Software, Inc.

Page 67: Data Design Tutorial 8

USING DATA DESIGN

2. Click the Browse button to the right of the File 1 field. In the file browser window that appears, select training.gpj in \gINT\projects\, then click Open.

3. Click the Browse button to the right of the File 2 field. In the file browser window that appears, select surfaces.gpj in \gINT\projects\, then click Open.

4. In the COMPARE DATABASES dialog box click OK. The report is generated.

5. Scroll down to ‘TABLES=====================================================’.

Notice that several tables are identified that are in training.gpj but not in surfaces.gpj.

6. Look beneath this to ‘TABLE FIELDS===========================================’.

Notice that there are three fields in the LITHOLOGY table that are in training.gpj but not in surfaces.gpj, and one field (Override Color) that is in surfaces.gpj but not in training.gpj.

7. Notice at the bottom of the window there are Print and Save As buttons. These can be used to print the report or save it to a text file, respectively.

8. Click the OK button to dismiss the report.

gINT Software, Inc. www. gintsoftware.com

63

Page 68: Data Design Tutorial 8

USING DATA DESIGN

Combined Database Characteristics (Tools Menu)

This command generates a multiple-tab Excel spreadsheet that provides side-by-side analysis of the tables and fields in multiple databases. It is a more comprehensive and easier-to-read output format than the text file generated by Compare Databases, and can compare multiple databases rather than just two. To demonstrate this feature, do the following:

1. Select Tools Combined Database Characteristics. The COMBINED DATABASE CHARACTERISTICS dialog box appears.

2. Click the Browse button to the right of the Excel File field. Specify a filename of ‘combined characteristics.xls’ and click Save.

3. Click the Browse button to the right of the Databases to use field. Highlight both training.gpj and surfaces.gpj by Ctrl-clicking, and click Open.

4. Click the Browse button again and select data entry.gdt in \gINT\datatmpl\, and click Open.

5. Check the Launch Excel after Export checkbox. Click OK. The spreadsheet is generated and opened.

6. Click the Table Summary tab. Notice that the final three columns identify in which database each field is found.

gINT Software, Inc. www. gintsoftware.com

64

Page 69: Data Design Tutorial 8

USING DATA DESIGN

7. Click the Special Features tab. Notice that the presence or absence of Lab Testing, Site Map and Surfaces support is detailed for each file.

8. Click the LITHOLOGY tab. Notice that the presence or absence of each field in each of the three databases is detailed. This analysis is performed for each table in a separate tab.

9. Close the Excel spreadsheet.

References to Current Field (Tables References menu)

The References to Current Field option in Tables References searches the library for all instances of the currently highlighted field in the current table. The option will display references to the field located in reports, blocks, and user system data items. This works for any project database field in Project Databases, or library table field in Library Tables or Library Data. The References button beneath the field list in Project Databases or Library Tables performs the same role.

To demonstrate this feature, do the following:

1. Select the POINT table in the object selector.

2. Highlight ‘Elevation’ in the Fields list, then click References or select Tables References References to Current Field. The REFERENCES TO CURRENT FIELD status log window appears.

3. Notice that the Elevation field is referenced in a text entity in the INDEX PROPS graph, in the Page Properties in three log reports, in “Column_DepthText” (text versus depth) entities in two reports, and in a text entity in a report block. Click OK to close the window.

4. Select ‘SAMPLE’ in the object selector. Highlight the Type field in the Fields list and click the References button. A new status log window opens.

gINT Software, Inc. www. gintsoftware.com

65

Page 70: Data Design Tutorial 8

USING DATA DESIGN

5. Notice that there are “Column_DepthText” (text vs. depth) and “Column_GrfcCol” (graphic column) entities containing this field in several log reports.

6. Scroll down to the bottom of the window. Notice that the field appears in a user system data item called Sample Types and Number in Project.

7. Click OK to close the status log window.

References to All Fields in Current Table (Tables References menu)

This menu option performs the same role as References to Current Field, but searches for references to all fields in the current table. This is equivalent to running References to Current Field once for each field. To demonstrate this, do the following:

1. In the object selector, choose ‘PROJECT’.

2. Select Tables References References to All Fields in Current Table. The REFERENCES TO ALL FIELDS IN ALL TABLES window appears.

3. Scroll through the list and notice the set of references for each field in the PROJECT table.

4. Click OK to close the status log window.

References to All Fields in All Tables (Tables References menu)

This option compiles a list of references to all fields in all tables, equivalent to performing References to All Fields in Current Table for each table in the database. We will not demonstrate this option.

gINT Software, Inc. www. gintsoftware.com

66

Page 71: Data Design Tutorial 8

USING DATA DESIGN

www. gintsoftware.com 67

References to Current Field (File Menu in User System Data Application)

You can search for references to a particular user system data item by using the References to Current Field option in the File menu in DATA DESIGN User System Data. To demonstrate this feature, do the following:

1. Go to DATA DESIGN User System Data.

2. Select ‘Sample Bottom Depth’ in the object selector.

gINT Software, Inc.

Page 72: Data Design Tutorial 8

USING DATA DESIGN

3. Select File References to Current Field. The REFERENCES TO CURRENT FIELD status log window appears.

4. Notice that the user system data item is used in four or more entities in each of five reports.

5. Click OK to close the window.

References to All Fields (File Menu in User System Data Application)

This option generates a references list window equivalent to running File References to Current Field for all user data items in the library. We will not demonstrate this option.

References to This Lookup (File Menu)

This option enables you to list references to a library table or lookup list from within one or more databases. All table-field combinations in the database that utilize the lookup are listed. The option is available from either the Library Data or Lookup Lists tabs, but not from Library Tables. To demonstrate the option, do the following:

1. Click the Lookup Lists tab. Select ‘USCS’ in the object selector.

gINT Software, Inc. www. gintsoftware.com

68

Page 73: Data Design Tutorial 8

USING DATA DESIGN

2. Select File References to this Lookup. The PROJECT DATABASES dialog box appears.

3. Click the Browse button to the right of the Files list. In the file browser window that appears, select training.gpj in \gINT\projects\ and click Open.

4. Click OK to close the PROJECT DATABASES dialog box. The REFERENCES TO THIS LOOKUP window appears:

5. Notice that the USCS lookup list is used in the USCS fields in the LITHOLOGY and LITHOLOGY SOIL tables. Click OK to close the window.

6. Click the Library Data tab. Select ‘Contractor’ in the object selector.

7. Select File References to this Lookup. Notice that the path to the training.gpj project is still in the Files list.

8. Click OK to close the PROJECT DATABASES window. The REFERENCES TO THIS LOOKUP window appears. Notice that one reference to the library table is listed—in the Contractor field in the POINT table.

gINT Software, Inc. www. gintsoftware.com

69

Page 74: Data Design Tutorial 8

USING DATA DESIGN

9. Click OK to close the REFERENCES TO THIS LOOKUP window.

Miscellaneous Utilities

Replace Field Names (Tools Menu)

This command enables you to search in reports, user data items and library tables for one or more existing field names and replace them with new field names. Since reports and user data items reference fields by name, when you change a field’s name in a database table, you need to ensure that the new name replaces the old in all reports and user data items that use it. The system prompts you to do this when you change a field name in DATA DESIGN, but if you skip this option at the time, you may want to perform the change later using Replace Field Names.

Field names can optionally be replaced in library tables. In most library tables this is unnecessary because they do not contain field names in their data. However, library tables used for formatting component lithology expressions do include database field names, and these need to be updated with new names at the same time reports and user data items are updated.

To demonstrate this feature, do the following:

1. Select the POINT table in the object selector.

2. Notice that there is a field called Plunge in the Fields list.

3. Select Tools Replace Field Names. The REPLACE FIELD NAMES dialog box appears.

gINT Software, Inc. www. gintsoftware.com

70

Page 75: Data Design Tutorial 8

USING DATA DESIGN

4. Click the Browse button to the right of Field List. The Field List dialog box appears.

5. In the Find column, enter ‘POINT.Plunge’.

6. In the Replace With column, enter ‘POINT.Plunge Angle’.

7. Click OK.

8. Click the Browse button to the right of Reports to Scan. Click Mark All, then OK in the Reports to Scan dialog box.

9. Click OK in the REPLACE FIELD NAMES dialog box. The system goes through the replacement process.

10. A status log window appears. It details the number of changes made in reports and user system data items.

gINT Software, Inc. www. gintsoftware.com

71

Page 76: Data Design Tutorial 8

USING DATA DESIGN

In this case, no changes have been made because the field is apparently not used in any reports or data items. If the field was in use in reports or data items, the name would be changed in all instances.

11. Click OK to close the status log window.

Assign Data Template to Reports (Tools Menu)

This command enables you to assign a data template to one or more reports. This is a significantly faster method than opening each report’s properties in REPORT DESIGN to assign a data template. Since the assigned data template is loaded into the Data Tool when you are in REPORT DESIGN or the Library Data or User System Data applications in DATA DESIGN, having an appropriate template assigned will make it possible to use the Data Tool. To demonstrate this feature, do the following:

1. Select Tools Assign Data Template to Reports. The ASSIGN DATA TEMPLATE TO REPORTS dialog box opens.

2. Click the Browse button to the right of Data Template. In the file browser window that appears, browse to simple project.gdt in \gINT\datatmpl\ and click OK.

3. Check the Assign to Data Design:Library Tables and Assign to Data Design:User System Data checkboxes. Notice that we are leaving the Report List field blank in order to select all reports. Click OK.

4. Click the User System Data tab. Notice that the Data Template field at upper left now reads ‘simple project.gdt’. You would see similar results in REPORT DESIGN and Library Data.

5. Return to the Project Database tab.

Last Update Field and Point Sort Field (Tables Menu)

The Last Update Field and Point Sort Field menu options in the Tables menu add or remove the corresponding fields from the Fields list of the current table. When checked in the Tables menu the field is present. A last update field, called ‘GintUpdated’, is assigned the date and time each time the record is updated. A point sort field, called ‘GintPointSort’, can only be added to the POINT table, and enables you to assign sequence numbers to the various borehole records to change their order in output (this also requires that you specify the GintPointSort field in the Sort 1 property for the report in REPORT DESIGN).

To demonstrate these options, do the following:

1. Select the POINT table in the object selector.

2. Select Tables Last Update Field. Notice that GintUpdated appears in the Fields list, and the Last Update Field option is now checked in the Tables menu.

gINT Software, Inc. www. gintsoftware.com

72

Page 77: Data Design Tutorial 8

USING DATA DESIGN

gINT Software, Inc.

3. Select Tables Point Sort Field. Notice that GintPointSort appears in the Fields list, and the Point Sort Field option is now checked in the Tables menu.

4. Go to INPUT Borehole and scroll all the way to the right. Notice that the two new fields are present, but that GintUpdated has a grey background, indicating that it is a read-only field that is updated by the system.

5. Return to DATA DESIGN Project Database, and reopen the current project (training.gpj).

6. Select POINT in the object selector.

7. Select Tables Last Update Field and Tables Point Sort Field to uncheck these options and remove the fields.

8. Click the Save icon.

www. gintsoftware.com 73