Project

General

Profile

« Previous | Next » 

Revision 11029

schemas/VegCore/VegCore.ERD.mwb: traceable: added table_fragment field, which is the portion of the source record that this traceable refers to. (denormalized source data often contains data for many VegCore tables in the same row, and the traceables for each of these table entries must be distinguished from each other since they share the same source. this is usually just the VegCore table name, sometimes with a distinguishing prefix (e.g. collector.party/identified_by.party; current_observation.taxon_determination/orig_observation.taxon_determination).) this field is needed in addition to the source record to form a unique ID for the traceable.

View differences:

schemas/VegCore/VegCore.pg.sql
1416 1416
/*!40101 SET character_set_client = utf8 */;
1417 1417
CREATE TABLE "traceable" (
1418 1418
  "id" text NOT NULL,
1419
  "source" text DEFAULT NULL,
1419
  "source" text NOT NULL,
1420
  "table_fragment" text NOT NULL /*COMMENT 'the portion of the source record that this traceable refers to. denormalized source data often contains data for many VegCore tables in the same row, and the traceables for each of these table entries must be distinguished *from each other* since they share the same source. this is usually just the VegCore table name, sometimes with a distinguishing prefix (e.g. collector.party/identified_by.party; current_observation.taxon_determination/orig_observation.taxon_determination).'*/,
1420 1421
  PRIMARY KEY ("id"),
1421
  /*CONSTRAINT "record_unique" */UNIQUE ("source"),
1422
  /*CONSTRAINT "traceable_unique" */UNIQUE ("source","table_fragment"),
1422 1423
  /*CONSTRAINT "fk_record_source1" FOREIGN KEY ("source") REFERENCES "source" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
1423 1424
) /*ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='a row that can have associated source information'*/;
1424 1425
/*!40101 SET character_set_client = @saved_cs_client */;
schemas/VegCore/document.mwb.xml
1224 1224
                      <value type="string" key="collationName"></value>
1225 1225
                      <value type="string" key="datatypeExplicitParams"></value>
1226 1226
                      <value type="string" key="defaultValue"></value>
1227
                      <value type="int" key="defaultValueIsNull">1</value>
1227
                      <value type="int" key="defaultValueIsNull">0</value>
1228 1228
                      <value _ptr_="0xaa094d8" type="list" content-type="string" key="flags"/>
1229
                      <value type="int" key="isNotNull">0</value>
1229
                      <value type="int" key="isNotNull">1</value>
1230 1230
                      <value type="int" key="length">767</value>
1231 1231
                      <value type="int" key="precision">-1</value>
1232 1232
                      <value type="int" key="scale">-1</value>
......
1236 1236
                      <value type="string" key="oldName">source</value>
1237 1237
                      <link type="object" struct-name="GrtObject" key="owner">be8cd56e-a6e0-11e2-95e9-080027bcf912</link>
1238 1238
                    </value>
1239
                    <value type="object" struct-name="db.mysql.Column" id="f9d963a4-2326-11e3-a5a2-080027bcf912" struct-checksum="0x783b5183">
1240
                      <value type="int" key="autoIncrement">0</value>
1241
                      <value type="string" key="characterSetName"></value>
1242
                      <value _ptr_="0xab0e358" type="list" content-type="object" content-struct-name="db.CheckConstraint" key="checks"/>
1243
                      <value type="string" key="collationName"></value>
1244
                      <value type="string" key="datatypeExplicitParams"></value>
1245
                      <value type="string" key="defaultValue"></value>
1246
                      <value type="int" key="defaultValueIsNull">0</value>
1247
                      <value _ptr_="0xa9ebd18" type="list" content-type="string" key="flags"/>
1248
                      <value type="int" key="isNotNull">1</value>
1249
                      <value type="int" key="length">767</value>
1250
                      <value type="int" key="precision">-1</value>
1251
                      <value type="int" key="scale">-1</value>
1252
                      <link type="object" struct-name="db.SimpleDatatype" key="simpleType">com.mysql.rdbms.mysql.datatype.varbinary</link>
1253
                      <value type="string" key="comment">the portion of the source record that this traceable refers to. denormalized source data often contains data for many VegCore tables in the same row, and the traceables for each of these table entries must be distinguished *from each other* since they share the same source. this is usually just the VegCore table name, sometimes with a distinguishing prefix (e.g. collector.party/identified_by.party; current_observation.taxon_determination/orig_observation.taxon_determination).</value>
1254
                      <value type="string" key="name">table_fragment</value>
1255
                      <value type="string" key="oldName"></value>
1256
                      <link type="object" struct-name="GrtObject" key="owner">be8cd56e-a6e0-11e2-95e9-080027bcf912</link>
1257
                    </value>
1239 1258
                  </value>
1240 1259
                  <value type="string" key="connectionString"></value>
1241 1260
                  <value type="string" key="defaultCharacterSetName">utf8</value>
......
1256 1275
                      <value _ptr_="0xaa09940" type="list" content-type="object" content-struct-name="db.Column" key="referencedColumns">
1257 1276
                        <link type="object">afc4053a-1df9-11e3-bbb6-080027bcf912</link>
1258 1277
                      </value>
1259
                      <value type="int" key="referencedMandatory">0</value>
1278
                      <value type="int" key="referencedMandatory">1</value>
1260 1279
                      <value type="string" key="updateRule">CASCADE</value>
1261 1280
                      <value type="string" key="comment"></value>
1262 1281
                      <value type="string" key="name">fk_record_source1</value>
......
1297 1316
                          <value type="string" key="name"></value>
1298 1317
                          <link type="object" struct-name="GrtObject" key="owner">fbf69d1e-a79d-11e2-a346-080027bcf912</link>
1299 1318
                        </value>
1319
                        <value type="object" struct-name="db.mysql.IndexColumn" id="58de9676-2327-11e3-a5a2-080027bcf912" struct-checksum="0x62630b3c">
1320
                          <value type="int" key="columnLength">0</value>
1321
                          <value type="string" key="comment"></value>
1322
                          <value type="int" key="descend">0</value>
1323
                          <link type="object" struct-name="db.Column" key="referencedColumn">f9d963a4-2326-11e3-a5a2-080027bcf912</link>
1324
                          <value type="string" key="name"></value>
1325
                          <link type="object" struct-name="GrtObject" key="owner">fbf69d1e-a79d-11e2-a346-080027bcf912</link>
1326
                        </value>
1300 1327
                      </value>
1301 1328
                      <value type="string" key="indexKind"></value>
1302 1329
                      <value type="int" key="keyBlockSize">0</value>
......
1305 1332
                      <value type="int" key="deferability">0</value>
1306 1333
                      <value type="string" key="indexType">UNIQUE</value>
1307 1334
                      <value type="int" key="isPrimary">0</value>
1308
                      <value type="string" key="name">record_unique</value>
1335
                      <value type="string" key="name">traceable_unique</value>
1309 1336
                      <value type="int" key="unique">1</value>
1310 1337
                      <value type="string" key="oldName">record_unique</value>
1311 1338
                      <link type="object" struct-name="GrtObject" key="owner">be8cd56e-a6e0-11e2-95e9-080027bcf912</link>
......
1341 1368
                  <value type="int" key="commentedOut">0</value>
1342 1369
                  <value type="string" key="createDate">2013-04-16 14:58</value>
1343 1370
                  <value _ptr_="0xa2298b8" type="dict" key="customData"/>
1344
                  <value type="string" key="lastChangeDate">2013-09-15 04:37</value>
1371
                  <value type="string" key="lastChangeDate">2013-09-21 18:56</value>
1345 1372
                  <value type="int" key="modelOnly">0</value>
1346 1373
                  <value type="string" key="name">traceable</value>
1347 1374
                  <link type="object" struct-name="GrtNamedObject" key="owner">be8cb246-a6e0-11e2-95e9-080027bcf912</link>
......
15851 15878
                <value type="real" key="left">2.4e+01</value>
15852 15879
                <value type="int" key="locked">0</value>
15853 15880
                <value type="int" key="manualSizing">0</value>
15854
                <value type="real" key="top">6.8e+02</value>
15881
                <value type="real" key="top">6.91e+02</value>
15855 15882
                <value type="real" key="width">9.2e+01</value>
15856 15883
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
15857 15884
                <value type="int" key="visible">1</value>
......
15866 15893
                <value type="int" key="triggersExpanded">0</value>
15867 15894
                <value type="string" key="color">#99ccff</value>
15868 15895
                <value type="int" key="expanded">1</value>
15869
                <value type="real" key="height">7.7e+01</value>
15896
                <value type="real" key="height">1.e+02</value>
15870 15897
                <link type="object" struct-name="model.Layer" key="layer">88F9E582-B992-43CC-B7D6-A42E190DCB13</link>
15871 15898
                <value type="real" key="left">1.46e+02</value>
15872 15899
                <value type="int" key="locked">0</value>
......
17392 17419
                <value type="real" key="left">1.45e+02</value>
17393 17420
                <value type="int" key="locked">0</value>
17394 17421
                <value type="int" key="manualSizing">0</value>
17395
                <value type="real" key="top">6.43e+02</value>
17422
                <value type="real" key="top">6.54e+02</value>
17396 17423
                <value type="real" key="width">1.1e+02</value>
17397 17424
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
17398 17425
                <value type="int" key="visible">1</value>
......
17412 17439
                <value type="real" key="left">1.e+01</value>
17413 17440
                <value type="int" key="locked">0</value>
17414 17441
                <value type="int" key="manualSizing">0</value>
17415
                <value type="real" key="top">5.28e+02</value>
17442
                <value type="real" key="top">5.39e+02</value>
17416 17443
                <value type="real" key="width">8.9e+01</value>
17417 17444
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
17418 17445
                <value type="int" key="visible">1</value>
......
18206 18233
    <value type="object" struct-name="app.DocumentInfo" id="BEE3982F-55A1-4B2C-914A-CD6953803AB9" struct-checksum="0xbba780b8" key="info">
18207 18234
      <value type="string" key="author">Aaron Marcuse-Kubitza</value>
18208 18235
      <value type="string" key="caption">New Model</value>
18209
      <value type="string" key="dateChanged">2013-09-21 18:17</value>
18236
      <value type="string" key="dateChanged">2013-09-21 18:56</value>
18210 18237
      <value type="string" key="dateCreated">2012-01-19 14:06</value>
18211 18238
      <value type="string" key="description"></value>
18212 18239
      <value type="string" key="project">Name of the project</value>
schemas/VegCore/VegCore.my.sql
1414 1414
/*!40101 SET character_set_client = utf8 */;
1415 1415
CREATE TABLE `traceable` (
1416 1416
  `id` varbinary(767) NOT NULL,
1417
  `source` varbinary(767) DEFAULT NULL,
1417
  `source` varbinary(767) NOT NULL,
1418
  `table_fragment` varbinary(767) NOT NULL COMMENT 'the portion of the source record that this traceable refers to. denormalized source data often contains data for many VegCore tables in the same row, and the traceables for each of these table entries must be distinguished *from each other* since they share the same source. this is usually just the VegCore table name, sometimes with a distinguishing prefix (e.g. collector.party/identified_by.party; current_observation.taxon_determination/orig_observation.taxon_determination).',
1418 1419
  PRIMARY KEY (`id`),
1419
  UNIQUE KEY `record_unique` (`source`),
1420
  UNIQUE KEY `traceable_unique` (`source`,`table_fragment`),
1420 1421
  CONSTRAINT `fk_record_source1` FOREIGN KEY (`source`) REFERENCES `source` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
1421 1422
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='a row that can have associated source information';
1422 1423
/*!40101 SET character_set_client = @saved_cs_client */;

Also available in: Unified diff