Re: integer id columns for all tables

From: Marshall <marshall.spight_at_gmail.com>
Date: 29 Aug 2006 05:22:57 -0700
Message-ID: <1156854177.162120.16650_at_m73g2000cwd.googlegroups.com>


Alexandr Savinov wrote:
>
> Here are a number of principles for designing identifiers:
>
> - An entity may well exist without properties but not without identifiers.
>
> - An identifier is the first thing to be created before actually the
> entity itself is created. In other words, we create an identifier and
> only after that (and if it is really needed) the corresponding entity is
> created.
>
> - Identifiers have to be constant (in contrast to properties). If you
> use a kind of system identifier then you are guaranteed then nobody can
> change it or otherwise misuse.
>
> - Identifiers should not be meaningful because they are intended to be
> manipulated by the software rather than by users (with the exception of
> some well known identifiers used for bootstrapping). So identifiers
> should be hidden from the users.
>
> - Identifiers should be defined before any properties exist. Such a
> structure will have only identifiers for accessing empty entities. After
> that we can add meaningful properties. This discipline can ensure the
> separation between these two concerns.
>
> - If you need uniqueness then use the corresponding constraint.
> Frequently the need for uniqueness in a property leads to the conclusion
> that it should be used as an identifier.

I couldn't find anything wrong with your sixth point. However the others are all deeply flawed. You fail it.

Marshall Received on Tue Aug 29 2006 - 14:22:57 CEST

Original text of this message