> > 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 ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])