Re: primary key debate
Posted in 2000
Definitely a behind-the-scenes primary key. The reason is an object-oriented one: we believe every record represents an object and therefore needs to have a persistent identity NOT based on one of its properties. For example, occasionally the government will issue someone a new SS# ... but that does not mean that this person has become another person, they merely have a new social security #. In your example below, I would create a "patient_id" column as the primary key, and then also define their SS# as a property, with perhaps a unique index on it. Primary keys must *never* be updated. Rich "M.J. Holley" wrote: > There is a debate going around here on primary key. Taking votes here. > Should the primary key be a field that can be updated (an actual usable form > field) or should it always be behind the scenes? > > For example, social security number is obviously unique id for a patient > record. Would most of you use SSN as the primary key or would you still > have a "behind the scenes" serial value as primary? > > m -- Richard C. Auslander Manager of Database Services AirFlash, Inc. 1733 Woodside Rd., Suite #110 Redwood City, CA 94061 (650) 556-7928 www.airflash.com