gnumed-devel
[Top][All Lists]
Advanced

[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:01:06 +0200
User-agent: Mutt/1.3.22.1i

> >a) current policy is to name foreign keys:
> >
> >    fk_* in tables
> >    pk_* in views
> >
> >> e.g COMMENT ON TABLE public.urb IS
> >>    ' id_state' = foreign key to table public.state
> 
> er... I had omitted to factor the above (fk_ vs pk_) into yesterday's 
> summary about field naming in which I asked about id_ vs _pk
> 
> ...but according to the above, is id_state best renamed fk_state?
IMO yes, but id_* is fine. I am currently hesitant to *change*
id_ to fk_/pk_ since that is more pain than gain as we are
trying to stabilize, not iron out small uglinesses here and
there. I use fk_/pk_ for new stuff, though. I should also
point out that this is *my* policy, we never discussed it or
agreed on it.

Karsten
-- 
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD  4537 78B9 A9F9 E407 1346




reply via email to

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