Re: Inheritance
От | Zeugswetter Andreas SB SD |
---|---|
Тема | Re: Inheritance |
Дата | |
Msg-id | 46C15C39FEB2C44BA555E356FBCD6FA4961E4A@m0114.s-mxs.net обсуждение исходный текст |
Ответ на | Inheritance ("Christopher Kings-Lynne" <chriskl@familyhealth.com.au>) |
Ответы |
Re: Inheritance
|
Список | pgsql-hackers |
> > It's nonlocal constraints that are the problem, and here foreign keys > > and UNIQUE constraints are certainly the canonical examples. Both of > > these would be largely solved with table-spanning indexes I think. > > Note that the other obvious way to solve this would be to store all of > the information inherited from the parent in the parent table, so that > you don't have to do anything special to make all of the constraints and > whatnot apply. Seems with above you are not able to constrain what qualifies for a supertable row, you would only be able to specify constraints that apply to all it's subtables. To me, the current implementation looks superior and more efficient. The SQL inheritance is a class/subclass thing. All tables have instances (==rows) that are not (by itself) related. (Even if they happen to share all attribute values with another row of a supertable.) If you want that, then you need to resort to 3NF (or ROWREF's which iirc is another SQL99 feature). Andreas
В списке pgsql-hackers по дате отправления: