Instructions on how to map to the M4EU database from your

advertisement
1
Mapping guide to M4EU database from your
own dataset – Draft Contents
Introduction ..............................................................................................................................................................2
4 levels of filling the M4EU database .......................................................................................................................2
1.
Inspire V3.0 Mineral Resources core (Mandatory) ......................................................................................3
MineralOccurrence ...............................................................................................................................................4
MiningActivity.......................................................................................................................................................4
OreMeasure..........................................................................................................................................................4
DocumentCitation ................................................................................................................................................5
2.
Inspire Area Management V3.0 ....................................................................................................................6
3.
Inspire extension (V2.0) + EarthResourceML V2.0 compliant (Voluntary)...................................................8
4.
Minerals4EU extensions ............................................................................................................................ 10
Codelists ................................................................................................................................................................ 11
Inserting Inspire Ids and Lifecycle information ..................................................................................................... 13
Inserting Geometries: ............................................................................................................................................ 14
Reasons for missing values - Unknown, Unpopulated, Withheld ......................................................................... 14
Appendix I: Inspire Core Tables and Attributes ..................................................................................................... 16
Appendix 2: Example SQL ..................................................................................................................................... 22
Revision History
Author
geus/tch
Geus/tch
To do list
Date
17-11-2014
19-11-2014
Comments
Initial writing
Added Database model
diagrams for the 4 levels of
mapping in the database
(suggestion by ata/brgm)
2
What
Geochemical analyses (EURARE)
Inspire Area management
Comments
Currently left out
More comments on what this type
of data is
Date added
18-11-2014
18-11-2104
Introduction
The purpose of this document is to make it easier for participants in the Minerals4EU and EURare projects to
map their own data to their own M4EU database. The M4EU data model is mapped to the Inspire Mineral
resources application schemas and is be used to create INSPIRE compliant web services. It also contains most
attributes (columns) that are also found in EarthResourceML V2.0 (ERML) an international standard for data
exchange related to mineral resources. These application schemas created certain requirements for the
database model and mapping. In addition the Deegree3 framework added some more requirements as to how
database tables are mapped to xml. These requirements are dealt with in the following chapters. The Diagrams
mentioned in the text can be found at http://minerals4eu.eu/?? or in the enterprise architect file
http://data.geus.dk/svn/m4eu/08%20Enterprise%20Architect%20model/trunk/EA%20M4EU%20v0.6x/Mineral
s4EU%20databasemodel%20v0.6.1.eap . In addition, the database itself contains comments for each column
and tables that are not codelist tables and columns.
This document is written for users with some background in relational databases. Concepts such as primary
and foreign key constraints and their consequences are not explained in detail. I tried to keep phrasing as
simple as possible and only use Table, Column, Code List Table words and phrases, focusing on explaining the
meaning of tables and attributes and their relations. Words such as Mineral or MineralOccurrence refer to
Table names.
4 levels of filling the M4EU database
Here we describe which tables are mandatory and which can voluntarily be filled with data (in the case that a
survey possesses these types of data). In additions, the tables that are considered important are briefly
described together with in which order to start inserting data into them. Note that a column name ’ xxx’, in
most cases is linked to a specific code list table with naming convention ‘xxxType’. This constrains which
values can be placed in the database for most column names.
3
1. Inspire V3.0 Mineral Resources core (Mandatory)
Data providers need to map their own data to the following tables so that the system can generate an INSPIRE
compliant WFS for mineral resources core. All table columns are further listed in in Appendix I. Mapping to
these tables should be considered a first approach.
Diagram
MineralOccurrence
Table
MineralOccurrence
OccurrenceForm
OccurenceShape
LinearOrientation
PlanarOrientation
DocumentCitation
ExplorationActivity
ExplorationResult
GeologicEvent
Type
Feature
DataType
DataType
DataType
DataType
Feature
Feature
DataType
Feature
MiningActivity
MiningActivity
MiningFeatureOccurrence
Mine
MineName
Feature
Feature
Feature
DataType
4
OreMeasure
OreMeasure
Reserve
Resource
Endowment
CommodityMeasure
Commodity
DataType
DataType
DataType
DataType
DataType
Feature
MineralOccurrence
The Mineraloccurrence table contains information related to mineral resources including type, geometry,
name etc. It is linked to tables that contain information about size, form, shape, planar and linear orientations,
related documents, exploration history and geologic history. All of these can contain multiple entries for a
single occurrence. Links to commodities and ore measures are described in more detail in the Ore Measure
Theme.
All the tables listed above that are linked to a mineralOccurrence can be filled independent of other tables.
ExplorationActivity also needs at least 1 ExplorationResult.
MiningActivity
The MiningActivity table has information related to processing of ore in a mine for a particular period of time.
It has relations with the Mine table and MineralOccurrence table. The Mine table includes information related
to a mine from which a particular mineral occurrence is mined i.e. duration of the mine’s existence, status and
possible related mines. It also links to DocumentCitation in which links to mining related documents can be
stored. MiningFeatureOccurrence holds information about geometries of MiningActivity.
To create a row in the MiningActivity table it is first necessary to create a row in the MiningFeatureOccurrence
table, which holds the geometry of a particular Mine or MiningActivity, and then add the correct
miningFeatureOccurrenceDbk in the MiningActivity table. Otherwise the row cannot be saved. The same is the
case for adding a row to the Mine table. It is necessary to create a new row in MiningFeatureOccurrence for
each Mine and MiningActivity. This mechanism is also used for MiningWaste (see section 3 of this chapter)
OreMeasure
The OreMeasure table has information on the classification method, calculated quantities of ore and the
dimensions of the ore body that were used in the calculation. It is linked to the Reserve, Resource and
Endowment tables, which contain columns linked to code lists for categorizing each measure together with
includesReserves and includesResources Boolean columns. Specific information on grade, cut-off grade and
commodity amount can be specified in the CommodityMeasure table, which links the Commodity and
OreMeasure Tables.
5
To add data on resources and reserves, one needs to have inserted a mineral occurrence row first. Then one
needs to link it in the Oremeasure table and use the oreMeasureDbk to link to a reserve or resource. For each
reserve or resource or Endowment row we need to add a new row in the OreMeasure Table. To add a
CommodityMeasure to the database a Commodity needs to have been created for the MineralOccurrence and
an OreMeasure. One then simply links them using the oreMeasureDbk and commodityDbk in the
CommodityMeasure table.
DocumentCitation
DocumentCitation contains bibliographic reference information to documents related to MineralOccurrences,
OreMeasures, and Mines.
A document citation is always related to exactly one other row in the MineralOccurrence, Mine, OreMeasure
tables.
6
2. Inspire Area Management V3.0
Data providers that have this type of data need to map their data to these tables so that the system can
generate an INSPIRE compliant WFS for area management. However, in many countries other institutions than
Geologic surveys have this data. In this case it is not necessary to map your data to this theme.
Diagram
AreaManagement
Table
AreaMamagement
EnvironmentalDomain
LegistlationCitation
ThematicId
ManagementZoneName
DocumentCitation
Type
Feature
dataType
dataType
dataType
dataType
dataType
7
The ManagementZone table deals with management of how a zone is used, for example where licenses are
given to companies or where certain regulations are in place. … Add more info here
8
3. Inspire extension (V2.0) + EarthResourceML V2.0 compliant (Voluntary)
9
Data providers can voluntarily put data in the following tables so that the WFS can create more features that
are in the Inspire extension V2.0 model and in the EarthResourceML V2.0 standard. The current system only
creates a mapping to the INSPIRE application schemas, not to EarthResourceML!
Diagram
MineralOccurrence
Table
SuperGeneProcesses
EarthResourceMaterial
Type
dataType
dataType
MiningActivity
MinedMaterial
Product
MiningWaste
WasteStorage
EnvironmentalImpact
dataType
FeatureType
FeatureType
dataType
dataType
OreMeasure
UNFC
dataType
EarthMaterial

