Foreign keys and inheritance

Поиск
Список
Период
Сортировка
От Kynn Jones
Тема Foreign keys and inheritance
Дата
Msg-id c2350ba40711191136j4eadbf29w925e72dae6281a93@mail.gmail.com
обсуждение исходный текст
Ответы Re: Foreign keys and inheritance
Re: Foreign keys and inheritance
Re: Foreign keys and inheritance
Список pgsql-general
I have two classes of objects, A and B, where B is just a special case
of A.  (I.e., to describe a B-type object I need to specify the same
fields as for an A-type object, plus a whole bunch additional fields
specific to B alone.)  Furthermore, there's a third class T that is in
a many-to-one relation with A (and hence also B) objects.

The question is, what's the "best practice" for implementing this
situation in PostgreSQL.  My first idea was to define B as inheriting
from A, which is OK, except that I have not figured out how to
implement the reference from T.  Is inheritance indeed the right tool
for this problem, or should I use a different approach?

TIA!

kj

В списке pgsql-general по дате отправления:

Предыдущее
От: "Matt Magoffin"
Дата:
Сообщение: Re: possible to create multivalued index from xpath() results in 8.3?
Следующее
От: Jeff Davis
Дата:
Сообщение: Re: Foreign keys and inheritance