![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I've been researching what Natural and Surrogate keys are in the web and really can't find a straight and clear answer. Does anyone want to take a crack at it? |
#3
| |||
| |||
|
|
-----Original Message----- A surrogate key is a unique identifier assigned to a entity in a dimension table. it has no real-world meaning. A natural key identifies an entity in the real-world Its probably better explained with an example. A bank may have a data warehouse relating to all its customers - for argument's sake lets say they identify all those users by their account number (call it account_no). When the custotmers are loaded into the appropriate dimension table they will be assigned a number (call it CustID) that uniquely identifies that record. If you are modelling your customer dimension as a type-2 dimension then you may find that you will later load a second record in for a particular user. That record would contain the same account_no but would have a new CustID assigned. [Don't worry about that a type-2 dimension is for now.] In this example account_no is the natural key and CustID is the surrogate key. Thats my interpretation of them anyway. Hope I haven't baffled you. Regards Jamie Thomson http://www.conchango.com "anonymous (AT) discussions (DOT) microsoft.com" wrote: I've been researching what Natural and Surrogate keys are in the web and really can't find a straight and clear answer. Does anyone want to take a crack at it? . |
#4
| |||
| |||
|
|
OK, so you are saying that the surrogate key is basically an identity that really has no meaning, no rhyme or reason or relationship to anything? -----Original Message----- A surrogate key is a unique identifier assigned to a entity in a dimension table. it has no real-world meaning. A natural key identifies an entity in the real-world Its probably better explained with an example. A bank may have a data warehouse relating to all its customers - for argument's sake lets say they identify all those users by their account number (call it account_no). When the custotmers are loaded into the appropriate dimension table they will be assigned a number (call it CustID) that uniquely identifies that record. If you are modelling your customer dimension as a type-2 dimension then you may find that you will later load a second record in for a particular user. That record would contain the same account_no but would have a new CustID assigned. [Don't worry about that a type-2 dimension is for now.] In this example account_no is the natural key and CustID is the surrogate key. Thats my interpretation of them anyway. Hope I haven't baffled you. Regards Jamie Thomson http://www.conchango.com "anonymous (AT) discussions (DOT) microsoft.com" wrote: I've been researching what Natural and Surrogate keys are in the web and really can't find a straight and clear answer. Does anyone want to take a crack at it? . |
#5
| |||
| |||
|
|
Correct. It has no real-word meaning. Regards Jamie Thomson "anonymous (AT) discussions (DOT) microsoft.com" wrote: OK, so you are saying that the surrogate key is basically an identity that really has no meaning, no rhyme or reason or relationship to anything? -----Original Message----- A surrogate key is a unique identifier assigned to a entity in a dimension table. it has no real-world meaning. A natural key identifies an entity in the real-world Its probably better explained with an example. A bank may have a data warehouse relating to all its customers - for argument's sake lets say they identify all those users by their account number (call it account_no). When the custotmers are loaded into the appropriate dimension table they will be assigned a number (call it CustID) that uniquely identifies that record. If you are modelling your customer dimension as a type-2 dimension then you may find that you will later load a second record in for a particular user. That record would contain the same account_no but would have a new CustID assigned. [Don't worry about that a type-2 dimension is for now.] In this example account_no is the natural key and CustID is the surrogate key. Thats my interpretation of them anyway. Hope I haven't baffled you. Regards Jamie Thomson http://www.conchango.com "anonymous (AT) discussions (DOT) microsoft.com" wrote: I've been researching what Natural and Surrogate keys are in the web and really can't find a straight and clear answer. Does anyone want to take a crack at it? . |
![]() |
| Thread Tools | |
| Display Modes | |
| |