what is the difference between primarykey,naturalkey ,candidatekey and Surrogate key with some example
-
2012년 3월 13일 화요일 오전 8:51
Hi all
I just migrated to datawarehousing domain from .net
I need some help in understaind the difference between keys used in datawarehousing...
Somebody please explain me what is the difference between primarykey,naturalkey ,candidatekey and Surrogate key
with some example.ilikemicrosoft
모든 응답
-
2012년 3월 14일 수요일 오전 4:10
Please find the below links which gives you enough information.
http://www.agiledata.org/essays/keys.html
Tinto
- 답변으로 제안됨 Jerry NeeModerator 2012년 3월 20일 화요일 오전 10:07
- 답변으로 표시됨 Jerry NeeModerator 2012년 3월 22일 목요일 오전 10:39
-
2012년 3월 14일 수요일 오전 6:07
primarykey: unique not null column(s) which can be used to identify each row in the table individually
naturalkey: A column with values such that they can be used directly as the attribute key to lookup dimension to fact relationship. e,g countrycode uk (iso format)
candidatekey: A Group of column which in combination can be used to identify each row individually
and Surrogate key:- A user defined key which will help uniquely identify each row where the application does not provide one.
- 답변으로 제안됨 Jerry NeeModerator 2012년 3월 20일 화요일 오전 10:07
- 답변으로 표시됨 Jerry NeeModerator 2012년 3월 22일 목요일 오전 10:39
-
2012년 3월 14일 수요일 오전 11:28
Hi,
check the below link for a couple of excellent answers on all types of keys, one with SQL code (which columns can be selected as which key).
=========================================
Please mark as answer if helpful
- 편집됨 Dhanumjay K 2012년 3월 14일 수요일 오전 11:31
- 답변으로 제안됨 Jerry NeeModerator 2012년 3월 20일 화요일 오전 10:07
- 답변으로 표시됨 Jerry NeeModerator 2012년 3월 22일 목요일 오전 10:39
-
2012년 7월 30일 월요일 오전 7:41
You can follow this link for details about Keys in SQL Server
http://www.dotnet-tricks.com/Tutorial/sqlserver/GcF9120312-Different-Types-of-SQL-Keys.html

