Data Modeling - Primary key

1 - About

A Primary Key identify:

  • the lowest level of an entity
  • the unique identifier of a single instance
  • doesn't change over time. If the primary key has a chance – however remote – of changing, well, then it is NOT the primary key. This would be like you changing your DNA halfway through your life.

3 - Sequence vs business key as primary key

Sequence as primary key

3.1 - Disadvantage

  • You can't search on the business key in an external table.
  • You need to do an extra action to get the primary key (join in SQL or show the information on the screen)

3.2 - Advantages

  • Gain on IO in the internal table but also in the external table
  • If the grain of a (external|dimension) table changes, you don't need to add a column in the fact table
  • Bookmark "Data Modeling - Primary key" at del.icio.us
  • Bookmark "Data Modeling - Primary key" at Digg
  • Bookmark "Data Modeling - Primary key" at Ask
  • Bookmark "Data Modeling - Primary key" at Google
  • Bookmark "Data Modeling - Primary key" at StumbleUpon
  • Bookmark "Data Modeling - Primary key" at Technorati
  • Bookmark "Data Modeling - Primary key" at Live Bookmarks
  • Bookmark "Data Modeling - Primary key" at Yahoo! Myweb
  • Bookmark "Data Modeling - Primary key" at Facebook
  • Bookmark "Data Modeling - Primary key" at Yahoo! Bookmarks
  • Bookmark "Data Modeling - Primary key" at Twitter
  • Bookmark "Data Modeling - Primary key" at myAOL
data_modeling/primary_key.txt · Last modified: 2017/01/20 21:00 by gerardnico