| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Usenet -> comp.databases.theory -> Re: Design for Category Feature
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 Mon Oct 24 2005 - 23:02:07 CDT
![]() |
![]() |