Data Warehousing Community Forum
February 10, 2012, 12:57:01 am
Home
Help
Search
Login
Register
Data Warehousing Community Forum
>
Databases
>
Oracle
>
Difference bwn Primary Key, Unique Key and Surrogate Key
Pages: [
1
]
Go Down
« previous
next »
Print
Author
Topic: Difference bwn Primary Key, Unique Key and Surrogate Key (Read 985 times)
Sowjanya
DW Fresher
Reputation: +1/-0
Offline
Posts: 9
Difference bwn Primary Key, Unique Key and Surrogate Key
«
on:
December 12, 2007, 05:37:56 pm »
Hi
can anyone help me in explaining the difference between Primary Key, Unique Key and Surrogate key?
Thanks
Sowjanya
Logged
Sipra
Founder
Reputation: +59/-0
Offline
Posts: 323
Am the King...
Re: Difference bwn Primary Key, Unique Key and Surrogate Key
«
Reply #1 on:
December 13, 2007, 03:13:03 pm »
Simple definitions for Primary Key, Unique Key and Surrogate Key --
Primary Key -
A primary key is used to uniquely identify each row in a table.
A primary key value cannot be NULL
Unique Key -
It is also defined similar to that of primary key with the following difference -
Unique keys are the keys where the implicit NOT NULL constraint is not automatically enforced, while for primary keys it ispresenet. Thus, the values in a unique key columns may or may not be NULL.
Surrogate Key -
A surrogate key is a artificial synthetic key which has same meaning through out the database. It is system generated key with no business value. Usually implemented with database generated sequences.
Hope this helps to some extent...!
Logged
Sipra
Founder
www.dwforum.net
Sowjanya
DW Fresher
Reputation: +1/-0
Offline
Posts: 9
Re: Difference bwn Primary Key, Unique Key and Surrogate Key
«
Reply #2 on:
December 13, 2007, 03:31:58 pm »
Thanks a lot Sipra
Logged
Pages: [
1
]
Go Up
Print
« previous
next »
Jump to:
Please select a destination:
-----------------------------
General Category
-----------------------------
=> Introductions
=> Anouncements & News
=> Suggestions
=> General Discussion
=> Job Opportunities
-----------------------------
Data Warehousing
-----------------------------
=> Data Warehousing Concepts
=> Data Modeling
-----------------------------
Databases
-----------------------------
=> Oracle
===> PL/SQL
=> Microsoft SQL Server
=> IBM DB2
=> Teradata
-----------------------------
ETL Tools
-----------------------------
=> Informatica
===> Installation & Configuration
=> Data Stage
=> Ab Initio
=> Oracle Warehouse Builder
=> DTS/SSIS
-----------------------------
Reporting Tools
-----------------------------
=> Business Objects
=> Cognos
=> Crystal Reports
=> Hyperion
=> Brio
=> Microstrategy
-----------------------------
Operating Systems
-----------------------------
=> UNIX / Linux
===> Unix Shell Scripting
=> Windows
-----------------------------
Other Technologies & Tools
-----------------------------
=> JAVA