Natural Resources Canada | Earth Science Sector | Geological Survey of Canada

GlobalDB System
Release 3.7


GlobalDB System Site Map | Presentation | Requirements | Software and Scripts | Aliases | Using GShell | Using GQuery | Using Documentor

USING GSHELL

This page:

This page is fairly long and is not meant to be read like a novel. We suggest that you start GShell (or GShellBrowser if GShell does not work with your version of Windows) and open a sample database, in order to explore its several screens and controls as you read this page, switching between your browser and GShell/GShellBrowser itself.

ENTERING GSHELL

GShellADO, shortened here to GShell, and GShellBrowser are standalone applications designed especially for entering and editing (GShell) or simply browsing (GShellBrowser) data conforming to the GlobalDB schema. To use GShell or GShellBrowser, the user must have unpacked the GlobalDBSystem321 and Data321 as described in Software and Scripts, and configured at least one database alias as described in Defining database aliases. As it is explained in the presentation of the database schema (see Database description), the deposit group and deposit entities in particular have many detail tables defined. Because not all of them are used in all databases, the user may wish to customize GShell or GShellBrowser to show only the tables he or she plans to use; these preferences are stored in a file called gshell.iii where iii are the initials of the user. When the program is started, the user is asked to enter his/her initials and click the OK button; the corresponding preferences file can then be opened. Only then will the program's main form appear; a database is selected and operations begin. If the user does not enter initials or clicks the Cancel button, the program displays a message and stops. If a new set of initials is entered (first use of GShell or new user), a preferences file is automatically generated, set for all detail tables to be displayed. The user's initials are also stored in the REVWHO field of new and updated records and the REVDATE field is date-stamped for version tracking.

Once the user initials have been processed, the program asks (via a small dialog form) in which mode to start GShell. In the default Browse mode, GShell operates normally, except that data cannot be entered, deleted or changed; the combo boxes are not loaded from the lookup tables; also, many of the buttons and other data entry and edit controls will be greyed out. The Edit mode allows data entry and editing, all necessary combo boxes will be loaded and the screen controls will be active. GShellBrowser only operates in Browse mode, and will be used by most users of this Open File because it will run under Windows 7 and up (32 bit) as well as under older versions of the Windows operating system.

If the current mode of GShell operation is Browse, or if GShellBrowser is being used, this will be indicated at the bottom of the main form after "GShell - 3.7 ADO (3.21 - 2006-08-02)" as "BROWSE MODE ONLY". The only way to change mode if using GShell is to shut down and restart GShell.

Minor glitch: GShell/GShellBrowser main form size: The window that opens when either version of GShell is started may be too short to display the GShell version text along the bottom. There is no fix. You can be assured that for the current Open File this text reads: "GShell - 3.7 ADO (3.21 - 2006-08-02)" or "GShell - 3.7 ADO (3.21 - 2006-08-02) BROWSE MODE ONLY"


Top of page

THE MAIN FORM

Once the user initials are entered and the browse or edit mode selected, the main form appears on the screen. It will occupy all the space at a resolution of 800x600 (with the task bar showing at the bottom of the screen); it will be centered at higher resolutions. The menu has four options: File, Edit or Browse, Tools and Help:

A top panel with seven buttons replicates the options in the Edit or Browse menu, except for Customize Tab pages. When a database is open, its title, compilers, and other relevant information is displayed below the buttons panel.

Top of page

CUSTOMIZING THE TABBED PAGES DISPLAY

The preferences file can be modified by clicking Customize Tab Pages in the Edit orBrowse menu, which will bring up the "Customize Tab Pages" form. On that form, the left list box shows all the available tabbed pages; the right list box shows the tabbed pages currently selected for display. The right list box shows the values of the preferences file when the form is called.

The Clear All button can be used to start with a clean slate. The desired pages are selected from the left box (a range is selected using the Shift key, individual selections are toggled with the Ctrl key) and the Add button moves the selected name(s) to the right box. To use a different order (than the default order), select and add each title one at a time. The Add All button selects and moves all titles. The Up and Down arrow buttons above the right box can be used to move a single selected line up or down. The page selection is done for each of Deposits and Deposit Groups, independently from one another. When the selections are made, press the Save button to write the preferences file and return control to the main form. This operation can be performed at any time during program execution by returning to the main form, and repeating the process.

Warning: the preferences file is a plain text file. Do not attempt to modify it with a text editor or word processor as this may prevent GShell from operating properly. This file is used with all GlobalDB databases on your system. It is user specific, not database specific.


Top of page

SELECTING A DATABASE

Once the main form is showing, the user selects the database he/she wishes to work with. This is done by clicking Select Database in the File menu. A small form will appear, showing the aliases (see Defining database aliases) of the database(s) available to work with. Other aliases may exist for other applications on your system. Only those aliases starting with the string "Global" will show in this selection form.

