[AccessD] Access and SQL Server

Jim Dettman jimdettman at verizon.net
Mon Feb 28 17:21:00 CST 2011


One other thing: keep in mind that the description reflects the code, not the other way around.  It's basically a long form of the code.

Jim

Sent from my iPhone

On Feb 28, 2011, at 6:00 PM, "Stuart McLachlan" <stuart at lexacorp.com.pg> wrote:

> I see a lot of sense in it having a separate Autonumber PK.   This is a classic case of why 
> you should not use a natural key as your PK.
> 
> What happens when the Description changes and the existing Code is no longer an accurate 
> short representation of Description?  Do you change it throughout all the tables which store it 
> or do you leave your customer with strange Codes which don't match the description
> 
> (And please don't tell me that you use Relationships with "Cascade Update" turned on.)
> 
> 
> -- 
> Stuart
> 
> On 28 Feb 2011 at 17:36, Jim Dettman wrote:
> 
>> Stuart,
>> 
>> <<Do you ever use anything other than longs for PK?   If so, why?>>
>> 
>>  Occasionally on a lookup table if a client insists on having a short
>>  code
>> along with a description.  Then I do this:
>> 
>> LookupCode - Text - PK
>> Description - Text
>> 
>>  as I don't see any sense in doing this:
>> 
>> LookupID - Autonumber - PK
>> Code - Text - CK
>> Description - Text
>> 
> 
> 
> -- 
> AccessD mailing list
> AccessD at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/accessd
> Website: http://www.databaseadvisors.com




More information about the AccessD mailing list