<?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: SAS DDS for Insurance - Logic behind creating RK? in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DDS-for-Insurance-Logic-behind-creating-RK/m-p/581102#M17794</link>
    <description>&lt;P&gt;An RK – a retained key – is a type of surrogate key (non-intelligent/artificial key) that remains the same (retained/persist/durable) when a record in a table is changed. RKs (e.g. party_rk) are generated based on a business key (e.g. party_id plus additional business attributes that define a unique instance of a party) and are usually part of&amp;nbsp; a composite primary key in a table that tracks changes of over time. That other part of the composite key is typical a date/time based column. Let’s take a simplified example from health insurance using a party table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;party_rk&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;valid_from_dttm&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;party_id&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;party_type_cd&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;valid_to_dttm&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Party_status_cd&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;1&lt;/STRONG&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;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Member&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Past&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;party_rk&lt;/STRONG&gt; is the retained key&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;party_rk + valid-from_dttm&lt;/STRONG&gt; is the primary key&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;party_id&lt;/STRONG&gt; is a non-composite business key (business keys can be composites too, e.g. name + birthday + gender). Business keys are sometimes called natural keys.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;party_status_cd&lt;/STRONG&gt; a column for which values have changed over time for an instance of a business key&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whenever a value of a business key changes or a new one gets introduced a new RK will be generated. The reason why we don’t use business keys as part of the primary key is because they are often unstable: subject to change if business rules change; difficult to construct if they are sourced from multiple places (especially true for data warehouses); have a tendency to changes values &amp;nbsp;over time and sometimes getting reused.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case of the&amp;nbsp;&lt;STRONG&gt;insurance&lt;/STRONG&gt;_&lt;STRONG&gt;policy &lt;/STRONG&gt;table the &lt;STRONG&gt;policy_rk&lt;/STRONG&gt; can be generated based on any unique combination of non-key attributes (excludes &lt;STRONG&gt;policy_rk&lt;/STRONG&gt; and &lt;STRONG&gt;valid_from_dttm&lt;/STRONG&gt;)&amp;nbsp; that are candidates for a unique business key, and this can be different from customer to customer. For instance, &lt;STRONG&gt;policy_no&lt;/STRONG&gt; could be a unique business key for one customer, and yet for another customer &lt;STRONG&gt;policy_no + policy_version &lt;/STRONG&gt;might represent a unique policy identifier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RKs are frequently used as part of the primary key design in normalized data warehouse and ODS implementations that manage history.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this answers the question about use of RKs in SAS DDSs.&lt;/P&gt;</description>
    <pubDate>Wed, 14 Aug 2019 13:28:52 GMT</pubDate>
    <dc:creator>gostan</dc:creator>
    <dc:date>2019-08-14T13:28:52Z</dc:date>
    <item>
      <title>SAS DDS for Insurance - Logic behind creating RK?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DDS-for-Insurance-Logic-behind-creating-RK/m-p/580381#M17755</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For those who are familier with SAS DDS model for insurance... Kindly let me know if we have a logic which could be followed to generate RK... for example: In the &lt;STRONG&gt;Party&lt;/STRONG&gt; table we use&lt;STRONG&gt; Party_id&lt;/STRONG&gt; to generate &lt;STRONG&gt;Party_rk. &lt;/STRONG&gt;Similar to this do we have a method that could be followed to find all the business keys that could be refered to generate RK? Say for example I want to know all the Key combinations that should be considered to generate the &lt;STRONG&gt;Policy_Rk&lt;/STRONG&gt; in the &lt;STRONG&gt;Insurance&lt;/STRONG&gt; table ?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;BR /&gt;Sandeep&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 11 Aug 2019 07:26:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DDS-for-Insurance-Logic-behind-creating-RK/m-p/580381#M17755</guid>
      <dc:creator>sanalitics</dc:creator>
      <dc:date>2019-08-11T07:26:36Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DDS for Insurance - Logic behind creating RK?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DDS-for-Insurance-Logic-behind-creating-RK/m-p/581102#M17794</link>
      <description>&lt;P&gt;An RK – a retained key – is a type of surrogate key (non-intelligent/artificial key) that remains the same (retained/persist/durable) when a record in a table is changed. RKs (e.g. party_rk) are generated based on a business key (e.g. party_id plus additional business attributes that define a unique instance of a party) and are usually part of&amp;nbsp; a composite primary key in a table that tracks changes of over time. That other part of the composite key is typical a date/time based column. Let’s take a simplified example from health insurance using a party table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;party_rk&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;valid_from_dttm&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;party_id&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;party_type_cd&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;valid_to_dttm&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;Party_status_cd&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;P&gt;&lt;STRONG&gt;1&lt;/STRONG&gt;&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;01/01/2000&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;ABC&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Provider&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;01/31/2000&lt;/P&gt;&lt;/TD&gt;&lt;TD&gt;&lt;P&gt;Non-certified&lt;/P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G&gt;party_rk&lt;/STRONG&gt; is the retained key&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;party_rk + valid-from_dttm&lt;/STRONG&gt; is the primary key&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;party_id&lt;/STRONG&gt; is a non-composite business key (business keys can be composites too, e.g. name + birthday + gender). Business keys are sometimes called natural keys.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;party_status_cd&lt;/STRONG&gt; a column for which values have changed over time for an instance of a business key&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whenever a value of a business key changes or a new one gets introduced a new RK will be generated. The reason why we don’t use business keys as part of the primary key is because they are often unstable: subject to change if business rules change; difficult to construct if they are sourced from multiple places (especially true for data warehouses); have a tendency to changes values &amp;nbsp;over time and sometimes getting reused.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In case of the&amp;nbsp;&lt;STRONG&gt;insurance&lt;/STRONG&gt;_&lt;STRONG&gt;policy &lt;/STRONG&gt;table the &lt;STRONG&gt;policy_rk&lt;/STRONG&gt; can be generated based on any unique combination of non-key attributes (excludes &lt;STRONG&gt;policy_rk&lt;/STRONG&gt; and &lt;STRONG&gt;valid_from_dttm&lt;/STRONG&gt;)&amp;nbsp; that are candidates for a unique business key, and this can be different from customer to customer. For instance, &lt;STRONG&gt;policy_no&lt;/STRONG&gt; could be a unique business key for one customer, and yet for another customer &lt;STRONG&gt;policy_no + policy_version &lt;/STRONG&gt;might represent a unique policy identifier.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;RKs are frequently used as part of the primary key design in normalized data warehouse and ODS implementations that manage history.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this answers the question about use of RKs in SAS DDSs.&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 13:28:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DDS-for-Insurance-Logic-behind-creating-RK/m-p/581102#M17794</guid>
      <dc:creator>gostan</dc:creator>
      <dc:date>2019-08-14T13:28:52Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DDS for Insurance - Logic behind creating RK?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DDS-for-Insurance-Logic-behind-creating-RK/m-p/581110#M17797</link>
      <description>&lt;P&gt;Hi Gosten... Thanks for the response and welcome to the group &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Below statement&lt;/EM&gt; of your helps... For the insurance policy, validating the correct combination of Business keys for generating RK is the challenge I have .. it all depends on the source details though... agree .. let me know if you have some standard model with the business key details for each DDS table that could be referred... I undersatnd that it might not be appropriate for all cases though&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;In case of the&amp;nbsp;&lt;STRONG&gt;insurance&lt;/STRONG&gt;_&lt;STRONG&gt;policy &lt;/STRONG&gt;table the &lt;STRONG&gt;policy_rk&lt;/STRONG&gt; can be generated based on any unique combination of non-key attributes (excludes &lt;STRONG&gt;policy_rk&lt;/STRONG&gt; and &lt;STRONG&gt;valid_from_dttm&lt;/STRONG&gt;)&amp;nbsp; that are candidates for a unique business key, and this can be different from customer to customer. For instance, &lt;STRONG&gt;policy_no&lt;/STRONG&gt; could be a unique business key for one customer, and yet for another customer &lt;STRONG&gt;policy_no + policy_version &lt;/STRONG&gt;might represent a unique policy identifier&lt;/EM&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 14 Aug 2019 13:53:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DDS-for-Insurance-Logic-behind-creating-RK/m-p/581110#M17797</guid>
      <dc:creator>sanalitics</dc:creator>
      <dc:date>2019-08-14T13:53:41Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DDS for Insurance - Logic behind creating RK?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DDS-for-Insurance-Logic-behind-creating-RK/m-p/581325#M17804</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;EM&gt;In case of the&amp;nbsp;&lt;STRONG&gt;insurance&lt;/STRONG&gt;_&lt;STRONG&gt;policy &lt;/STRONG&gt;table the &lt;STRONG&gt;policy_rk&lt;/STRONG&gt; can be generated based on any unique combination of non-key attributes (excludes &lt;STRONG&gt;policy_rk&lt;/STRONG&gt; and &lt;STRONG&gt;valid_from_dttm&lt;/STRONG&gt;)&amp;nbsp; that are candidates for a unique business key, and this can be different from customer to customer. For instance, &lt;STRONG&gt;policy_no&lt;/STRONG&gt; could be a unique business key for one customer, and yet for another customer &lt;STRONG&gt;policy_no + policy_version &lt;/STRONG&gt;might represent a unique policy identifier&lt;/EM&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;It's nothing out of the ordinary that you need site specific amendments for a generic load template and data model so I wouldn't consider this an issue.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For your example above: You could eventually use {policy_no, policy_version} as business key in the load template. If at a specific site policy_version is constant or missing then no change is required.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 00:59:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DDS-for-Insurance-Logic-behind-creating-RK/m-p/581325#M17804</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2019-08-15T00:59:09Z</dc:date>
    </item>
    <item>
      <title>Re: SAS DDS for Insurance - Logic behind creating RK?</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/SAS-DDS-for-Insurance-Logic-behind-creating-RK/m-p/581354#M17805</link>
      <description>&lt;P&gt;Thanks for the clarification Patrick &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Aug 2019 07:30:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/SAS-DDS-for-Insurance-Logic-behind-creating-RK/m-p/581354#M17805</guid>
      <dc:creator>sanalitics</dc:creator>
      <dc:date>2019-08-15T07:30:09Z</dc:date>
    </item>
  </channel>
</rss>

