Char or varchar for a primary key?



Hi,
I'm planning the structure of a SqlServer 2005 database for a new
application.
The requirement is that primary keys must be "natural"; i.e. in the table
Customers the primary key will be a max. 10 characters string (but the
string may be filled i.e. with only 5 charachters).

Should I define these primary keys as char[5] or varchar[5]?
I'm interested in your opinion in particular about performace issue, because
there will be tables with millions of records...


Thanks,
Davide.


.



Relevant Pages

  • Re: Sequence of columns in primary key
    ... > Our review of the primary keys was triggered by one of our customers ... > complaining about the performance of the database. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (comp.databases.ms-sqlserver)
  • Re: Sequence of columns in primary key
    ... Our review of the primary keys was triggered by one of our customers ... complaining about the performance of the database. ...
    (comp.databases.ms-sqlserver)
  • Re: interview questions
    ... the most important thing is that they understand database DESIGN. ... There is no such thing as multiple primary keys in a ... Should an Autonumber field be used as a Primary Key? ... Normalization is a methodology or process for removing as much redundant ...
    (microsoft.public.access.tablesdbdesign)
  • Re: interview questions
    ... the most important thing is that they understand database DESIGN. ... There is no such thing as multiple primary keys in a ... Should an Autonumber field be used as a Primary Key? ... Normalization is a methodology or process for removing as much redundant ...
    (microsoft.public.access.tablesdbdesign)
  • RE: Dataset.merge method
    ... and Deleted are matched on primary keys. ... > from my database with another one that is filled with values from my active ... > My messed up display name ... > AGoodLastName ...
    (microsoft.public.dotnet.framework.adonet)