After connecting with the database, the buttons on the top panel and the entity items under the Edit or Browse menu become active and the user can select an entity, either by clicking on the corresponding button or using the menu bar. The corresponding form module is built in the computer's memory. If in Browse mode, the user is asked if empty tab pages are to be displayed (a tab page would be empty if its underlying table did not have a single data record). If using GQueryBrowser a text box will pop up listing the tab pages which will not be displayed. Then, if in Edit mode, all the relevant combo boxes are populated from their corresponding lookup tables or from actual data; then the form comes up to the screen. On a fast computer, this takes but a few seconds. The main form of GShell is normally centered on the screen. It can be moved but not resized. All other forms come up centered on top of the main form and are modal. This means that only the top form (of GShell or GShellBrowser) is active at any one time; the underlying form can only be used once the top form has been closed. It is not possible to have two or more active module forms simultaneously. The deposit module form (or deposits form) will be used here to illustrate the main features of GShell. In several places in the text, we refer to record selection forms; their use is described in detail in the reference selection page.

Top of page

THE DEPOSITS FORM

For most of the WMGDP mineral deposit databases the Deposit module is the main module for storing information about the deposits themselves, with the exception of the Porphyry database, for which Deposit Group is the main module. When Deposit is selected from the Main form, the Deposit form opens. On the deposits form, several values are displayed against a colored background; these are managed directly by GShell and cannot be modified by the user (with two exceptions, described below). Values for DEPNO, RANK, REVWHO and REVDATE (see Database description) are automatically entered by the program and are not directly accessible; DEPNO and RANK are visible; REVWHO, REVDATE and RELDATE are not shown. The deposits form is divided horizontally in five sections top to bottom: 1) a top panel has a navigation bar, buttons for insertion and deletion of records(do not work in Browse modes), a record selection combo box (a text box with a little downward pointing triangle at the right edge), a Current Links speedbutton and a Close button to get back to the main form, 2) a names panel showing the country name, deposit name(s), group name(s) to which this deposit is linked and buttons to make or break the link between that deposit and a deposit group, 3) a larger panel with fields that make up the master table for the deposit, 4) a series of tabbed pages (the set and order of which is based on the preferences file of the current user), each one corresponding to a detail table for the deposit, and finally 5) a status bar. All this is described below. Please keep in mind that no deposit or deposit groups can be inserted or deleted, linked, or unlinked in Browse mode; only the navigation, deposit selection, the Current Links speed button, and close buttons are active. Limited editing is however possible, although pick lists will notbe loaded.

The top panel

Starting from the left edge, a navigation bar displays deposit records by going to the first, prior, next and last record respectively; post (check mark) can be clicked to commit changes to the main record; cancel (X) can only be used to cancel some changes and is shown mostly for information.

Next is a cluster of four buttons:

To the right of the Insert/Delete/Query/Report buttons is a record selection combo box with five options:

Still going towards the right on the top panel comes the Current Links speedbutton (showing a chain icon). When clicked, it displays the number of master records connected to the current deposit record, along with their primary key values.

Last towards the right on the top panel is the Close button, which closes the deposit form and returns to the main form. All currently open records are saved if they have been modified, and then closed; the deposit form is destroyed and the computer memory it occupied is made available for other uses.

Top of page

The names panel

Immediately below the top panel is the names panel, which displays the country name of the current deposit and NTS area if it has one, its name(s) and the name(s) of deposit groups to which it is linked. The background color of these fields indicates that values cannot be entered or edited on that panel. The values are displayed for information only; these fields can be edited in the form's Tab Pages. To the right are two buttons used to make or break links between deposits and deposit groups. To link a deposit to a deposit group, click the Link button to open a record selection form which shows the name(s) of all deposit groups in the database. A deposit group is selected by double-clicking a name or by selecting a name and then clicking the Select button of the selection form. To break the link between a deposit and a deposit group, click the Unlink button to open a record selection form which shows the name(s) of all deposit groups in the database to which the current deposit is connected. A deposit group is selected by double-clicking a name or by selecting a name and clicking the Select button of the selection form. GShell inserts/deletes records in the dpdg junction table of the database. In order to prevent loss of information, junction tables such as dpdg should never be manipulated directly by the user (using MS-Access).

Top of page

The main table fields

Underneath the top panel and the names panel are two large panels showing respectively the fields of the master deposit table (dpgeol), and a set of tabbed pages, each page corresponding to a detail table. Field DEPNO is shown against a colored background; its value is generated automatically by GShell and cannot be modified by the user. This field is the master key for a given deposit and all data tables related to this deposit are linked through its value, thus its importance. Values for DEPTYPE(S) are displayed for information only; the actual values can be entered/edited in one of the tabbed pages.

