--- Jeff > You can create a table called order_item with columns that exist for 
all
> items (the shared columns). Create a table called merchandise with
> columns that exist only for merchandise and not other items (without any
> of the shared columns).
> 
> When you insert new merchandise, put the common values into the
> order_item table, and the merchandise-specific attributes into the
> merchandise table with a foreign key to the order_item record. When you
> want all the items, select from order_item. When you want only the
> merchandise, join the order_item and merchandise tables, and of course
> the join will eliminate all non-merchandise records. And you can do the
> same for memberships and subscriptions.

Then if you wanted, you could add one additional layer to for convienence.  you 
can create
multiple updateable views, one view for each of your extenction tables such as 
mechandise in this
example  that are joined back to your primary table.

This way you can handle each relation seperately.

Regards,

Richard Broersma.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

Reply via email to