Jumat, 02 Agustus 2013

[MS_AccessPros] Re: Disadvantages of using String as Primary Key

 

Olusesan

Strings are slower to index than numbers and are subject to human error more so than an AutoNumber which is not touched by users.

Are these strings internally generated? What is the length? Will that length give you an adequate number of unique identifiers or will you run out in a few years?

According to an article by FMS ( a highly regarded software company):
(quote)
Primary Key Should be One Field and Numeric
The primary key should only be one field and ideally numeric and meaningless. Primary keys define the uniqueness of each record, which can be accomplished efficiently with a single number. The easiest method is to use an AutoNumber field in Access or an Identity column in SQL Server. The primary key is also used in each secondary index for that table, so the smaller the better. Multi-field primary keys and non-numeric text fields are less desirable.
That said, some tables should use text fields as primary keys because they don't change much and the tables are relatively small. For example, a list of countries or states is a good candidate because there is no need to create a separate number for each country or state.
Having a meaningless primary key means that the index is stable even when data changes. Otherwise, changes in the primary key have a ripple effect through each secondary index and any other tables bound by referential integrity.
--(end quote)

Regards,
Bill Mosca, Founder - MS_Access_Professionals
http://www.thatlldoit.com
Microsoft Office Access MVP
https://mvp.support.microsoft.com/profile=C4D9F5E7-BB03-4291-B816-64270730881E
My nothing-to-do-with-Access blog
http://wrmosca.wordpress.com

--- In MS_Access_Professionals@yahoogroups.com, Olusesan Makinde <sesmak@...> wrote:
>
> Greetings Colleagues,
>
> I am working on an evolving project that can grow to encompass several integrated information systems in a country. The unique identifiers have been developed using String/ Text characters and I am trying to convince the project champion to recreate new identifiers which will be numbers. This will come at a cost but it is still quite early in the project and I believe that we can achieve this.
>
> I will appreciate if you can feed me on points to convince him for this move or otherwise advise me if this suggestion is unnecessary. .
>
> Thanks for the help. 
>
> Olusesan Makinde
>
> [Non-text portions of this message have been removed]
>

__._,_.___
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (3)
Recent Activity:
.

__,_._,___

Tidak ada komentar:

Posting Komentar