<?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: What makes a &amp;quot;Perfect Key&amp;quot;? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/What-makes-a-quot-Perfect-Key-quot/m-p/207806#M63444</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is kind of funny, because Miguel [original poster] is the author of that book!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 30 May 2016 23:37:01 GMT</pubDate>
    <dc:creator>alexdataiq</dc:creator>
    <dc:date>2016-05-30T23:37:01Z</dc:date>
    <item>
      <title>What makes a "Perfect Key"?</title>
      <link>https://community.qlik.com/t5/QlikView/What-makes-a-quot-Perfect-Key-quot/m-p/207802#M63440</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;Going through one of the Demos, I stumbled upon a concept that I'm curious to know about: 'Perfect Keys'.&lt;/P&gt;&lt;P&gt;So far, I have seen three types of keys: Primary Key, Perfect Key and Key. What are the differences among those? Is there any other type? Does a Perfect Key make a model more efficient?&lt;/P&gt;&lt;P&gt;This is a screenshot showing the 'Perfect Key' Legend:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1360_sourceID:1360" /&gt;&lt;/P&gt;&lt;P&gt;and this one is showing only 'Key':&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-1361_sourceID:1361" /&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for sharing your knowledge about this.&lt;/P&gt;&lt;P&gt;Mike.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 17:36:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-makes-a-quot-Perfect-Key-quot/m-p/207802#M63440</guid>
      <dc:creator>mike_garcia</dc:creator>
      <dc:date>2010-04-08T17:36:14Z</dc:date>
    </item>
    <item>
      <title>What makes a "Perfect Key"?</title>
      <link>https://community.qlik.com/t5/QlikView/What-makes-a-quot-Perfect-Key-quot/m-p/207803#M63441</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;While I don't actually &lt;EM&gt;know&lt;/EM&gt; the answers, with a brief glance at some sample tables, it looks like they're defined as follows:&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;Primary Perfect&lt;BR /&gt;Key Key Key&lt;BR /&gt;Y Y Y Links two or more tables together?&lt;BR /&gt; Y Y Corresponds to one and only one row of the table?&lt;BR /&gt; Y Every value of key field appears in the table?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Apr 2010 21:29:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-makes-a-quot-Perfect-Key-quot/m-p/207803#M63441</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2010-04-08T21:29:38Z</dc:date>
    </item>
    <item>
      <title>Re: What makes a "Perfect Key"?</title>
      <link>https://community.qlik.com/t5/QlikView/What-makes-a-quot-Perfect-Key-quot/m-p/207804#M63442</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;From the Book QlikView 11 for Developers:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"The name of the field. Optionally, if the field is a key field, a qualifier is shown enclosed in square brackets. This qualifier indicates the following levels of key quality:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Perfect Key] indicates that every row contains a key value, and that all of these key values are unique. At the same time, the field's subset ratio is 100 percent. This qualifier should be seen in dimension tables, where every key should uniquely identify a single record.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Primary Key] indicates that all key values are unique, but not every row contains a key value or the field's subset ratio is less&amp;nbsp; than 100 percent&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[Key] indicates that the key is not unique. This qualifier is usually seen in fact tables, where the same dimension value may be associated with many different facts."&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 04:02:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-makes-a-quot-Perfect-Key-quot/m-p/207804#M63442</guid>
      <dc:creator />
      <dc:date>2014-11-04T04:02:17Z</dc:date>
    </item>
    <item>
      <title>Re: What makes a "Perfect Key"?</title>
      <link>https://community.qlik.com/t5/QlikView/What-makes-a-quot-Perfect-Key-quot/m-p/207805#M63443</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Perfect Key Vs Primary key:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The [Perfect Key] is a bit more: it is a [Primary Key] (unique) with no "orphans".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me clarify this with 2 examples:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;InvoiceDetails:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;InvoiceID, InvoiceLine, ProductID, Quantity, Amount&lt;/P&gt;&lt;P&gt;Inv001,1,PR01,10,50&lt;/P&gt;&lt;P&gt;Inv001,2,PR02,10,40&lt;/P&gt;&lt;P&gt;Inv002,1,PR01,30,150&lt;/P&gt;&lt;P&gt;Inv002,2,PR03,10,800&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoices:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;InvoiceID, ClientID&lt;/P&gt;&lt;P&gt;Inv001,CL0001&lt;/P&gt;&lt;P&gt;Inv002,CL0002&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, InvoiceID is &lt;STRONG&gt;[Key]&lt;/STRONG&gt; in InvoiceDetails and &lt;STRONG&gt;[Perfect Key]&lt;/STRONG&gt; in Invoices: it is unique and it has no orphans.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example 2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;InvoiceDetails:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;InvoiceID, InvoiceLine, ProductID, Quantity, Amount&lt;/P&gt;&lt;P&gt;Inv001,1,PR01,10,50&lt;/P&gt;&lt;P&gt;Inv001,2,PR02,10,40&lt;/P&gt;&lt;P&gt;Inv002,1,PR01,30,150&lt;/P&gt;&lt;P&gt;Inv002,2,PR03,10,800&lt;/P&gt;&lt;P&gt;Inv003,1,PR01,10,50&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Invoices:&lt;/P&gt;&lt;P&gt;LOAD *&lt;/P&gt;&lt;P&gt;INLINE [&lt;/P&gt;&lt;P&gt;InvoiceID, ClientID&lt;/P&gt;&lt;P&gt;Inv001,CL0001&lt;/P&gt;&lt;P&gt;Inv002,CL0002&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this example, InvoiceID is &lt;STRONG&gt;[Key]&lt;/STRONG&gt; in InvoiceDetails and &lt;STRONG&gt;[Primary Key]&lt;/STRONG&gt; in Invoices. There is a value in InvoiceDetails, &lt;STRONG&gt;Inv003,&lt;/STRONG&gt; that does not find a corresponding value in the Invoices table. This is called a "orphan". For this reason&lt;SPAN style="text-decoration: underline;"&gt; InvoiceID is not anymore perfect, but it is still primary&lt;/SPAN&gt;, because it is unique.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you copy-paste the example you can verify it&lt;/P&gt;&lt;P&gt; BR,&lt;/P&gt;&lt;P&gt;Chinna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Nov 2014 05:32:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-makes-a-quot-Perfect-Key-quot/m-p/207805#M63443</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-11-04T05:32:40Z</dc:date>
    </item>
    <item>
      <title>Re: What makes a "Perfect Key"?</title>
      <link>https://community.qlik.com/t5/QlikView/What-makes-a-quot-Perfect-Key-quot/m-p/207806#M63444</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is kind of funny, because Miguel [original poster] is the author of that book!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 30 May 2016 23:37:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/What-makes-a-quot-Perfect-Key-quot/m-p/207806#M63444</guid>
      <dc:creator>alexdataiq</dc:creator>
      <dc:date>2016-05-30T23:37:01Z</dc:date>
    </item>
  </channel>
</rss>

