[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Gnumed-devel] Questions re database schema - normalization

From: Karsten Hilbert
Subject: Re: [Gnumed-devel] Questions re database schema - normalization
Date: Fri, 3 Sep 2004 10:06:14 +0200
User-agent: Mutt/

> Regarding the id vs fk debate:
There is no debate as of yet, thanks $DEITY :)

> I recommend that 
> - any primary key of a table is named "id"
> - any reference to a foreign key is named id_<tablename>

"id" is customary in many schema but it also often carries
business meaning, eg. is a false friend. Think of "sample ID",
"patient ID". Hence I chose pk for primary key and fk for
foreign key which seem pretty intuitive.

GPG key ID E4071346 @
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346

reply via email to

[Prev in Thread] Current Thread [Next in Thread]