Re: When to use integer keys?
Date: 24 Jan 2007 11:30:43 -0800
Message-ID: <1169667043.196885.258190_at_a75g2000cwd.googlegroups.com>
On Jan 23, 7:12 pm, Bob Badour <bbad..._at_pei.sympatico.ca> wrote:
>
> What predicates does one want to express relative to BlockType?
IsBlockOfType(BlockA,Type1)
> in the BlockType table do anything other than state that a block type
> exists?
A row in the BlockType table just says that that type is a valid type.
> Do you have referential integrity constraints related to block type?
>
Each block should have a type, but a type can exist without a block of
that type. I'm not sure what should happen if a type is deleted.
That's unlikely to happen; however, if a BlockType is renamed, that
change should apply to all blocks of that type.
> Once you answer those, if you decide you need a BlockTypes table, the
> design criteria for candidate keys are uniqueness, stability,
> familiarity and simplicity.
>
> In my opinion, a character string is as simple as an integer. Are the
> block type names unique, stable and familiar?
The block type names are unique, mostly stable (most will not ever change; a few may change but rarely). They are also familiar. Received on Wed Jan 24 2007 - 20:30:43 CET