Distributed keys / Inheritance

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Distributed keys / Inheritance
Дата
Msg-id B52AD44C-3646-11D8-97F0-000A95C88220@myrealbox.com
обсуждение исходный текст
Список pgsql-hackers
Here's Tom Lane's response to my original post on pgsql-sql:

> This seems to have considerable overlap with the problem of indexing
> inheritance hierarchies (so that constraints on tables with children
> would work as people expect).  It may be that it's sufficient to solve
> it for inheritance cases, and not try to support the generic case of
> constraints applied across arbitrary sets of tables.  ISTM that the
> latter could introduce a bunch of extra definitional and practical
> issues beyond what you'd have to solve to do the former.
>
> You're discussing it on the wrong list though --- try -hackers.

Hadn't thought of distributed keys being related to inheritance, though 
now I can see how one might apply inheritance to the situations I 
mentioned above. Is this what you were thinking, Tom?

Case 1:

employees (id, name)
schools (name, location)

teachers (id, name, school_name)where (id, name) inherits from employees and school_name references 
schools(name)
subs (id, name) inherits from employees
managers (id, name, school_name)where (id, name) inherits from employees and school_name references 
schools(name)

Case 3

comments (comment_id, comment)
employees(id, name)
comments_nonemployees (comment_id, comment, name)where (id, comment) inherits from comments
comments_employees (comment_id, comment, employee_id)where (comment_id,comment) inherits from comments, employee_id 
references employees(id)
 I don't know very much about inheritance in PostgreSQL, so I'm doing a 
bit of reading via Google. If anyone has recommendations on good 
sources re: inheritance in PostgreSQL, I'd be thankful.

Regards,

Michael Glaesemann
grzm myrealbox com



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

Предыдущее
От: Michael Glaesemann
Дата:
Сообщение: Fwd: [SQL] Distributed keys
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: [GENERAL][ADMIN]data fragmentation