<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: use multiple fileds as primary/foreign key in Data Management Questions</title>
    <link>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87174#M5048</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I couldn't find one... you might want to scroll through the tools in the toolbox tree to see if you can find one.&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/main/tools/a-quick-tour-of-geoprocessing-tool-references.htm" title="http://desktop.arcgis.com/en/desktop/latest/main/tools/a-quick-tour-of-geoprocessing-tool-references.htm"&gt;A quick tour of geoprocessing tool references—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jan 2016 11:21:38 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2016-01-22T11:21:38Z</dc:date>
    <item>
      <title>use multiple fileds as primary/foreign key</title>
      <link>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87171#M5045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everybody,&lt;/P&gt;&lt;P&gt;I'm guessing if in ArcGIS it is possible to use the join or create a relationship class commands using multiple fields as primary/foreign keys.&lt;/P&gt;&lt;P&gt;I mean...I've got field A, B and C. Separatley they are not a primary key, but if I concatenate A+B+C they become a primary key.&lt;/P&gt;&lt;P&gt;What I've done since today is creating an extra field that I populate with a concatenation expression using the field calculator. This is an annoying solution since I've to create a redundant field in both the primary/foreign tables (I often can't do that because of the feature class schema) and I've to "maintain" that redundant fields (executing the field calculator's concatenation expression each time there are some changings).&lt;/P&gt;&lt;P&gt;I can't believe there's not another more pratical solution...&lt;BR /&gt;I will appreciate any and every suggestion!&lt;BR /&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Paolo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 09:39:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87171#M5045</guid>
      <dc:creator>PaoloPensalfini</dc:creator>
      <dc:date>2016-01-22T09:39:38Z</dc:date>
    </item>
    <item>
      <title>Re: use multiple fileds as primary/foreign key</title>
      <link>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87172#M5046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you talking about this? &lt;A href="http://desktop.arcgis.com/en/desktop/latest/manage-data/relationships/appending-related-fields-with-a-join.htm" title="http://desktop.arcgis.com/en/desktop/latest/manage-data/relationships/appending-related-fields-with-a-join.htm"&gt;Appending related fields with a join—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;P&gt;or are you looking for a way for a persistent field?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 09:59:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87172#M5046</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-01-22T09:59:15Z</dc:date>
    </item>
    <item>
      <title>Re: use multiple fileds as primary/foreign key</title>
      <link>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87173#M5047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan for your answer but...it's not exactly what I need, I think.&lt;/P&gt;&lt;P&gt;I'm sorry for my english....I try to explain me better. &lt;/P&gt;&lt;P&gt;I want to join (or relate...it doesn't matter) the feature class "Parcel" with the external table "Parcelinfo". "Parcel" has got three fields:"&lt;STRONG&gt;A&lt;/STRONG&gt;"(Administrative_Unit code), "&lt;STRONG&gt;B"&lt;/STRONG&gt; (Parcel Number), "&lt;STRONG&gt;C"&lt;/STRONG&gt; (Cadastrian sheet number). Separately they aren't unique and they can't be my primary key. Instead, the concatenation's content of A+B+C creates a unique primary key. I've got the same situation in the Parcels' table. &lt;/P&gt;&lt;P&gt;Is there a way to tell ArcGIS that there's not a unique field as a primary key, but the primary key is created using three fields (A+B+C)?&amp;nbsp; Can I do that without phisically creating a new field with the content of A+B+C?&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;&lt;P&gt;Paolo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 11:13:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87173#M5047</guid>
      <dc:creator>PaoloPensalfini</dc:creator>
      <dc:date>2016-01-22T11:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: use multiple fileds as primary/foreign key</title>
      <link>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87174#M5048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I couldn't find one... you might want to scroll through the tools in the toolbox tree to see if you can find one.&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/main/tools/a-quick-tour-of-geoprocessing-tool-references.htm" title="http://desktop.arcgis.com/en/desktop/latest/main/tools/a-quick-tour-of-geoprocessing-tool-references.htm"&gt;A quick tour of geoprocessing tool references—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 11:21:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87174#M5048</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-01-22T11:21:38Z</dc:date>
    </item>
    <item>
      <title>Re: use multiple fileds as primary/foreign key</title>
      <link>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87175#M5049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you are not allowed to add an additional field with the result of concatenating the 3 fields and cannot change the content of an additional field, you could use a script to obtain the information, but that will write the obtained information to (additional) fields. If it should be a join or relate that only exists in memory in a session of ArcMap, this will not be an option. Depending of the source format of the data, maybe &lt;A href="http://desktop.arcgis.com/en/desktop/latest/map/working-with-layers/creating-a-query-layer.htm" title="http://desktop.arcgis.com/en/desktop/latest/map/working-with-layers/creating-a-query-layer.htm"&gt;Creating a query layer—Help | ArcGIS for Desktop&lt;/A&gt; is a solution for you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 11:32:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87175#M5049</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2016-01-22T11:32:31Z</dc:date>
    </item>
    <item>
      <title>Re: use multiple fileds as primary/foreign key</title>
      <link>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87176#M5050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe you are referring to composite keys.&amp;nbsp; I know you can do this when working with data table,&amp;nbsp; I generally separate my tabular data from the geometry use the composite form of the type database you are using to reference multiple column primary keys.... an example:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;CREATE&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;TABLE&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; Persons
