<?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 Trying to represent an weak entity in qlikview database in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Trying-to-represent-an-weak-entity-in-qlikview-database/m-p/236366#M87562</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I have built an Relation Database and now i want QlikView to create it for me. &lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3699_sourceID:3699" /&gt;&lt;/P&gt;&lt;P&gt;The problem I got is that I think don't know how to get the "foreign keys". In the LoadScript I am using the following code, but the foreigns keys aren't correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;post:&lt;BR /&gt;&lt;BR /&gt;LOAD *&lt;BR /&gt;INLINE [&lt;BR /&gt;postId, date, title, postEmotion&lt;BR /&gt;'1', '2010-02-01', 'About this apple.', ''&lt;BR /&gt;];&lt;BR /&gt;sentence:&lt;BR /&gt;LOAD *&lt;BR /&gt;INLINE [&lt;BR /&gt;sentenceId, text, emotion, postId&lt;BR /&gt;'1', 'he like Spaghetti', 'pos', '1'&lt;BR /&gt; ];&lt;BR /&gt;topic:&lt;BR /&gt;LOAD *&lt;BR /&gt;INLINE [&lt;BR /&gt;topicId, topicName&lt;BR /&gt;'1', 'apple'&lt;BR /&gt;];&lt;BR /&gt;item:&lt;BR /&gt;LOAD *&lt;BR /&gt;INLINE [&lt;BR /&gt;itemId, itemName, topicId&lt;BR /&gt;'1', 'Spaghetti', 1'&lt;BR /&gt;];&lt;BR /&gt;sentenceitem:&lt;BR /&gt;LOAD *&lt;BR /&gt;INLINE [&lt;BR /&gt;sentenceId, itemId&lt;BR /&gt;'1', '1'&lt;BR /&gt;];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that someone can help me.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Anders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 02 Mar 2011 14:57:06 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-03-02T14:57:06Z</dc:date>
    <item>
      <title>Trying to represent an weak entity in qlikview database</title>
      <link>https://community.qlik.com/t5/QlikView/Trying-to-represent-an-weak-entity-in-qlikview-database/m-p/236366#M87562</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;I have built an Relation Database and now i want QlikView to create it for me. &lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3699_sourceID:3699" /&gt;&lt;/P&gt;&lt;P&gt;The problem I got is that I think don't know how to get the "foreign keys". In the LoadScript I am using the following code, but the foreigns keys aren't correct.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;post:&lt;BR /&gt;&lt;BR /&gt;LOAD *&lt;BR /&gt;INLINE [&lt;BR /&gt;postId, date, title, postEmotion&lt;BR /&gt;'1', '2010-02-01', 'About this apple.', ''&lt;BR /&gt;];&lt;BR /&gt;sentence:&lt;BR /&gt;LOAD *&lt;BR /&gt;INLINE [&lt;BR /&gt;sentenceId, text, emotion, postId&lt;BR /&gt;'1', 'he like Spaghetti', 'pos', '1'&lt;BR /&gt; ];&lt;BR /&gt;topic:&lt;BR /&gt;LOAD *&lt;BR /&gt;INLINE [&lt;BR /&gt;topicId, topicName&lt;BR /&gt;'1', 'apple'&lt;BR /&gt;];&lt;BR /&gt;item:&lt;BR /&gt;LOAD *&lt;BR /&gt;INLINE [&lt;BR /&gt;itemId, itemName, topicId&lt;BR /&gt;'1', 'Spaghetti', 1'&lt;BR /&gt;];&lt;BR /&gt;sentenceitem:&lt;BR /&gt;LOAD *&lt;BR /&gt;INLINE [&lt;BR /&gt;sentenceId, itemId&lt;BR /&gt;'1', '1'&lt;BR /&gt;];&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that someone can help me.&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Anders&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 14:57:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trying-to-represent-an-weak-entity-in-qlikview-database/m-p/236366#M87562</guid>
      <dc:creator />
      <dc:date>2011-03-02T14:57:06Z</dc:date>
    </item>
    <item>
      <title>Trying to represent an weak entity in qlikview database</title>
      <link>https://community.qlik.com/t5/QlikView/Trying-to-represent-an-weak-entity-in-qlikview-database/m-p/236367#M87563</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Anders,&lt;/P&gt;&lt;P&gt;There's no such thing as a "foreign key" in QlikView. It rather associates tables where at least (ideally just) one field is called likewise in both tables. So the values in Table A for field Key for the association to make sense must have a correspondent in field Key from Table B. Once you create the tables sharing one field with the same name, QlikView will associate them. Actually, your are going to see them as only one field with values corresponding to Table A and Table B.&lt;/P&gt;&lt;P&gt;In a very basic example, say there is only a value "A" in field Key in Table A and a value "B" in field Key in Table B, QlikView will associate them either, although returning nulls in you aggregations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;TableA:LOAD * INLINE [Key, AmountA, 200]; TableB:LOAD * INLINE [Key, CustomerB, Cust0001];&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;Drawing a chart using "Customer" as dimension and "Sum(Amount)" as expression will return 200 for null, since there is no possible association betwen both tables.&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 02 Mar 2011 15:22:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Trying-to-represent-an-weak-entity-in-qlikview-database/m-p/236367#M87563</guid>
      <dc:creator>Miguel_Angel_Baeyens</dc:creator>
      <dc:date>2011-03-02T15:22:03Z</dc:date>
    </item>
  </channel>
</rss>

