Re: table has many to many relationship with itself - how

Поиск
Список
Период
Сортировка
От Daniel McBrearty
Тема Re: table has many to many relationship with itself - how
Дата
Msg-id 9cf113670606141514l31471f99s12a93af0f994b264@mail.gmail.com
обсуждение исходный текст
Ответ на Re: table has many to many relationship with itself - how  (SCassidy@overlandstorage.com)
Список pgsql-general
thanks Susan for your idea.

I thought that was it for a moment, then I saw a problem (I think) -
it works, but gets quite inefficient.

when you have 2 phrases which are a translation, that is just one entry

when you have 3, that is 3
4 => 6

and so on.

In practice we might have 15, 20 languages in a translation. It is
unlimited many-to-many.

So the problem is a bit to do this while keeping the solution efficient.

I am almost sold on just using

create table translaton (
  id serial,
  phrases integer[]
);

but afaik there is no way to tell pg that the array contains refs to
another table. I could still live with this though, if noone has a
better way.

regards

Daniel


--
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131

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

Предыдущее
От: Terry Lee Tucker
Дата:
Сообщение: Re: Performance Question
Следующее
От: "John D. Burger"
Дата:
Сообщение: DEFAULT_STATISTICS_TARGET