On the form are simple edit boxes, combo boxes and check boxes. In edit boxes, data entry and/or editing is done by positioning the cursor in a field and typing. Combo box lists are loaded from lookup tables, or directly with data values before the Deposits form is displayed on the screen (Lookup tables can be loaded and/or edited using the Lookup Tables module from the main form). For fields displayed in combo boxes, a value can be selected by dropping down the list (by clicking on the downward pointing triangle) and clicking on the selected value. Another approach is to start typing the desired value; the next available term in the list that matches what has been type is automatically brought up. If the combo box corresponds to a lookup table and a new value is typed in, GShell issues a message and asks if that new value should be added to the lookup table and combo box list; if the user agrees, the new value is added; otherwise, the cursor points back to the relevant combo box. In combo boxes loaded directly with data values, a new value will simply be added to the combo box list. All combo boxes in GShell (with very few exceptions such as those used by the top level of Host rocks) exhibit this same behavior. In check boxes, simply click the mouse button to change the value between checked and unchecked.

Near the middle of the form are fields for longitude and latitude. By entering the values in the degrees, minutes and seconds fields and tabbing (using the Tab key on the keyboard) from field to field, the value of the decimal degrees of longitude and latitude will automatically be (re)calculated. If the values of longitude and latitude are only available in decimal degrees, they can be entered directly in their respective colored text boxes and tabbing will automatically trigger the calculation of degrees, minutes and seconds. This is the only instance in GShell where data can be entered in colored text boxes in any module. NOTE: if tabbing is not used to move from field to field, the user should click the mouse in any other data field in the longitude or latitude fields BEFORE moving to another deposit record to insure that the calculation is triggered; otherwise, it may be that the degrees, minutes and seconds values for location do not match the decimal degrees values. At the very right of that row of fields, a small combo box shows whether the location was entered to the neareast degree, minute or second. The checkbox indicates whether the location was calculated from the known location of the nearest community. When checked, indicates that the longitude and latitude were calculated from an approximate location and not quoted from a reference or determined using GIS.

Top of page

The tabbed pages

Detail table data can be displayed by selecting the tab corresponding to the desired table. The number of tabbed pages and their order can be controlled by the user, as shown earlier on this page (see Customizing the tabbed pages display). If all tabs are not visible on the screen, the left-right buttons at the right of the tabs will scroll the bottom part of the screen left and right and the tab pages will apear. Clicking on one of these buttons and moving your cursor to the left horizontally may do the same thing.

Tabbed pages show one of seven layout styles, represented by the Names, Country Rocks, Geological Age, References, Alteration Signature, Radiometric Age and General Shape pages:

Field RANK (combined with DEPNO, the deposit number) is used to uniquely identify detail records. In some instances, it is also used to indicate record order of significance. On the status bar at the bottom of the form, the second and third panel indicate if the detail (and possibly sub-detail) table records are ordered or not.

Top of page

The button cluster

The button cluster found on detail and sub-detail pages is made of a navigation bar, a Renumber button, an Up and a Down button. The navigation bar has either 3 or 5 buttons, depending on the context:

If the RANK value of a detail or sub-detail record changes by using the Up, Down or Renumber buttons, and that record is linked to other records (such as References, Radiometric Age or between Metallic Signature and Mineralization Style, etc), the links will automatically be adjusted by GShell. As stated earlier, it is best to leave the management of junction tables and key values to GShell; adjusting those values directly in MS-Access could cause the loss of those linkages.

We have noticed that if a detail record RANK value is changed, that change is shown on the screen but not for the visible sub-detail records. The screen refresh can be made by clicking to another tabbed page, then coming back to the one of interest. This annoyance may be addressed in a future version of GShell.

Top of page

The status bar

The status bar along the bottom of the form is divided in four panels. From left to right:

Top of page

THE DEPOSIT GROUPS FORM

The deposit groups form looks and behaves very much like the deposits form described above, with two exceptions. The first one is on the names panel. Since a deposit group might have many deposits connected to it, it would not be practical to concatenate all these deposit names and try to fit that long string in a short text box. Instead, clicking on the deposits Display button at the extreme right of the panel shows a list of all names of connected deposits. The other buttons are used to link or unlink deposits from the current deposit group. The other exception is that there is no Mineralization Style tab page; the Alteration Signature, Coincident Features and Metallic Signature pages do not have a Mineralization Style data grid as they do in the Deposits form.

Top of page

THE MINES FORM

The mines form behaves like the deposits form described above. The current mine can be linked to deposits (but not to deposit groups, see Database description) and all the names of those deposits as displayed on the names panel. The record selection combo box allows selection by mine name or by deposit name. The mines master table has three detail tables, used for storing information on Owner(s) and Operator(s) and for details about the relationship between the reference and the mine information. The Reference tab page, used for linking a single reference, looks like the deposits Reference page. Several reference detail records can point to that single reference.