&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;
&amp;nbsp; P_Id int &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;NOT&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;NULL&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;
&amp;nbsp; LastName varchar&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000;"&gt;255&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;NOT&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;NULL&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;
&amp;nbsp; FirstName varchar&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000;"&gt;255&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;),&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;
&amp;nbsp; Address varchar&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000;"&gt;255&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;),&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;
&amp;nbsp; City varchar&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #800000;"&gt;255&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;),&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;
&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;CONSTRAINT&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; pk_PersonID &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;PRIMARY&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #00008b;"&gt;KEY&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;P_Id&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;LastName&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;
&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/CODE&gt;
&lt;SPAN class="pun" style="color: #000000;"&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I am not sure, however, if a feature class can do this?&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 23:20:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87176#M5050</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2021-12-10T23:20:19Z</dc:date>
    </item>
    <item>
      <title>Re: use multiple fileds as primary/foreign key</title>
      <link>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87177#M5051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Another thought came to me, create a view of the data and use a composite index for the view.... then at least your concatenations would be automated and indexed &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jan 2016 16:09:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87177#M5051</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2016-01-22T16:09:15Z</dc:date>
    </item>
    <item>
      <title>Re: use multiple fileds as primary/foreign key</title>
      <link>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87178#M5052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks very much indeed for your answers!&lt;/P&gt;&lt;P&gt;I wished ESRI had found a direct solution to composite keys....but it seems they have not yet found it .&lt;/P&gt;&lt;P&gt;I've found something interesting in the "Spatial ETL" module: &lt;A href="https://knowledge.safe.com/articles/1124/creating-a-unique-identifier-crccalculator.html" title="https://knowledge.safe.com/articles/1124/creating-a-unique-identifier-crccalculator.html"&gt;Creating a Unique Identifier | CRCCalculator - FME Knowledge Center&lt;/A&gt; .&lt;/P&gt;&lt;P&gt;It's about&amp;nbsp; the creation (virtual? phisical? ...and above all: "on the fly"? I mean...in the meantime I create a new feature?) of "Natural keys" (&lt;A href="https://en.wikipedia.org/wiki/Natural_key" title="https://en.wikipedia.org/wiki/Natural_key"&gt;Natural key - Wikipedia, the free encyclopedia&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;I'm not sure it could be the solution; I think it's only another way to create a new phisical "ID field" made of a new string based on two or more fields' content.&lt;/P&gt;&lt;P&gt;I'll give it a try!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;@Ted: I'm not very expert in "data view" but it seems Arcgis creates a virtual view table so that I can't assign indexes (neither composite) to that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks again to everyone!&lt;BR /&gt;Paolo&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2016 08:40:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87178#M5052</guid>
      <dc:creator>PaoloPensalfini</dc:creator>
      <dc:date>2016-01-26T08:40:27Z</dc:date>
    </item>
    <item>
      <title>Re: use multiple fileds as primary/foreign key</title>
      <link>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87179#M5053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Very interesting article!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was not referring to the Arcgis data view but to create your view within your database itself (outside of ESRI products).&amp;nbsp; Then use this created view as a table within Arcgis ....&amp;nbsp; may be a little old fashion but in the few tests that I did it seems to work with creating an automatic concatenation of multiple fields to a unique key index.&amp;nbsp; This only works for all the tabular data fields (not the shape column).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2016 15:51:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87179#M5053</guid>
      <dc:creator>TedKowal</dc:creator>
      <dc:date>2016-01-26T15:51:48Z</dc:date>
    </item>
    <item>
      <title>Re: use multiple fileds as primary/foreign key</title>
      <link>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87180#M5054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Have you thought about doing a Relationship Class?&lt;/P&gt;&lt;P&gt;&lt;A href="http://desktop.arcgis.com/en/desktop/latest/manage-data/relationships/deciding-between-relationship-classes-joins-and-re.htm" title="http://desktop.arcgis.com/en/desktop/latest/manage-data/relationships/deciding-between-relationship-classes-joins-and-re.htm"&gt;Deciding between relationship classes, relates, and joins—Help | ArcGIS for Desktop&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jan 2016 18:54:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/data-management-questions/use-multiple-fileds-as-primary-foreign-key/m-p/87180#M5054</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-01-26T18:54:12Z</dc:date>
    </item>
  </channel>
</rss>

