<p>Hello,</p>
<p>Thank you for your time.</p>
<p>I have tables of temporal (bi-temporal, to more precise) data, so a record's states usually imply multiple rows indicating all the states of each record in time. That's why I decided to make a triple PK (<code>id</code> + <code>known_from</code> + <code>valid_from</code>).</p>
<p>I was too innocent thinking it would be a wise idea to identify a record by a triple of fields only. Actually, I've implemented it in my database, but then I had to make this key unique and consider the <code>id</code> field as a single-field PK and added a <code>XXX_id</code> (where XXX is the same as the table's name) field to identify the instance. It turned out to be giving some pain in further developments, so I had to fall back to the idea of the single-fielded PK (identifying a row itself).</p>
<p>Anyhow, thank you for your attention. Will be looking forward for more cool news about the project, I'm a big fan and a grateful user of DBIx::Class. :)</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">&mdash;<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/Perl5/DBIx-Class/pull/122#issuecomment-360228546">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AASeAqgTxsIdK0Gw9Pv9a2hQgsAQu_TKks5tN3Y-gaJpZM4QfZrv">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AASeAm9U35cBtGNxr87tfjbZbTz0LHf2ks5tN3Y-gaJpZM4QfZrv.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/Perl5/DBIx-Class/pull/122#issuecomment-360228546"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/Perl5/DBIx-Class","title":"Perl5/DBIx-Class","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/Perl5/DBIx-Class"}},"updates":{"snippets":[{"icon":"PERSON","message":"@melnik13 in #122: Hello,\r\n\r\nThank you for your time.\r\n\r\nI have tables of temporal (bi-temporal, to more precise) data, so a record's states usually imply multiple rows indicating all the states of each record in time. That's why I decided to make a triple PK (`id` + `known_from` + `valid_from`).\r\n\r\nI was too innocent thinking it would be a wise idea to identify a record by a triple of fields only. Actually, I've implemented it in my database, but then I had to make this key unique and consider the `id` field as a single-field PK and added a `XXX_id` (where XXX is the same as the table's name) field to identify the instance. It turned out to be giving some pain in further developments, so I had to fall back to the idea of the single-fielded PK (identifying a row itself).\r\n\r\nAnyhow, thank you for your attention. Will be looking forward for more cool news about the project, I'm a big fan and a grateful user of DBIx::Class. :)\r\n"}],"action":{"name":"View Pull Request","url":"https://github.com/Perl5/DBIx-Class/pull/122#issuecomment-360228546"}}}</script>