Top of page

THE PRODUCTION FORM

The production form follows the same general layout as the deposit form. It has six tab pages: Link to Deposit Groups, Link to Deposits, Link to Mines, Production Grades, Production Weights and Reference. The top panel record selection combo box has options to show all records, go directly to a record whose PRODNO value is known, or select records by name of deposit group, deposit or mine to which the current record is linked. The names panel shows three read-only combo boxes; these are not used to make choices but to display all the names of deposit groups (DG), deposits (DP) or mines (MN) linked to the current record. The combo box type of control was chosen in order to save space on the screen.

The first three tab pages are used to link the current production record to deposit groups, deposits or mines respectively. Clicking on the Link button will bring up a record selection form from which the proper deposit group, deposit or mine entity can be selected. Breaking a link is made by clicking the Unlink button, which displays the list of entities to which the current production or resource record is linked. Select the appropriate record to complete the operation. Within each of three Link to... pages, the navigation bar moves the cursor through the linked entities, and the current key value (for the linked entity indicated by the cursor) is displayed in a read-only colored text box beneath the grid. The next two boxes to the right are used to enter a percentage value and the initials of the person who assigned that value. The percentage value indicates how much of the production figure is allocated to each entity (deposit group, deposit or mine). The sub-total text box displays the sum of the percentage values. Those percentage values are displayed with the names in the names panel combo boxes.

Private companies and authors of the assesment reports used in data sources may be the only parties who actually know for sure how their figures should be allocated to individual entries. For our purposes, it is most essential that the percentages allocated for each figure total 100.0%. Improved accuracy may be attained in future revisions of the data.

The Production Grades and Production Weights pages behave like the Names page of the deposits form. The Reference page, used for linking a single reference, is like the deposits Reference page. Each production record is normally built from a single reference, and information about the relationship between the reference and record, such as page number, can be entered in the reference sub-detail table.

It is advisable to link the production record only to the most specific entity to which it applies, ideally a mine. However, production figures are seldom presented mine-by-mine; they are often presented as lump figures for one or more deposits, or even a deposit group plus some unrelated deposits.

Top of page

THE RESOURCE FORM

The resource form looks and feels very much like the Production form described above. In its main record area, it has two Link/Unlink buttons; in the lower part, the form has seven tab pages: Link to Deposit Groups, Link to Deposits, Link to Mines, Resource Grades, Resource Cutoff Grades, Resource Weights and Reference. These tab pages work like those of the Production form.

A resource record may be entered to describe a concentrated pocket of mineralization within another one. This is defined as a resource within a resource. These resource records can be linked to one another by clicking the CONTAINED Link button, which brings up a form from which a resource record can be selected; the check box (read-only) will be checked accordingly. The link can be removed by clicking the CONTAINED Unlink button.

A new resource record may be entered to describe a mineralized zone adjacent to another one. This is defined as a resource added to a resource. These resource records can be linked to one another by clicking the ADDED TO Link button, which brings up a form from which a resource record can be selected; the check box (read-only) will be checked accordingly. The link can be removed by clicking the ADDED TO Unlink button.

As with production records, it is advisable to link resource records to the most specific targets/entities possible. Other associations used in queries and filters can be obtained from the mine-deposit and deposit-deposit group junction tables.

Top of page

THE REFERENCES FORM

On its top panel, the references form shows the same "tools" as the other forms described above. The record selection combo box has three options: All references, Go to REFNO to display a reference record whose number is known and Find by title or first author which calls the reference selection form. The next panel contains the main fields of data for a reference: the publication date, title and source type (SRCTP). Field SRCTP (which is read-only but displays the current value from the database) can have one of eight values; it indicates what type of reference is recorded, such as a journal article, a map or a digital file. Each will have a different selection of additional descriptive fields relevant to its citation. The PREVIEW combo box is used to specify what kind of reference is being coded; the bottom panel of the form reflects that choice by showing the relevant fields. In the middle of the screen, on the left is a rarely used group of checkboxes that indicates what broad category of data, at the module level in the database schema, is found in the reference. On the right is the list of authors, with the field RANK indicating author order.

Top of page

THE LOOKUP TABLES FORM

On the lookup tables form, compilers can enter or edit the lists of values that will fill the combo boxes on the forms described above. Some of the lookup tables are read-only but can still be displayed. The upper grid is the list of lookup tables and their current description (see Using Documentor) and is read-only; the bottom grid shows the current content of the lookup table pointed to in the upper grid field by field. The navigation bars are used to navigate in the tables; on the bottom of the form, the navigation bar is also used to insert and delete records in the lookup table, as long as it is not read-only.

Top of page

GlobalDB System Site Map | Presentation | Requirements | Software and Scripts | Aliases | Using GShell | Using GQuery | Using Documentor


Important notices and disclaimers 2014-09-26