Primary Key Naming

last modified: September 3, 2004

There are to opposing ways to name the primary key of any table.

1) Use "ID" as primary key name and table + "_ID" as foreign keys

2) Use table+"_ID" both in primary keys and foreign keys

3) Use only table name as primary key name


Maybe two patterns NoTableNameInPrimaryKeyNamePattern and TableNameInPrimaryKeyNamePattern should be added and discussed..



Loading...