Re: Modeling Friendship Relationships
От | David G Johnston |
---|---|
Тема | Re: Modeling Friendship Relationships |
Дата | |
Msg-id | 1415755933576-5826608.post@n5.nabble.com обсуждение исходный текст |
Ответ на | Re: Modeling Friendship Relationships (John R Pierce <pierce@hogranch.com>) |
Ответы |
Re: Modeling Friendship Relationships
|
Список | pgsql-general |
John R Pierce wrote > a difficulty of the single entry for joe<->bob is that its hard to have > a unique constraint across two fields. you'd want to ensure that > joe+bob is unique and that there's no bob+joe Bill's solution: PRIMARY KEY (person1, person2), CHECK (person1 < person2) seems to make this constraint fairly simple...am I missing something? Usage need permitting how difficult would setting up materialized views to maintain arrays of "friend_of" and "friends_are" and simply unnest those arrays if record-oriented access to the contained ids is required? More basically how performant (generally) are ~200 element arrays? David J. -- View this message in context: http://postgresql.nabble.com/Modeling-Friendship-Relationships-tp5826592p5826608.html Sent from the PostgreSQL - general mailing list archive at Nabble.com.
В списке pgsql-general по дате отправления: