Re: Table-design for categories, suggestions needed

Поиск
Список
Период
Сортировка
Искать
От
Victor Hugo
Тема
Re: Table-design for categories, suggestions needed
Дата
Msg-id
AANLkTi=S-ViscVN180OCVS=Xq0iP86mkcYoW7mMjpR2J@mail.gmail.com
Ответ на
Список
Дерево обсуждения
Re: Table-design for categories, suggestions needed gargoyle60 <gargoyle60@example.invalid>
Re: Table-design for categories, suggestions needed Victor Hugo <vh.clemente@gmail.com>
Re: Table-design for categories, suggestions needed "Jean-Yves F. Barbier" <12ukwn@gmail.com>
Re: Table-design for categories, suggestions needed Lew <noone@lewscanon.com>
Hi,

Think that an error of modeling. Occur this way, where there are 5
types of subcategory in the table, there could be another table
containing the information category and subcategory. Got it?

exemple:

TABLE categories (id, name_category)
TABLE subcategories (id, name_subcategory)
TABLE components (id, name_component)
TABLE category_subcategory (id_category references categories(id),
id_subcategory references subcategories(id) )


I think it would be better to model your system.

Bye,
Victor Hugo




2010/8/7 gargoyle60 :
> On Fri, 06 Aug 2010 19:54:01 -0400, Lew  wrote:
>
>>On 08/05/2010 04:06 AM, gargoyle60 wrote:
>>> Oops, that should read...
>>>       ...
>>>         FOREIGN KEY (parent_level)
>>>             REFERENCES category (category_level)
>>
>>So category (category_level) is a unique or primary key, then.
>
> Something like that, probably with (category_level, category_code).
> Like I said, I never got around to implementing the provisional design and there may be more to it
> than that.
>
> --
> Sent via pgsql-novice mailing list (pgsql-novice@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-novice
>



-- 
[]´s
Victor Hugo
В списке pgsql-novice по дате отправления
От: Lew
Дата:
От: Lew
Дата:
FAQ