Click here to Skip to main content
15,900,108 members
Home / Discussions / Database
   

Database

 
GeneralRe: Oracle Pin
Abhinav S16-Mar-10 1:23
Abhinav S16-Mar-10 1:23 
AnswerRe: Oracle Pin
dan!sh 16-Mar-10 0:45
professional dan!sh 16-Mar-10 0:45 
QuestionPrimary key Pin
netJP12L15-Mar-10 7:03
netJP12L15-Mar-10 7:03 
AnswerRe: Primary key Pin
Not Active15-Mar-10 7:26
mentorNot Active15-Mar-10 7:26 
AnswerRe: Primary key Pin
SilimSayo15-Mar-10 7:48
SilimSayo15-Mar-10 7:48 
GeneralRe: Primary key Pin
Jörgen Andersson15-Mar-10 8:36
professionalJörgen Andersson15-Mar-10 8:36 
GeneralRe: Primary key Pin
Corporal Agarn15-Mar-10 8:48
professionalCorporal Agarn15-Mar-10 8:48 
GeneralRe: Primary key Pin
Jörgen Andersson15-Mar-10 9:36
professionalJörgen Andersson15-Mar-10 9:36 
One of the key requirements for a primary key is that it must not change over time, and one of the best ways to achieve this is to use a surrogate key. Preferably an integer as most databases are tuned for queries on integers.
As it's only a part of the plumbing, the surrogate key has no need to ever be visible outside the DB. In particular, it should never be revealed to the user. This allows the DB administrator to change the representation of the keys at will if necessary.

I can think of very few circumstances when there's a sense in making a key visible to the end user. For example when it's used as a parameter in webpage request.
"When did ignorance become a point of view" - Dilbert

GeneralRe: Primary key Pin
Luc Pattyn15-Mar-10 9:52
sitebuilderLuc Pattyn15-Mar-10 9:52 
GeneralRe: Primary key Pin
Not Active15-Mar-10 10:54
mentorNot Active15-Mar-10 10:54 
AnswerRe: Primary key Pin
Corporal Agarn15-Mar-10 8:50
professionalCorporal Agarn15-Mar-10 8:50 
GeneralRe: Primary key Pin
netJP12L15-Mar-10 8:53
netJP12L15-Mar-10 8:53 
GeneralRe: Primary key Pin
Corporal Agarn15-Mar-10 8:56
professionalCorporal Agarn15-Mar-10 8:56 
GeneralRe: Primary key Pin
Luc Pattyn15-Mar-10 9:54
sitebuilderLuc Pattyn15-Mar-10 9:54 
Question.NET raises Native exception in SQL Compact on WinCE Pin
hairy_hats15-Mar-10 2:45
hairy_hats15-Mar-10 2:45 
AnswerRe: .NET raises Native exception in SQL Compact on WinCE Pin
Covean15-Mar-10 3:42
Covean15-Mar-10 3:42 
GeneralRe: .NET raises Native exception in SQL Compact on WinCE Pin
hairy_hats15-Mar-10 4:46
hairy_hats15-Mar-10 4:46 
GeneralRe: .NET raises Native exception in SQL Compact on WinCE Pin
Covean15-Mar-10 4:57
Covean15-Mar-10 4:57 
GeneralRe: .NET raises Native exception in SQL Compact on WinCE Pin
hairy_hats15-Mar-10 5:09
hairy_hats15-Mar-10 5:09 
GeneralRe: .NET raises Native exception in SQL Compact on WinCE Pin
Covean16-Mar-10 0:16
Covean16-Mar-10 0:16 
QuestionSheduling for send Mail Pin
lrsalunkhe14-Mar-10 20:50
lrsalunkhe14-Mar-10 20:50 
AnswerRe: Sheduling for send Mail Pin
Mycroft Holmes14-Mar-10 22:47
professionalMycroft Holmes14-Mar-10 22:47 
QuestionTranslate data from one schema to another Pin
treefirmy14-Mar-10 10:37
treefirmy14-Mar-10 10:37 
AnswerRe: Translate data from one schema to another Pin
Mycroft Holmes14-Mar-10 12:40
professionalMycroft Holmes14-Mar-10 12:40 
GeneralRe: Translate data from one schema to another Pin
treefirmy14-Mar-10 13:38
treefirmy14-Mar-10 13:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.