|
|
Line 122: |
Line 122: |
| | | |
| <br/> | | <br/> |
| + | |
| | | |
| = Data Referencing<br/> = | | = Data Referencing<br/> = |
Line 137: |
Line 138: |
| <br/> | | <br/> |
| | | |
− | === Comments on Schema<br/> === | + | === <s>Comments on Schema<br/></s> === |
| | | |
− | Schemata are used in the database in order to structure tables, functions, assign assignment of permissions and much more. For the documentation purpose a string in json format is set as comment on schema. The attribute names begins with an <u>upper case</u> and are given by the following definition for schemata<span style="font-weight: normal">. </span><br/> | + | <s>Schemata are used in the database in order to structure tables, functions, assign assignment of permissions and much more. For the documentation purpose a string in json format is set as comment on schema. The attribute names begins with an <u>upper case</u> and are given by the following definition for schemata<span style="font-weight: normal">. </span><br/></s> |
| | | |
− | <br/> | + | <s><br/></s> |
| | | |
| {| style="width: 643px" cellspacing="1" cellpadding="1" | | {| style="width: 643px" cellspacing="1" cellpadding="1" |
− | |+ Metadata Documentation of schemata<br/> | + | |+ <s>Metadata Documentation of schemata<br/></s> |
| |- valign="top" | | |- valign="top" |
− | ! scope="col" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0.1cm 0cm 0.1cm 0.1cm; width: 198px; height: 15px" | <div>Attribute (level 1)<br/></div> | + | ! scope="col" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0.1cm 0cm 0.1cm 0.1cm; width: 198px; height: 15px" | <div><s>Attribute (level 1)<br/></s></div> |
− | ! scope="col" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0.1cm 0cm 0.1cm 0.1cm; width: 131px" | <div>Attribute (level 2)<br/></div> | + | ! scope="col" style="border-width: 1px medium 1px 1px; border-style: solid none solid solid; border-color: rgb(0, 0, 0) -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0.1cm 0cm 0.1cm 0.1cm; width: 131px" | <div><s>Attribute (level 2)<br/></s></div> |
− | ! scope="col" style="width: 291px; border: 1px solid rgb(0, 0, 0); padding: 0.1cm" | <div>Description<br/></div> | + | ! scope="col" style="width: 291px; border: 1px solid rgb(0, 0, 0); padding: 0.1cm" | <div><s>Description<br/></s></div> |
| |- valign="top" | | |- valign="top" |
− | | style="height: 15px; width: 168px; border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 198px" | <div>Name<br/></div> | + | | style="height: 15px; width: 168px; border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 198px" | <div><s>Name<br/></s></div> |
− | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px; height: 15px" | <div><br/></div> | + | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px; height: 15px" | <div><s><br/></s></div> |
− | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm; height: 15px" | <div>Original name of the data set</div> | + | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm; height: 15px" | <div><s>Original name of the data set</s></div> |
| |- valign="top" | | |- valign="top" |
− | | style="width: 168px; border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 198px" | <div>Description</div> | + | | style="width: 168px; border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 198px" | <div><s>Description</s></div> |
− | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px" | <div><br/></div> | + | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px" | <div><s><br/></s></div> |
− | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm" | <div>Short description of the data set.</div> | + | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm" | <div><s>Short description of the data set.</s></div> |
| |- valign="top" | | |- valign="top" |
− | | style="width: 168px; border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 198px" | <div>Changes</div> | + | | style="width: 168px; border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 198px" | <div><s>Changes</s></div> |
− | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px" | <div><br/></div> | + | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px" | <div><s><br/></s></div> |
− | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm" | <div>Information of changes and user</div> | + | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm" | <div><s>Information of changes and user</s></div> |
| |- valign="top" | | |- valign="top" |
− | | rowspan="4" style="width: 168px; border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 198px" | <div><br/></div> | + | | rowspan="4" style="width: 168px; border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 198px" | <div><s><br/></s></div> |
− | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px" | <div>Name</div> | + | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px" | <div><s>Name</s></div> |
− | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm" | <div>Name of Person created or changed dataset</div> | + | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm" | <div><s>Name of Person created or changed dataset</s></div> |
| |- valign="top" | | |- valign="top" |
− | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px" | <div>Mail</div> | + | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px" | <div><s>Mail</s></div> |
− | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm" | <div>E-mail Address</div> | + | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm" | <div><s>E-mail Address</s></div> |
| |- valign="top" | | |- valign="top" |
− | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px" | <div>Date<br/></div> | + | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px" | <div><s>Date<br/></s></div> |
− | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm" | <div>Date of changes</div> | + | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm" | <div><s>Date of changes</s></div> |
| |- valign="top" | | |- valign="top" |
− | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px" | <div>Comment<br/></div> | + | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px" | <div><s>Comment<br/></s></div> |
− | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm" | <div>Comment of changes</div> | + | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm" | <div><s>Comment of changes</s></div> |
| |- valign="top" | | |- valign="top" |
− | | style="width: 168px; border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 198px" | <div>Note<br/></div> | + | | style="width: 168px; border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 198px" | <div><s>Note<br/></s></div> |
− | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px" | <div><br/></div> | + | | style="border-width: medium medium 1px 1px; border-style: none none solid solid; border-color: -moz-use-text-color -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0cm 0.1cm 0.1cm; width: 131px" | <div><s><br/></s></div> |
− | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm" | <div>Field for notes or ToDo which are not done yet<br/></div> | + | | style="width: 291px; border-width: medium 1px 1px; border-style: none solid solid; border-color: -moz-use-text-color rgb(0, 0, 0) rgb(0, 0, 0); padding: 0cm 0.1cm 0.1cm" | <div><s>Field for notes or ToDo which are not done yet<br/></s></div> |
| |} | | |} |
| | | |
− | <br/>[https://github.com/openego/data_processing/blob/master/data_documentation/documentaion_on_schema_example.sql SQL Json Example] | + | <s><br/>[https://github.com/openego/data_processing/blob/master/data_documentation/documentaion_on_schema_example.sql SQL Json Example]</s> |
| | | |
| <br/> | | <br/> |
The following database rules explain the usage of the database called oedb, which will become a part of the openmod internet presence. For further details see also here.
The data in the database is organised in schemata and tables, which names are important to find around.
The structure of the database is also realised via schemata.
Further schema categories or change can be discussed under Discussion.
"Data integrity refers to maintaining and assuring the accuracy and consistency of data over its entire life-cycle." (Wikipedia) These two aspects belong to the data quality criteria, the data in the oedb should meet.
There are several useful attributes on a table users have to know in order to work with the contained data efficiently. Therefore, ensuring the quality of these meta data is as important as ensuring the quality of the data itself (see also here).
Comments on a table are json-dictionary as strings that describe the overall structure of the corresponding table. For every field the corresponding unit (in case of numerical values) and a description that specifies the contained data should be attached. The attribute names begins with an upper case and are given by the following definition of Database Tables. The Json meta documentation string is stored as table comment on the database table.
Original Data (orig) are defined as data from one source which are not further processed (see: Database Schema). The metadata Documentation for those data sets are set as a comment on the table. Following meta data are proposed:
In addition to the meta documentation described above, data tables (blue table in figure) which include data from several sources get a ref_id column. The ref_id links each row with a json documentation string (ref_data_json) in the database table public.reference_to_entries (green table in figure).This table also includes the ref_data_json column which links to all sources of the row to be referenced (blue). The ref_data_json string includes one jabref_entries_id for each source used. The jabref_entries_id is matched by one entries_id belonging to a source stored in the public.entries table (orange table).
Each row in the reference_to_entries table (green) contains a ref_data_json documentation string which links to the meta data in the Jabref table public.entries (orange).
The comments on a row aim to enhance the reproducabilty of data that is present in the database by stating the underlying data that was used to compute this row as well as the applied computational methods.
During these processes some kinds of uncertainities might occur as well as the decissions (assumtions) that were made to deal with them. Examplatory, some values might be missing amid this row and a linear development during this period was assumed to fix this gap. Each row has to be annotated by a json dictionary that must contain the following fields: