Re: Design for Category Feature
From: vldm10 <vldm10_at_yahoo.com>
Date: 24 Oct 2005 21:02:07 -0700
Message-ID: <1130212927.023643.198690_at_o13g2000cwo.googlegroups.com>
Date: 24 Oct 2005 21:02:07 -0700
Message-ID: <1130212927.023643.198690_at_o13g2000cwo.googlegroups.com>
David Portas wrote:
> I don't understand what "CATEGORY_ID" is in your model. I would have
> expected to see this (SQL):
>
> CREATE TABLE person_category (category_id INTEGER NOT NULL REFERENCES
> categories (category_id), person_id INTEGER NOT NULL REFERENCES persons
> (person_id), PRIMARY KEY (category_id,person_id));
Obviously your key solution is not good; generaly speaking whenever the same values of the category-id and person-id are repeated it doesn't work because the key is not unique in this case.
Vladimir Odrljin
>
> Why would you need a third column?
>
> --
> David Portas
> SQL Server MVP
> --
Received on Tue Oct 25 2005 - 06:02:07 CEST
