Project

General

Profile

« Previous | Next » 

Revision 10964

schemas/VegCore/VegCore.ERD.mwb: taxa_sampling_event: link directly to project, so that you don't have to search the parent event hierarchy to find the associated project

View differences:

schemas/VegCore/VegCore.pg.sql
1090 1090
CREATE TABLE "taxa_sampling_event" (
1091 1091
  "id" text NOT NULL,
1092 1092
  "within_place" text NOT NULL,
1093
  "project" text DEFAULT NULL,
1093 1094
  "method" text DEFAULT NULL,
1094 1095
  PRIMARY KEY ("id"),
1095 1096
  /*KEY "fk_sampling_event_method1_idx" ("method")*/CHECK (true),
1096 1097
  /*KEY "fk_taxa_sampling_event_place1_idx" ("within_place")*/CHECK (true),
1098
  /*KEY "fk_taxa_sampling_event_project1_idx" ("project")*/CHECK (true),
1099
  /*CONSTRAINT "fk_taxa_sampling_event_project1" FOREIGN KEY ("project") REFERENCES "project" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1097 1100
  /*CONSTRAINT "fk_project_event10" FOREIGN KEY ("id") REFERENCES "event" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1098 1101
  /*CONSTRAINT "fk_sampling_event_method1" FOREIGN KEY ("method") REFERENCES "method" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true),
1099 1102
  /*CONSTRAINT "fk_taxa_sampling_event_place1" FOREIGN KEY ("within_place") REFERENCES "place" ("id") ON DELETE CASCADE ON UPDATE CASCADE*/CHECK (true)
schemas/VegCore/document.mwb.xml
10628 10628
                      <value type="string" key="oldName">within_place</value>
10629 10629
                      <link type="object" struct-name="GrtObject" key="owner">7f176964-f6c0-11e2-af44-080027bcf912</link>
10630 10630
                    </value>
10631
                    <value type="object" struct-name="db.mysql.Column" id="eca92bf8-1de3-11e3-b950-080027bcf912" struct-checksum="0x783b5183">
10632
                      <value type="int" key="autoIncrement">0</value>
10633
                      <value type="string" key="characterSetName"></value>
10634
                      <value _ptr_="0xc274088" type="list" content-type="object" content-struct-name="db.CheckConstraint" key="checks"/>
10635
                      <value type="string" key="collationName"></value>
10636
                      <value type="string" key="datatypeExplicitParams"></value>
10637
                      <value type="string" key="defaultValue"></value>
10638
                      <value type="int" key="defaultValueIsNull">1</value>
10639
                      <value _ptr_="0xc1eceb0" type="list" content-type="string" key="flags"/>
10640
                      <value type="int" key="isNotNull">0</value>
10641
                      <value type="int" key="length">767</value>
10642
                      <value type="int" key="precision">-1</value>
10643
                      <value type="int" key="scale">-1</value>
10644
                      <link type="object" struct-name="db.SimpleDatatype" key="simpleType">com.mysql.rdbms.mysql.datatype.varbinary</link>
10645
                      <value type="string" key="comment"></value>
10646
                      <value type="string" key="name">project</value>
10647
                      <value type="string" key="oldName">project</value>
10648
                      <link type="object" struct-name="GrtObject" key="owner">7f176964-f6c0-11e2-af44-080027bcf912</link>
10649
                    </value>
10631 10650
                    <value type="object" struct-name="db.mysql.Column" id="a841ba7e-f6c0-11e2-af44-080027bcf912" struct-checksum="0x783b5183">
10632 10651
                      <value type="int" key="autoIncrement">0</value>
10633 10652
                      <value type="string" key="characterSetName"></value>
......
10653 10672
                  <value type="string" key="defaultCollationName">utf8_bin</value>
10654 10673
                  <value type="int" key="delayKeyWrite">0</value>
10655 10674
                  <value _ptr_="0xb9d9368" type="list" content-type="object" content-struct-name="db.mysql.ForeignKey" key="foreignKeys">
10656
                    <value type="object" struct-name="db.mysql.ForeignKey" id="a841b894-f6c0-11e2-af44-080027bcf912" struct-checksum="0x70a8fc40">
10657
                      <link type="object" struct-name="db.mysql.Table" key="referencedTable">be8d8c2a-a6e0-11e2-95e9-080027bcf912</link>
10658
                      <value _ptr_="0xb9da460" type="list" content-type="object" content-struct-name="db.Column" key="columns">
10659
                        <link type="object">a841ba7e-f6c0-11e2-af44-080027bcf912</link>
10675
                    <value type="object" struct-name="db.mysql.ForeignKey" id="eca92a0e-1de3-11e3-b950-080027bcf912" struct-checksum="0x70a8fc40">
10676
                      <link type="object" struct-name="db.mysql.Table" key="referencedTable">be8fa0fa-a6e0-11e2-95e9-080027bcf912</link>
10677
                      <value _ptr_="0xc4edf68" type="list" content-type="object" content-struct-name="db.Column" key="columns">
10678
                        <link type="object">eca92bf8-1de3-11e3-b950-080027bcf912</link>
10660 10679
                      </value>
10661 10680
                      <value type="int" key="deferability">0</value>
10662 10681
                      <value type="string" key="deleteRule">CASCADE</value>
10663
                      <link type="object" struct-name="db.Index" key="index">a842920a-f6c0-11e2-af44-080027bcf912</link>
10682
                      <link type="object" struct-name="db.Index" key="index">eca94142-1de3-11e3-b950-080027bcf912</link>
10664 10683
                      <value type="int" key="mandatory">1</value>
10665 10684
                      <value type="int" key="many">1</value>
10666 10685
                      <value type="int" key="modelOnly">0</value>
10667 10686
                      <link type="object" struct-name="db.Table" key="owner">7f176964-f6c0-11e2-af44-080027bcf912</link>
10668
                      <value _ptr_="0xb9da7c8" type="list" content-type="object" content-struct-name="db.Column" key="referencedColumns">
10669
                        <link type="object">be8d8ea0-a6e0-11e2-95e9-080027bcf912</link>
10687
                      <value _ptr_="0xc4a4570" type="list" content-type="object" content-struct-name="db.Column" key="referencedColumns">
10688
                        <link type="object">be8fa398-a6e0-11e2-95e9-080027bcf912</link>
10670 10689
                      </value>
10671 10690
                      <value type="int" key="referencedMandatory">0</value>
10672 10691
                      <value type="string" key="updateRule">CASCADE</value>
10673 10692
                      <value type="string" key="comment"></value>
10674
                      <value type="string" key="name">fk_sampling_event_method1</value>
10675
                      <value type="string" key="oldName">fk_sampling_event_method1</value>
10693
                      <value type="string" key="name">fk_taxa_sampling_event_project1</value>
10694
                      <value type="string" key="oldName">fk_taxa_sampling_event_project1</value>
10676 10695
                    </value>
10677 10696
                    <value type="object" struct-name="db.mysql.ForeignKey" id="7f177512-f6c0-11e2-af44-080027bcf912" struct-checksum="0x70a8fc40">
10678 10697
                      <link type="object" struct-name="db.mysql.Table" key="referencedTable">c672743a-a7a0-11e2-b667-080027bcf912</link>
......
10716 10735
                      <value type="string" key="name">fk_taxa_sampling_event_place1</value>
10717 10736
                      <value type="string" key="oldName">fk_taxa_sampling_event_place1</value>
10718 10737
                    </value>
10738
                    <value type="object" struct-name="db.mysql.ForeignKey" id="a841b894-f6c0-11e2-af44-080027bcf912" struct-checksum="0x70a8fc40">
10739
                      <link type="object" struct-name="db.mysql.Table" key="referencedTable">be8d8c2a-a6e0-11e2-95e9-080027bcf912</link>
10740
                      <value _ptr_="0xb9da460" type="list" content-type="object" content-struct-name="db.Column" key="columns">
10741
                        <link type="object">a841ba7e-f6c0-11e2-af44-080027bcf912</link>
10742
                      </value>
10743
                      <value type="int" key="deferability">0</value>
10744
                      <value type="string" key="deleteRule">CASCADE</value>
10745
                      <link type="object" struct-name="db.Index" key="index">a842920a-f6c0-11e2-af44-080027bcf912</link>
10746
                      <value type="int" key="mandatory">1</value>
10747
                      <value type="int" key="many">1</value>
10748
                      <value type="int" key="modelOnly">0</value>
10749
                      <link type="object" struct-name="db.Table" key="owner">7f176964-f6c0-11e2-af44-080027bcf912</link>
10750
                      <value _ptr_="0xb9da7c8" type="list" content-type="object" content-struct-name="db.Column" key="referencedColumns">
10751
                        <link type="object">be8d8ea0-a6e0-11e2-95e9-080027bcf912</link>
10752
                      </value>
10753
                      <value type="int" key="referencedMandatory">0</value>
10754
                      <value type="string" key="updateRule">CASCADE</value>
10755
                      <value type="string" key="comment"></value>
10756
                      <value type="string" key="name">fk_sampling_event_method1</value>
10757
                      <value type="string" key="oldName">fk_sampling_event_method1</value>
10758
                    </value>
10719 10759
                  </value>
10720 10760
                  <value _ptr_="0xb9d93b8" type="list" content-type="object" content-struct-name="db.mysql.Index" key="indices">
10721 10761
                    <value type="object" struct-name="db.mysql.Index" id="7f177760-f6c0-11e2-af44-080027bcf912" struct-checksum="0x309b847a">
......
10787 10827
                      <value type="string" key="oldName">fk_taxa_sampling_event_place1_idx</value>
10788 10828
                      <link type="object" struct-name="GrtObject" key="owner">7f176964-f6c0-11e2-af44-080027bcf912</link>
10789 10829
                    </value>
10830
                    <value type="object" struct-name="db.mysql.Index" id="eca94142-1de3-11e3-b950-080027bcf912" struct-checksum="0x309b847a">
10831
                      <value _ptr_="0xc49a390" type="list" content-type="object" content-struct-name="db.mysql.IndexColumn" key="columns">
10832
                        <value type="object" struct-name="db.mysql.IndexColumn" id="eca942e6-1de3-11e3-b950-080027bcf912" struct-checksum="0x62630b3c">
10833
                          <value type="int" key="columnLength">0</value>
10834
                          <value type="string" key="comment"></value>
10835
                          <value type="int" key="descend">0</value>
10836
                          <link type="object" struct-name="db.Column" key="referencedColumn">eca92bf8-1de3-11e3-b950-080027bcf912</link>
10837
                          <value type="string" key="name"></value>
10838
                          <link type="object" struct-name="GrtObject" key="owner">eca94142-1de3-11e3-b950-080027bcf912</link>
10839
                        </value>
10840
                      </value>
10841
                      <value type="string" key="indexKind"></value>
10842
                      <value type="int" key="keyBlockSize">0</value>
10843
                      <value type="string" key="withParser"></value>
10844
                      <value type="string" key="comment"></value>
10845
                      <value type="int" key="deferability">0</value>
10846
                      <value type="string" key="indexType">INDEX</value>
10847
                      <value type="int" key="isPrimary">0</value>
10848
                      <value type="string" key="name">fk_taxa_sampling_event_project1_idx</value>
10849
                      <value type="int" key="unique">0</value>
10850
                      <value type="string" key="oldName">fk_taxa_sampling_event_project1_idx</value>
10851
                      <link type="object" struct-name="GrtObject" key="owner">7f176964-f6c0-11e2-af44-080027bcf912</link>
10852
                    </value>
10790 10853
                  </value>
10791 10854
                  <value type="string" key="maxRows"></value>
10792 10855
                  <value type="string" key="mergeInsert"></value>
......
10818 10881
                  <value type="int" key="commentedOut">0</value>
10819 10882
                  <value type="string" key="createDate">2013-04-16 14:58</value>
10820 10883
                  <value _ptr_="0xb9d9140" type="dict" key="customData"/>
10821
                  <value type="string" key="lastChangeDate">2013-08-09 10:48</value>
10884
                  <value type="string" key="lastChangeDate">2013-09-15 01:51</value>
10822 10885
                  <value type="int" key="modelOnly">0</value>
10823 10886
                  <value type="string" key="name">taxa_sampling_event</value>
10824 10887
                  <link type="object" struct-name="GrtNamedObject" key="owner">be8cb246-a6e0-11e2-95e9-080027bcf912</link>
......
15417 15480
                <value type="int" key="visible">1</value>
15418 15481
                <value type="string" key="name"></value>
15419 15482
              </value>
15483
              <value type="object" struct-name="workbench.physical.Connection" id="eca94980-1de3-11e3-b950-080027bcf912" struct-checksum="0x9baebc92">
15484
                <value type="string" key="caption">fk_taxa_sampling_event_project1</value>
15485
                <value type="real" key="captionXOffs">0.e+00</value>
15486
                <value type="real" key="captionYOffs">0.e+00</value>
15487
                <value type="string" key="comment"></value>
15488
                <value type="real" key="endCaptionXOffs">0.e+00</value>
15489
                <value type="real" key="endCaptionYOffs">0.e+00</value>
15490
                <value type="string" key="extraCaption"></value>
15491
                <value type="real" key="extraCaptionXOffs">0.e+00</value>
15492
                <value type="real" key="extraCaptionYOffs">0.e+00</value>
15493
                <link type="object" struct-name="db.ForeignKey" key="foreignKey">eca92a0e-1de3-11e3-b950-080027bcf912</link>
15494
                <value type="real" key="middleSegmentOffset">0.e+00</value>
15495
                <value type="real" key="startCaptionXOffs">0.e+00</value>
15496
                <value type="real" key="startCaptionYOffs">0.e+00</value>
15497
                <value type="int" key="drawSplit">0</value>
15498
                <link type="object" struct-name="model.Figure" key="endFigure">6B49544F-8630-4930-B54B-2CD6F6C0C631</link>
15499
                <link type="object" struct-name="model.Figure" key="startFigure">7f17a4b0-f6c0-11e2-af44-080027bcf912</link>
15500
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
15501
                <value type="int" key="visible">1</value>
15502
                <value type="string" key="name"></value>
15503
              </value>
15420 15504
            </value>
15421 15505
            <value type="string" key="description"></value>
15422 15506
            <value _ptr_="0xb9fa1a0" type="list" content-type="object" content-struct-name="model.Figure" key="figures">
......
15509 15593
                <value type="real" key="left">5.75e+02</value>
15510 15594
                <value type="int" key="locked">0</value>
15511 15595
                <value type="int" key="manualSizing">0</value>
15512
                <value type="real" key="top">4.4e+02</value>
15596
                <value type="real" key="top">4.34e+02</value>
15513 15597
                <value type="real" key="width">8.1e+01</value>
15514 15598
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
15515 15599
                <value type="int" key="visible">1</value>
......
16670 16754
                <value type="int" key="triggersExpanded">0</value>
16671 16755
                <value type="string" key="color">#66ffff</value>
16672 16756
                <value type="int" key="expanded">1</value>
16673
                <value type="real" key="height">1.e+02</value>
16757
                <value type="real" key="height">1.23e+02</value>
16674 16758
                <link type="object" struct-name="model.Layer" key="layer">88F9E582-B992-43CC-B7D6-A42E190DCB13</link>
16675 16759
                <value type="real" key="left">6.46e+02</value>
16676 16760
                <value type="int" key="locked">0</value>
16677 16761
                <value type="int" key="manualSizing">0</value>
16678
                <value type="real" key="top">6.24e+02</value>
16762
                <value type="real" key="top">6.12e+02</value>
16679 16763
                <value type="real" key="width">1.71e+02</value>
16680 16764
                <link type="object" struct-name="model.Diagram" key="owner">3915EB3C-D507-4518-BE3A-63A8D8DD4471</link>
16681 16765
                <value type="int" key="visible">1</value>
......
17151 17235
        <link type="object" struct-name="db.mgmt.Rdbms" key="rdbms">com.mysql.rdbms.mysql</link>
17152 17236
        <value _ptr_="0xb950b50" type="list" content-type="object" content-struct-name="db.Script" key="scripts"/>
17153 17237
        <value _ptr_="0xaf58108" type="dict" key="syncProfiles">
17154
          <value type="object" struct-name="db.mgmt.SyncProfile" id="721faaec-1de3-11e3-b950-080027bcf912" struct-checksum="0xc64972c2" key="">
17155
            <value _ptr_="0xc70bd68" type="dict" key="lastKnownDBNames">
17238
          <value type="object" struct-name="db.mgmt.SyncProfile" id="22553aa8-1de4-11e3-b950-080027bcf912" struct-checksum="0xc64972c2" key="">
17239
            <value _ptr_="0xc9a9680" type="dict" key="lastKnownDBNames">
17156 17240
              <value type="string" key="01b2e3fe-f6ed-11e2-9cf1-080027bcf912">fk_georeferencing_party_list1</value>
17157 17241
              <value type="string" key="01b2e606-f6ed-11e2-9cf1-080027bcf912">georeferenced_by</value>
17158 17242
              <value type="string" key="01b2fe70-f6ed-11e2-9cf1-080027bcf912">fk_georeferencing_party_list1_idx</value>
......
17661 17745
              <value type="string" key="eb77b1da-ad01-11e2-b309-080027bcf912">fk_specimen_taxon_observation1_idx</value>
17662 17746
              <value type="string" key="ec1f6aa2-f6c5-11e2-a35e-080027bcf912">shape</value>
17663 17747
              <value type="string" key="ec6965f0-a925-11e2-acee-080027bcf912">fk_specimen_organization3</value>
17748
              <value type="string" key="eca92a0e-1de3-11e3-b950-080027bcf912">fk_taxa_sampling_event_project1</value>
17749
              <value type="string" key="eca92bf8-1de3-11e3-b950-080027bcf912">project</value>
17750
              <value type="string" key="eca94142-1de3-11e3-b950-080027bcf912">fk_taxa_sampling_event_project1_idx</value>
17664 17751
              <value type="string" key="ed1eb2a6-ad0e-11e2-b309-080027bcf912">fk_collection_organization1</value>
17665 17752
              <value type="string" key="ed1eb468-ad0e-11e2-b309-080027bcf912">institution</value>
17666 17753
              <value type="string" key="ed1ec98a-ad0e-11e2-b309-080027bcf912">fk_collection_organization1_idx</value>
......
17770 17857
    <value type="object" struct-name="app.DocumentInfo" id="BEE3982F-55A1-4B2C-914A-CD6953803AB9" struct-checksum="0xbba780b8" key="info">
17771 17858
      <value type="string" key="author">Aaron Marcuse-Kubitza</value>
17772 17859
      <value type="string" key="caption">New Model</value>
17773
      <value type="string" key="dateChanged">2013-09-15 01:49</value>
17860
      <value type="string" key="dateChanged">2013-09-15 01:52</value>
17774 17861
      <value type="string" key="dateCreated">2012-01-19 14:06</value>
17775 17862
      <value type="string" key="description"></value>
17776 17863
      <value type="string" key="project">Name of the project</value>
schemas/VegCore/VegCore.my.sql
1088 1088
CREATE TABLE `taxa_sampling_event` (
1089 1089
  `id` varbinary(767) NOT NULL,
1090 1090
  `within_place` varbinary(767) NOT NULL,
1091
  `project` varbinary(767) DEFAULT NULL,
1091 1092
  `method` varbinary(767) DEFAULT NULL,
1092 1093
  PRIMARY KEY (`id`),
1093 1094
  KEY `fk_sampling_event_method1_idx` (`method`),
1094 1095
  KEY `fk_taxa_sampling_event_place1_idx` (`within_place`),
1096
  KEY `fk_taxa_sampling_event_project1_idx` (`project`),
1097
  CONSTRAINT `fk_taxa_sampling_event_project1` FOREIGN KEY (`project`) REFERENCES `project` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1095 1098
  CONSTRAINT `fk_project_event10` FOREIGN KEY (`id`) REFERENCES `event` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1096 1099
  CONSTRAINT `fk_sampling_event_method1` FOREIGN KEY (`method`) REFERENCES `method` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
1097 1100
  CONSTRAINT `fk_taxa_sampling_event_place1` FOREIGN KEY (`within_place`) REFERENCES `place` (`id`) ON DELETE CASCADE ON UPDATE CASCADE

Also available in: Unified diff