Projects
The concept of a project is fundamental to the Micromine Geobank database. The GB_PROJECT table is at the top of an extensive hierarchy which branches down into all of the Micromine Geobank subsystems. Consequently, the project code forms part of the primary identifier of just about every row in the Micromine Geobank database.
Project Table
The project table itself is fairly simple; requiring only a project code, description and preferred coordinate system as the minimum data content.
The COORDSYS column is very important. This column is used to nominate the preferred coordinate system for a project. When Micromine Geobank needs to display data in plan view, it will always convert incoming data to the preferred coordinate system for the current project.
Default Project
In some cases it may be useful to link to a default project, and the GB_SYS_USER_PROJ table is used for this purpose. Micromine Geobank seldom uses this table directly; however, it can be referenced by SQL queries to drive exports, reports, data views, etc. Typically these queries would include a section in the WHERE clause to retrieve the default project for the current user, as demonstrated by the following example:
WHERE PROJECT = (SELECT PROJECT FROM GB_SYS_USER_PROJ
WHERE USER_ID = (SELECT USER FROM DUAL))
Entities
In Micromine Geobank, the abstract term “entity” is used to refer to anything that could be linked to a project. This could be a lease boundary, a pit boundary, a financial report, company details, rehabilitation photographs, etc. Entities can be linked to more than one project. Entity attributes are stored in normalised form, making it possible to store any type of data you may deem necessary against each entity. The definition of attribute types and attribute codes is left entirely up to you.
Geographical Extents
Almost every activity in exploration and mining is linked directly or indirectly to spatial attributes, whether it be a lease boundary, a pit outline or an underground development layout. Very often these outlines tend to change over time.
In the Micromine Geobank database, an entity may be linked to a boundary, which in turn references a set of boundary points. It is possible to store more than one instance of the same boundary in order to record changes in shape over time.
Note that all boundary points are stored in GB_POINT, and that the same point may be shared between several boundaries (or different instances of the same boundary). This means that a change in the coordinates of a point in the GB_POINT table will automatically change the shape of any boundary that uses that point.
The GB_BOUNDARY table has a RANKING column which can be used to identify the current or preferred boundary for a given entity. The easiest way to manage the ranking is to always assign a value of 1 to the preferred instance, and setting the others to (say) 2. It is not necessary to have sequential numbers in the ranking column.
The Boundary Coordinates View
There are no fixed rules governing the way the boundary data should be stored in your database. Whenever Micromine Geobank needs to access boundary coordinates (e.g. in the Drillholes Plan View), it will do so via a view named GB_VIEW_BOUNDARY_COORDS. This is a view that returns the preferred boundary coordinates of all relevant entities in the database, on a project by project basis.
In the case of the standard Micromine Geobank database, the syntax for the view would be as follows:
CREATE VIEW GB_VIEW_BOUNDARY_COORDS AS
SELECT
PE.PROJECT,
PE.ENTITY,
BD.PEN_COLOUR,
BP.POINT_ORDER,
PT.POINT_NUMBER,
PT.COORDSYS,
PT.NORTHING,
PT.EASTING,
PT.HEIGHT
FROM
DBO.GB_PROJECT_ENTITY AS PE,
DBO.GB_BOUNDARY AS BD,
DBO.GB_BOUNDARY_POINT AS BP,
DBO.GB_POINT AS PT
WHERE
PT.POINT_NUMBER=BP.POINT_NUMBER AND BD.ENTITY=PE.ENTITY AND
BP.ENTITY=BD.ENTITY AND BD.RANKING=1 AND BP.INSTANCE=BD.INSTANCE
Micromine Geobank uses the SELECT * syntax when accessing this view; therefore the view must return the standard column names as listed above, either directly or as aliases. Table mapping and column mappings for the view are supported; however, the column mappings will only be applied to the WHERE clause.
When accessing the view, Micromine Geobank will order the results by PROJECT, ENTITY and POINT_ORDER. If necessary, it will automatically repeat the first point to “close” the boundary.