View Single Post
  #8  
Old June 8th, 2009, 01:35 AM posted to microsoft.public.access.tablesdbdesign
David W. Fenton
external usenet poster
 
Posts: 3,373
Default New Database - Primary Key

Armen Stein wrote in
:

On Fri, 5 Jun 2009 12:58:01 -0700, Trini Gal
wrote:

Thank you for answering. Honestly, I have read so much about why
I should and shouldn't be using the AutoNumber, that I just didn't
use it and used the DMax function instead.


Whether to use AutoNumber keys (aka Identity in SQL Server) is
somewhat of a religious debate. They are "meaningless surrogate
keys", as opposed to "natural keys". There are proponents on both
sides. I am on the AutoNumber side, and like Tony and others I've
been on that side for decades. My shop has built hundreds of
databases using this approach.


A programmically-incremented PK is no less a surrogate key than an
Autonumber PK. It's just more work to make reliable.

There is really no need to programmatically increment your PK unless
you really do need the numbers to be incremented because you are
exposing them to the users (e.g., an invoice number). Most
properly-designed Access applications don't need that, so
Autonumbers are fine.

--
David W. Fenton http://www.dfenton.com/
usenet at dfenton dot com http://www.dfenton.com/DFA/