Author Topic: Para saan ba ang surrogate key ? And how do we use it?  (Read 82 times)

0 Members and 1 Guest are viewing this topic.

Offline TDelight

  • Newbie
  • *
  • Posts: 40
  • Karma: +0/-0
    • View Profile
Para saan ba ang surrogate key ? And how do we use it?
« on: September 09, 2014, 02:43:44 AM »
I am pretty new to datawarehouse. There's this concept of surrogate key. What is it for? and how do use it?

Techronnati | where technology never sleeps

Para saan ba ang surrogate key ? And how do we use it?
« on: September 09, 2014, 02:43:44 AM »

Mountain View

Offline Transformer10

  • Full Member
  • *
  • Posts: 104
  • Karma: +0/-0
    • View Profile
Re: Para saan ba ang surrogate key ? And how do we use it?
« Reply #1 on: September 09, 2014, 09:00:38 AM »
A surrogate key is any column or set of columns that can be declared as the primary key instead of a "real" or natural key. Sometimes there can be several natural keys that could be declared as the primary key, and these are all called candidate keys.So a surrogate is a candidate key. A table could actually have more than one surrogate key, although this would be unusual. The most common type of surrogate key is an incrementing integer, such as an auto_increment column in MySQL, or a sequence in Oracle, or an identity column in SQL Server.Use of surrogate key:Every join between dimension tables and fact tables in a data warehouse environment should be based on surrogate keys, not natural keys. It is up to the data extract logic to systematically look up and replace every incoming natural key with a data warehouse surrogate key each time either a dimension record or a fact record is brought into the data warehouse environment.
« Last Edit: September 09, 2014, 09:04:05 AM by Transformer10 »

Offline MrSpecialist

  • Sr. Member
  • *
  • Posts: 342
  • Karma: +1/-0
  • I'm an expert!
    • View Profile
Re: Para saan ba ang surrogate key ? And how do we use it?
« Reply #2 on: September 09, 2014, 09:06:36 AM »
@TDDelight,

Just for you to know, Surrogate key is a numeric or integer value in a table to identify each row uniquely. Primary key and surrogate key are same but surrogate key is a system generated value has a define incremental value for each row in a table. Surrogate key does not have any business importance for the value it holds but primary key has a significant business value.

 

Related Topics


Posting Disclaimer: Any individual may post a message in this forum and may do so anonymously. Therefore, the sole author is exclusively and entirely responsible for all opinions in that message. They do not represent the official opinions of Techronnati, its administrators or moderators or the Techronnati Management. Techronnati is merely acting as an impartial conduit for constitutionally protected free speech and is not responsible and will not be held liable for the content of such messages. All images and service logos are trademarks of their respective owners.