EarthMaterial
Mineral
RockMaterial
AlterationDescription
ConstituentPart
AlterationDistribution
RockMaterialLithology
Features that are defined in M4EU as features, not in INSPIRE.
dataType
FeatureType*
dataType
dataType
dataType
dataType
dataType
SuperGeneProcesses is linked to MineralOccurrence and contains information about any surficial alteration
events that have changed the material of the mineraloccurrence.
MinedMaterial is related to MiningActivity and contains information about the type of material that was
mined and its proportion.
Product is a related to MiningActivity and includes information about the type, the grade, the recovery and the
quantity of the product that has been produced. It also links to the Commodity Table.
MiningWaste is a table related to MiningActivity and includes information about the storage, the material, the
waste type and environmental impact of the waste creation, but also geometry, and inspire ID.
Mineral holds information about the minerals using the IMA mineral list. The Mineral table can be linked to the
EarthMaterial table, which links to EarthResourceMaterial (the Material that a MineralOccurrence consists of),
MiningWaste, MinedMaterial, SupergeneProcesses and AlterationDescription tables.
RockMaterial is also linked to EarthMaterial, thus providing the same links as in the case of Minerals.
RockMaterial also contains information about genetic processes, consolidation, and AlterationDescriptions.
10
4. Minerals4EU extensions
Diagram
MineralOccurrence
Table
OccurrenceRemark
OccurrenceName
Type
dataType
dataType
11
MiningActivity
MineralProducingCountry
MineRemark
Feature
DataType
OreMeasure
MineralProducingCountry
Feature
AreaManagement
OccurrenceManagementZone
dataType
Specimen Measurement (EURare)
Specimen
Measurement
AnalyticalPRocess
Feature
Feature
Feature
MineRemark and OccurrenceRemark tables were added to the model. These tables link to the Mine and
MineralOccurrence Tables. This gives data providers the opportunity to provide additional information on the
mineral occurrence or mine that cannot be listed in the other tables and columns. In addition multiple names
can be specified in the OccurrenceName table for a mineral occurrence, where INSPIRE only has one name
option.
The MineralProducingCountry table is for when a data provider is only able to provide country level
information mineral resources, such as ore measures, but not detailed information about each mineral
occurrence for which ore is produced. In such cases, information about mineral occurrences should still be
provided as far as they are not confidential. Where detailed information is confidential it is possible to write
“Witheld” for example in the OreMeasureVoidReason column of the MineralOccurrence Table and provide
country level values for OreMeasure with a relationship to MineralProducingCountry (see section on missing
values below). The latter is not mandatory to be compliant with inspire.
The OccurrenceManagementZone table was added to the model to allow linking AreaManagement to
MineralOccurrences. Such direct links can be advantageous for processing of the data. However an implicit link
can be provided by comparing the geometries.
Codelists
Of the 112 tables, 58 are codelists with predefined values. There are 8 codelists which are a part of the
Geochemistry addition, for which values have not yet been accepted. Furthermore, there are several codelists
where no values have been specified (yet). All codelist tables should be left untouched until the project accepts
additions or changes of codelist values. The following table lists the code list tables for which values are
present and describes in which level of the database they are used
Codelist Tables
ClassificationMethodUsedType
CommodityType
Used in mapping Level
1
1
12
ConventionType
DepositGroupType
DepositTypeType
DeterminationMethodType
EndusePotentialType
EventEnvironmentType
EventProcessType
ExplorationActivityTypeType
ExplorationResultType
ExpressionType
ExtractionMethodType
FormType
ImportanceType
LinearDirectedType
MineStatusType
MiningActivityTypeType
NamedAgeType
OccurrenceTypeType
PlanarPolarityType
ProcessingActivityTypeType
ReserveCategoryType
ResourceCategoryType
ShapeType
UomAreaType
UomDensityType
UomLengthType
UomWeightType
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
EnvironmentalDomainType
LegislationLevelType
SpecialisedZoneTypeType
ZoneTypeType
2
2
2
2
GeneticCategoryType
AlterationDegreeType
AlterationDistributionType
AlterationTypeType
AssociationTypeType
CompositionCategoryType
ConsolidationDegreeType
3
3
3
3
3
3
3
13
ConstituentPart
ConstituentPartRoleType
EnvironmentalImpactType
LithologyType
MaterialRoleType
MineralNameType
PhysicalPropertyType
ProductType
RawMaterialRoleType
RockMaterialLithology
SupergeneProcessesTypeType
UNFCType
UomPhysicalPropertyType
UomVolumeType
WasteStorageTypeType
WasteTypeType
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
3
CountryType
4
VoidReasonType
1,2,3
Inserting Inspire Ids and Lifecycle information
An external identifier is present for all Inspire Features. The tables that are mapped to these features contain 3
columns to generate an identifier that can be used to create url’s on the web.
It consists of:
1. a namespace (Inspirens), for example ‘DK.GEUS’ in the case of Geus’s data. This namespace will be
registered with inspire.
2. A localid (InspireId), for example a uuid generated by the following function:
select uuid_generate_v5(uuid_ns_dns(),'text');
3. A versionId. The version id is not a part of the unique identifier, but can be used to track different
versions of the particular object that exists (fx a mine or a mineral occurrence).
The namespace together with the localid should produce a unique value.
If there is life-cycle information about the object (beginLifespanVersion, endLifespanVersion), the version
identifier is used to distinguish between the different versions of a spatial object. Within the set of all versions
of a spatial object, the version identifier is unique. The version ID is void, if the spatial data set does not
14
distinguish between different versions of the spatial object. It is missing, if the spatial object type does not
support any life-cycle information.
Inserting Geometries:
The Postgis extension of the Postgres database deals with geometries: One can use the following functions to
add for example point geometries to the database:
st_geometryfromtext ('point (5 6)', 4258). Note we use SRID 4258 as the coordinate reference system.
The following tables have geometry columns: MineralOccurrence, MiningFeatureOccurrence,
ManagementZone, MineralProducingCountry and Specimen.
Reasons for missing values - Unknown, Unpopulated, Withheld
The inspire documentation specifies that for certain columns, where no value can be specified even though one
may be possible, a reason should be given. There are 3 categories: “Unknown”, “Unpopulated” and
“Withheld”.
“Unknown” means that the correct value for the specific spatial object is not known to, and not computable by
the data provider. However, a correct value may exist.
“Unpopulated” means that the property is not part of the dataset maintained by the data provider. However,
the characteristic may exist in the real world.
“Withheld” means that the characteristic may exist, but is confidential and is not divulged by the data provider.
(See description test in the “VoidReasonType” codelist.
Table columns with the following naming scheme xxxVoidReason” occur many places in the data model. They
are initialized without a value, but they are linked to the VoidReasonType codelist, which contains the 3 codes
as shown above.
Examples of columns in the MineralOccurrence table with Voidable column names associated to them:
Table name
MineralOccurrence
MineralOccurrence
MineralOccurrence
Column name(s)
depositType
minlength / maxLength
inspireVersionId
Voidable Column name
depositTypeVoidReason
lengthVoidReason
inspireVersionIdVoidReason
1. If no depositType can be given in the M4EU database one should give a voidReason.
2. “lengthVoidReason” refers to both “minLength” and “maxLength” columns, i.e. when it is not possible
to specify a minimum value, it is not possible to specify a maximum value either. If just one value for
length is known minLength=maxLength
15
3.
“InspireVersionIdVoidReason” if no versionId can be specified, because your database does not hold
information about versions of the Feature, then no BeginLifeCycle and EndLifeCycle data need to be
defined as well.
The same holds for classificationVoidReason, which should contain a voidReasonCode when depositGroup and
depositType are not given.
Relations or associations to other tables can also be voidable. The following table has some examples:
Table name
MineralOccurrence
MineralOccurrence
MineralOccurrence
Linked Table name(s)
MiningActivity
OreMEasure
OccurrenceShape
Voidable Column name
miningActivityVoidReason
oreMeasureVoidReason
shapeVoidReason
For these relations where multiple values are linked to a single MineralOccurence row. There are 3 cases to
consider:
1. No value for MiningActivity exists for a single MineralOccurrence row –> No rows in MiningActivity
that corresponed to this Mineraloccurrence need to be given. We also do not need to specify a
miningActivityVoidReason.
2. There are VoidReasons for MiningActivity for a particular MineralOccurrence –> This means that no
Rows in the MiningActivity table need to be given and we place the voidreason in the
MineralOccurrence table column miningActivityVoidReason.
3. A Row exists in MiningActivity. This means that it should just be filled in and a null value can be placed
in the miningActivityVoidReason column.
If multiple MiningActivity rows exist in the Provider’s own database but they are confidential, the value
“Withheld” needs to be specified only once in the “miningActivityVoidReason” column.
16
Appendix I: Inspire Core Tables and Attributes
Tables and Attributes that are within the Inspire Core part of the database. In this case either a value should be
filled in for a specific column or the accompanying VoidReason column should have a value.
Table Name
Commodity
Commodity
Commodity
Commodity
Commodity
Commodity
Commodity
Column name
commodityDbk
mineralOccurrenceDbk
commodity
importance
importanceVoidReason
rank
rankVoidReason
Data Type
bigserial
bigint
varchar
varchar
varchar
integer
varchar
CommodityMeasure
CommodityMeasure
CommodityMeasure
CommodityMeasure
CommodityMeasure
CommodityMeasure
CommodityMeasure
CommodityMeasure
CommodityMeasure
CommodityMeasure
CommodityMeasure
commodityMeasureDbk
oreMeasureDbk
commodityDbk
minAmount
maxAmount
uomAmount
amountVoidReason
cutOffGrade
cutOffGradeVoidReason
grade
gradeVoidReason
bigserial
bigint
bigint
real
real
varchar
varchar
real
varchar
real
varchar
DocumentCitation
DocumentCitation
DocumentCitation
DocumentCitation
DocumentCitation
DocumentCitation
DocumentCitation
DocumentCitation
DocumentCitation
documentCitationDbk
mineralOccurrenceDbk
oreMeasureDbk
mineDbk
managementZoneDbk
name
shortName
shortNameVoidReason
date
DocumentCitation
DocumentCitation
dateVoidReason
link
bigserial
bigint
bigint
bigint
bigint
varchar
varchar
varchar
timestam
p
varchar
varchar
Length
PK
PK
50
50
50
0
50
Not NULL
YES
NO
YES
NO
NO
NO
NO
PK
0
53
53
50
50
53
50
53
50
YES
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
YES
NO
NO
NO
NO
YES
NO
NO
NO
PK
255
50
10
50
256
NO
NO
17
DocumentCitation
DocumentCitation
DocumentCitation
linkVoidReason
specificReference
specificReferenceVoidReason
varchar
varchar
varchar
Endowment
Endowment
Endowment
Endowment
Endowment
Endowment
endowmentDbk
oreMeasureDbk
includesReserves
includesReservesVoidReason
includesResources
includesResourcesVoidReason
bigserial
bigint
boolean
varchar
boolean
varchar
EndusePotential
EndusePotential
EndusePotential
endusePotentialDbk
mineralOccurrenceDbk
endusePotential
bigserial
bigint
varchar
EnvironmentalDomain
EnvironmentalDomain
environmentalDomainDbk
managementZoneDbk
ExplorationActivity
ExplorationActivity
ExplorationActivity
explorationActivityDbk
mineralOccurrenceDbk
beginTime
ExplorationActivity
endTime
ExplorationActivity
50
255
50
NO
NO
NO
PK
50
YES
YES
NO
NO
NO
NO
PK
0
50
YES
YES
YES
bigserial
bigint
YES
YES
PK
PK
0
0
YES
YES
NO
0
NO
activityType
bigserial
bigint
timestam
p
timestam
p
varchar
50
YES
GeologicEvent
GeologicEvent
GeologicEvent
GeologicEvent
GeologicEvent
GeologicEvent
GeologicEvent
GeologicEvent
GeologicEvent
GeologicEvent
GeologicEvent
GeologicEvent
geologicEventDbk
mineralOccurrenceDbk
name
nameVoidReason
eventEnvironment
eventEnvironmentVoidReason
eventProcess
eventProcessVoidReason
olderNamedAge
olderNamedAgeVoidReason
youngerNamedAge
youngerNamedAgeVoidReason
bigserial
bigint
varchar
varchar
varchar
varchar
varchar
varchar
varchar
varchar
varchar
varchar
PK
0
50
50
50
50
50
50
50
50
50
50
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
LinearOrientation
linearOrientationDbk
bigserial
YES
PK
50
18
LinearOrientation
LinearOrientation
LinearOrientation
LinearOrientation
LinearOrientation
LinearOrientation
LinearOrientation
LinearOrientation
LinearOrientation
LinearOrientation
mineralOccurrenceDbk
determinationMethod
descriptiveOrientation
descriptiveOrientationVoidReason
plunge
plungeVoidReason
trend
trendVoidReason
directed
directedVoidReason
bigint
varchar
varchar
varchar
real
varchar
real
varchar
varchar
varchar
Mine
Mine
Mine
mineDbk
miningFeatureOccurrenceDbk
beginLifespanVersion
Mine
Mine
beginLifespanVersionVoidReason
endLifespanVersion
Mine
Mine
Mine
Mine
endLifespanVersionVoidReason
name
status
startDate
Mine
Mine
startDateVoidReason
endDate
Mine
Mine
Mine
Mine
endDateVoidReason
sourceReferenceVoidReason
relatedMineDbk
relatedMineVoidReason
bigserial
bigint
timestam
p
varchar
timestam
p
varchar
varchar
varchar
timestam
p
varchar
timestam
p
varchar
varchar
bigint
varchar
MineName
MineName
MineName
mineNameDbk
mineDbk
name
bigserial
bigint
varchar
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
mineralOccurrenceDbk
inspireId
inspireNs
inspireVersionId
inspireVersionIdVoidReason
beginLifespanVersion
bigserial
varchar
varchar
varchar
varchar
timestam
50
50
50
53
50
53
50
50
50
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
0
YES
YES
NO
50
0
NO
NO
50
50
50
0
NO
YES
YES
NO
50
0
NO
NO
50
50
50
NO
NO
NO
NO
PK
0
50
YES
YES
YES
PK
50
50
50
50
0
YES
YES
YES
NO
NO
NO
PK
19
MineralOccurrence
MineralOccurrence
beginLifespanVersionVoidReason
endLifespanVersion
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
MineralOccurrence
endLifespanVersionVoidReason
name
nameVoidReason
dimensionVoidReason
minArea
maxArea
areaVoidReason
uomArea
minDepth
maxDepth
uomDepth
depthVoidReason
minLength
maxLength
uomLength
lengthVoidReason
minWidth
maxWidth
uomWidth
widthVoidReason
expression
expressionVoidReason
classificationVoidReason
depositGroup
depositType
depositTypeVoidReason
occurrenceType
geometry
geologicHistoryVoidReason
formVoidReason
linearOrientationVoidReason
planarOrientationVoidReason
shapeVoidReason
sourceReferenceVoidReason
explorationHistoryVoidReason
resourceExtractionVoidReason
p
varchar
timestam
p
varchar
varchar
varchar
varchar
real
real
varchar
varchar
real
real
varchar
varchar
real
real
varchar
varchar
real
real
varchar
varchar
varchar
varchar
varchar
varchar
varchar
varchar
varchar
geometry
varchar
varchar
varchar
varchar
varchar
varchar
varchar
varchar
50
0
NO
NO
50
50
50
50
53
53
50
50
53
53
50
50
53
53
50
50
53
53
50
50
50
50
50
50
50
50
50
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
YES
YES
NO
NO
NO
NO
NO
NO
NO
NO
50
50
50
50
50
50
50
50
20
MineralOccurrence
MineralOccurrence
oreAmountVoidReason
endusePotentialVoidReason
varchar
varchar
50
50
MiningActivity
MiningActivity
MiningActivity
MiningActivity
MiningActivity
miningActivityDbk
miningFeatureOccurrenceDbk
mineDbk
mineralOccurrenceDbk
beginTime
MiningActivity
endTime
MiningActivity
MiningActivity
MiningActivity
MiningActivity
MiningActivity
MiningActivity
MiningActivity
miningActivityType
processingActivityType
oreProcessed
uom
oreProcessedVoidReason
associatedMineVoidReason
depositVoidReason
bigserial
bigint
bigint
bigint
timestam
p
timestam
p
varchar
varchar
real
varchar
varchar
varchar
varchar
MiningFeatureOccurrenc
e
MiningFeatureOccurrenc
e
MiningFeatureOccurrenc
e
MiningFeatureOccurrenc
e
MiningFeatureOccurrenc
e
MiningFeatureOccurrenc
e
miningFeatureOccurrenceDbk
bigserial
YES
geometry
geometry
YES
inspireId
varchar
50
YES
inspireNs
varchar
50
YES
inspireVersionId
varchar
50
NO
inspireVersionIdVoidReason
varchar
50
NO
OccurrenceForm
OccurrenceForm
OccurrenceForm
occurrenceFormDbk
mineralOccurrenceDbk
form
bigserial
bigint
varchar
PK
0
50
YES
YES
YES
OccurrenceShape
OccurrenceShape
OccurrenceShape
occurrenceShapeDbk
mineralOccurrenceDbk
shape
bigserial
bigint
varchar
PK
50
YES
YES
NO
OreMeasure
oreMeasureDbk
bigserial
YES
PK
0
0
NO
NO
YES
YES
NO
NO
YES
PK
YES
50
50
53
50
50
50
50
YES
YES
NO
NO
NO
NO
NO
PK
21
OreMeasure
OreMeasure
OreMeasure
OreMeasure
mineralOccurrenceDbk
mineralProducingCountryDbk
classificationMethodUsed
calculationDate
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
OreMeasure
minQuantity
maxQuantity
uomQuantity
dimensionVoidReason
minArea
maxArea
uomArea
areaVoidReason
minDepth
maxDepth
uomDepth
depthVoidReason
minLength
maxLength
uomLength
lengthVoidReason
minWidth
maxWidth
uomWidth
widthVoidReason
proposedExtractionMethod
proposedExtractionMethodVoidReaso
n
PlanarOrientation
PlanarOrientation
PlanarOrientation
PlanarOrientation
PlanarOrientation
PlanarOrientation
PlanarOrientation
PlanarOrientation
PlanarOrientation
PlanarOrientation
PlanarOrientation
planarOrientationDbk
mineralOccurrenceDbk
determinationMethod
descriptiveOrientation
descriptiveOrientationVoidReason
convention
azimuth
azimuthVoidReason
dip
dipVoidReason
polarity
bigint
bigint
varchar
timestam
p
real
real
varchar
varchar
real
real
varchar
varchar
real
real
varchar
varchar
real
real
varchar
varchar
real
real
varchar
varchar
varchar
varchar
bigserial
bigint
varchar
varchar
varchar
varchar
real
varchar
real
varchar
varchar
0
0
50
NO
NO
YES
NO
53
53
50
50
53
53
50
50
53
53
50
50
53
53
50
50
53
53
50
50
50
50
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
NO
50
50
50
50
53
50
53
50
50
YES
YES
YES
NO
NO
YES
NO
NO
NO
NO
NO
PK
22
PlanarOrientation
polarityVoidReason
varchar
Reserve
Reserve
Reserve
reserveDbk
oreMeasureDbk
category
bigserial
bigint
varchar
Resource
Resource
Resource
Resource
Resource
resourceDbk
oreMeasureDbk
category
includesReserves
includesReservesVoidReason
bigserial
bigint
varchar
boolean
varchar
Appendix 2: Example SQL
INSERT INTO mineraloccurrence (mineraloccurrencedbk,
inspireid,
inspirens,
inspireversionid,
inspireversionidvoidreason,
beginlifespanversion,
beginlifespanversionvoidreason,
endlifespanversion,
endlifespanversionvoidreason,
name,
namevoidreason,
dimensionvoidreason,
minarea,
maxarea,
uomarea,
areavoidreason,
mindepth,
maxdepth,
uomdepth,
depthvoidreason,
minlength,
maxlength,
uomlength,
lengthvoidreason,
minwidth,
maxwidth,
uomwidth,
widthvoidreason,
expression,
expressionvoidreason,
classificationvoidreason,
50
NO
PK
50
YES
YES
YES
YES
YES
YES
NO
NO
PK
50
50
23
depositgroup,
deposittype,
deposittypevoidreason,
occurrencetype,
associationtype,
country,
geologichistoryvoidreason,
formvoidreason,
linearorientationvoidreason,
planarorientationvoidreason,
shapevoidreason,
sourcereferencevoidreason,
explorationhistoryvoidreason,
resourceextractionvoidreason,
oreamountvoidreason,
endusepotentialvoidreason,
geneticdescriptionvoidreason,
compositionvoidreason,
geometry)
VALUES (1,
'1',
'M4EU.TEST',
'1',
NULL,
'2013-06-01 00:00:00',
NULL,
'2014-06-01 00:00:00',
NULL,
'test_with_unknown_for_all_fk_constraints',
NULL,
NULL,
1,
2,
'm2',
NULL,
1,
2,
'm',
NULL,
1,
2,
'm',
NULL,
1,
2,
'm',
NULL,
'botanical-anomaly',
NULL,
'unknown',
NULL,
24
NULL,
NULL,
'deposit',
NULL,
'DK',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'0101000020A2100000000000000000F03F0000000000000040');
INSERT INTO mineraloccurrence (mineraloccurrencedbk,
inspireid,
inspirens,
inspireversionid,
inspireversionidvoidreason,
beginlifespanversion,
beginlifespanversionvoidreason,
endlifespanversion,
endlifespanversionvoidreason,
name,
namevoidreason,
dimensionvoidreason,
minarea,
maxarea,
uomarea,
areavoidreason,
mindepth,
maxdepth,
uomdepth,
depthvoidreason,
minlength,
maxlength,
uomlength,
lengthvoidreason,
minwidth,
maxwidth,
uomwidth,
widthvoidreason,
expression,
expressionvoidreason,
classificationvoidreason,
depositgroup,
25
deposittype,
deposittypevoidreason,
occurrencetype,
associationtype,
country,
geologichistoryvoidreason,
formvoidreason,
linearorientationvoidreason,
planarorientationvoidreason,
shapevoidreason,
sourcereferencevoidreason,
explorationhistoryvoidreason,
resourceextractionvoidreason,
oreamountvoidreason,
endusepotentialvoidreason,
geneticdescriptionvoidreason,
compositionvoidreason,
geometry)
VALUES (2,
'2',
'M4EU.TEST',
'1',
NULL,
'2013-06-01 00:00:00',
NULL,
'2014-06-01 00:00:00',
NULL,
'test_with_unknown_area',
NULL,
NULL,
NULL,
NULL,
NULL,
'unknown',
1,
2,
'm',
NULL,
1,
2,
'm',
NULL,
1,
2,
'm',
NULL,
'geochemical-anomaly',
NULL,
'unknown',
NULL,
NULL,
26
NULL,
'deposit',
NULL,
'DK',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'0101000020A210000000000000000008400000000000001040');
INSERT INTO mineraloccurrence (mineraloccurrencedbk,
inspireid,
inspirens,
inspireversionid,
inspireversionidvoidreason,
beginlifespanversion,
beginlifespanversionvoidreason,
endlifespanversion,
endlifespanversionvoidreason,
name,
namevoidreason,
dimensionvoidreason,
minarea,
maxarea,
uomarea,
areavoidreason,
mindepth,
maxdepth,
uomdepth,
depthvoidreason,
minlength,
maxlength,
uomlength,
lengthvoidreason,
minwidth,
maxwidth,
uomwidth,
widthvoidreason,
expression,
expressionvoidreason,
classificationvoidreason,
depositgroup,
deposittype,
27
deposittypevoidreason,
occurrencetype,
associationtype,
country,
geologichistoryvoidreason,
formvoidreason,
linearorientationvoidreason,
planarorientationvoidreason,
shapevoidreason,
sourcereferencevoidreason,
explorationhistoryvoidreason,
resourceextractionvoidreason,
oreamountvoidreason,
endusepotentialvoidreason,
geneticdescriptionvoidreason,
compositionvoidreason,
geometry)
VALUES (3,
'3',
'M4EU.TEST',
'1',
NULL,
'2013-01-01 00:00:00',
NULL,
'2014-01-01 00:00:00',
NULL,
'test_with_unknown_deposittype',
NULL,
NULL,
25,
50,
'm2',
NULL,
50,
100,
'm',
NULL,
25,
50,
'm',
NULL,
50,
100,
'm',
NULL,
'exposed',
NULL,
NULL,
'placer',
NULL,
'unknown',
28
'deposit',
NULL,
'DK',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'0101000020A210000000000000000049400000000000004E40');
INSERT INTO mineraloccurrence (mineraloccurrencedbk,
inspireid,
inspirens,
inspireversionid,
inspireversionidvoidreason,
beginlifespanversion,
beginlifespanversionvoidreason,
endlifespanversion,
endlifespanversionvoidreason,
name,
namevoidreason,
dimensionvoidreason,
minarea,
maxarea,
uomarea,
areavoidreason,
mindepth,
maxdepth,
uomdepth,
depthvoidreason,
minlength,
maxlength,
uomlength,
lengthvoidreason,
minwidth,
maxwidth,
uomwidth,
widthvoidreason,
expression,
expressionvoidreason,
classificationvoidreason,
depositgroup,
deposittype,
deposittypevoidreason,
29
occurrencetype,
associationtype,
country,
geologichistoryvoidreason,
formvoidreason,
linearorientationvoidreason,
planarorientationvoidreason,
shapevoidreason,
sourcereferencevoidreason,
explorationhistoryvoidreason,
resourceextractionvoidreason,
oreamountvoidreason,
endusepotentialvoidreason,
geneticdescriptionvoidreason,
compositionvoidreason,
geometry)
VALUES (4,
'4',
'M4EU.TEST',
'1',
NULL,
'2013-01-01 00:00:00',
NULL,
'2014-01-01 00:00:00',
NULL,
'test_with_known_geologicevent',
NULL,
NULL,
25,
50,
'm2',
NULL,
50,
100,
'm',
NULL,
25,
50,
'm',
NULL,
50,
100,
'm',
NULL,
'exposed',
NULL,
'unknown',
NULL,
NULL,
NULL,
'deposit',
30
NULL,
'DK',
NULL,
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'0101000020A21000000000000000004E400000000000004E40');
INSERT INTO mineraloccurrence (mineraloccurrencedbk,
inspireid,
inspirens,
inspireversionid,
inspireversionidvoidreason,
beginlifespanversion,
beginlifespanversionvoidreason,
endlifespanversion,
endlifespanversionvoidreason,
name,
namevoidreason,
dimensionvoidreason,
minarea,
maxarea,
uomarea,
areavoidreason,
mindepth,
maxdepth,
uomdepth,
depthvoidreason,
minlength,
maxlength,
uomlength,
lengthvoidreason,
minwidth,
maxwidth,
uomwidth,
widthvoidreason,
expression,
expressionvoidreason,
classificationvoidreason,
depositgroup,
deposittype,
deposittypevoidreason,
occurrencetype,
31
associationtype,
country,
geologichistoryvoidreason,
formvoidreason,
linearorientationvoidreason,
planarorientationvoidreason,
shapevoidreason,
sourcereferencevoidreason,
explorationhistoryvoidreason,
resourceextractionvoidreason,
oreamountvoidreason,
endusepotentialvoidreason,
geneticdescriptionvoidreason,
compositionvoidreason,
geometry)
VALUES (5,
'5',
'M4EU.TEST',
'1',
NULL,
'2012-01-01 00:00:00',
NULL,
'2013-01-01 00:00:00',
NULL,
'test_with_unknown_dimension',
NULL,
'unknown',
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
NULL,
'exposed',
NULL,
'unknown',
NULL,
NULL,
'unknown',
'deposit',
NULL,
32
'DK',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'0101000020A21000000000000000004E400000000000004E40');
INSERT INTO mineraloccurrence (mineraloccurrencedbk,
inspireid,
inspirens,
inspireversionid,
inspireversionidvoidreason,
beginlifespanversion,
beginlifespanversionvoidreason,
endlifespanversion,
endlifespanversionvoidreason,
name,
namevoidreason,
dimensionvoidreason,
minarea,
maxarea,
uomarea,
areavoidreason,
mindepth,
maxdepth,
uomdepth,
depthvoidreason,
minlength,
maxlength,
uomlength,
lengthvoidreason,
minwidth,
maxwidth,
uomwidth,
widthvoidreason,
expression,
expressionvoidreason,
classificationvoidreason,
depositgroup,
deposittype,
deposittypevoidreason,
occurrencetype,
associationtype,
33
country,
geologichistoryvoidreason,
formvoidreason,
linearorientationvoidreason,
planarorientationvoidreason,
shapevoidreason,
sourcereferencevoidreason,
explorationhistoryvoidreason,
resourceextractionvoidreason,
oreamountvoidreason,
endusepotentialvoidreason,
geneticdescriptionvoidreason,
compositionvoidreason,
geometry)
VALUES (6,
'6',
'M4EU.TEST',
'1',
NULL,
'2012-01-01 00:00:00',
NULL,
'2013-01-01 00:00:00',
NULL,
'test_with_known_mining_activity',
NULL,
NULL,
1,
10,
'm2',
NULL,
2,
30,
'm',
NULL,
3,
500,
'm',
NULL,
3,
5,
'm',
NULL,
'exposed',
NULL,
'unknown',
NULL,
NULL,
'unknown',
'deposit',
NULL,
'DK',
34
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
'unknown',
NULL,
'unknown',
'unknown',
'unknown',
'unknown',
'0101000020A21000000000000000004E400000000000004E40');
-- geologic events
INSERT INTO geologicevent (geologiceventdbk,
mineraloccurrencedbk,
name,
namevoidreason,
eventenvironment,
eventenvironmentvoidreason,
eventprocess,
eventprocessvoidreason,
oldernamedage,
oldernamedagevoidreason,
youngernamedage,
youngernamedagevoidreason)
VALUES (1,
4,
'some major event',
NULL,
'contactMetamorphicSetting',
NULL,
'contactMetamorphism',
NULL,
'cenozoic',
NULL,
'cenozoic',
NULL);
INSERT INTO geologicevent (geologiceventdbk,
mineraloccurrencedbk,
name,
namevoidreason,
eventenvironment,
eventenvironmentvoidreason,
eventprocess,
eventprocessvoidreason,
oldernamedage,
35
oldernamedagevoidreason,
youngernamedage,
youngernamedagevoidreason)
VALUES (2,
4,
'some other major event',
NULL,
'contactMetamorphicSetting',
NULL,
'contactMetamorphism',
NULL,
'paleozoic',
NULL,
'cenozoic',
NULL);
--mining feature occurrences
INSERT INTO miningfeatureoccurrence (miningfeatureoccurrencedbk,
inspireid,
inspirens,
inspireversionid,
inspireversionidvoidreason,
geometry)
VALUES (1,
'1',
'M4EU.TEST',
'1',
NULL,
'0101000020A21000000000000000004E400000000000004E40');
INSERT INTO miningfeatureoccurrence (miningfeatureoccurrencedbk,
inspireid,
inspirens,
inspireversionid,
inspireversionidvoidreason,
geometry)
VALUES (2,
'2',
'M4EU.TEST',
'1',
NULL,
'0101000020A21000000000000000004E400000000000004E40');
--mine
INSERT INTO mine (minedbk,
miningfeatureoccurrencedbk,
beginlifespanversion,
beginlifespanversionvoidreason,
36
endlifespanversion,
endlifespanversionvoidreason,
name,
status,
startdate,
startdatevoidreason,
enddate,
enddatevoidreason,
country,
sourcereferencevoidreason,
relatedminedbk,
relatedminevoidreason)
VALUES (1,
2,
'2014-01-10 00:00:00',
NULL,
'2015-01-10 00:00:00',
NULL,
'some_mine',
'closed',
'2000-01-10 00:00:00',
NULL,
'2011-01-10 00:00:00',
NULL,
'DK',
'unknown',
NULL,
'unknown');
--miningactivity
INSERT INTO miningactivity (miningactivitydbk,
miningfeatureoccurrencedbk,
minedbk,
mineraloccurrencedbk,
mineralproducingcountrydbk,
begintime,
endtime,
miningactivitytype,
processingactivitytype,
oreprocessed,
uom,
oreprocessedvoidreason,
associatedminevoidreason,
depositvoidreason,
rawmaterialvoidreason,
producedwastevoidreason,
producedmaterialvoidreason)
VALUES (1,
1,
37
1,
6,
NULL,
'2013-01-10 00:00:00',
'2014-01-10 00:00:00',
'boreholeMining',
'adsorption',
10,
'kg',
NULL,
NULL,
NULL,
'unknown',
'unknown',
'unknown');
Download