[Top][All Lists]

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

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

From: J Busser
Subject: Re: [Gnumed-devel] Questions re database schema - naming
Date: Wed, 1 Sep 2004 19:51:32 -0700

At 10:35 PM +0200 9/1/04, Karsten Hilbert wrote:
But he is talking about primary and foreign keys ONLY. Not
simple fields. I agree it may be preferable to name primary
keys "pk_<table_name>" or "id_<table_name>" instead of just
"id" or "pk". OTOH, and IF we want to be explicit in naming why
not be explicit in a way that is already available *anyways* ?
Eg. I am again saying that we shouldn't reinvent namespaces,
and badly.  OTOH again, I have had to resort to explicitly
name primary keys "pk_<table>" -- when I intended to inherit
from <table> and would thus end up with TWO "pk" or "id"
columns. In that case it was safer that way to make sure we
covered our bases in all cases of possible ambiguity.

In the table "address" we have the pk_audit field
NOT NULL  DEFAULT nextval('public.audit_fields_pk_audit_seq'::text)

In the table audit_fields I cannot find audit_fields_pk_audit_seq.
From where does it come?
Likewise audit_trail_pk_audit_seq'

Are these missing from the table definitions?

reply via email to

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