<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>Sikushima</author_name>
  <author_url>https://blog.hatena.ne.jp/Sikushima/</author_url>
  <blog_title>SQLer 生島勘富 のブログ</blog_title>
  <blog_url>https://sikushima.hatenablog.com/</blog_url>
  <categories>
    <anon>システム設計</anon>
    <anon>SQL中級・上級</anon>
  </categories>
  <description>完全に新規の案件というのは本当に少ないので、実践できることはほぼない理想論ですが、私の理想とするテーブル構造と命名法です。 まずは、サロゲートキーについて サロゲートキーというのは業務上意味のないキーのことです。 例えば、生徒テーブルは、年次・クラスID・生徒番号で一意になるとしましょう。 この「年次・クラスID・生徒番号」の複合キーを主キーとせずに、システム側で採番した一意な値を主キーとすることをサロゲートキーといいます。 「年次・クラスID・生徒番号」はナチュラルキーといいます。 基本は全テーブルをサロゲートキーにする方が効率的です。 サロゲートキーを使わない例外 私なりの基準は関係テーブ…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fsikushima.hatenablog.com%2Fentry%2F20111125%2F1322187990&quot; title=&quot;命名法  - 主キーはサロゲートキーで、テーブル名はナチュラルキーで（笑） - SQLer 生島勘富 のブログ&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2011-11-25 11:26:30</published>
  <title>命名法  - 主キーはサロゲートキーで、テーブル名はナチュラルキーで（笑）</title>
  <type>rich</type>
  <url>https://sikushima.hatenablog.com/entry/20111125/1322187990</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
