Re: super type & sub type, interested too

From: Michael Gast <mig-sm_at_web.de>
Date: Wed, 06 Nov 2002 18:26:25 +0100
Message-ID: <3DC950C1.4050103_at_web.de>


Hi,

> super type : shipping_document table with doc_id, doc_type_id, shp_id,
> as keys.
> sub types: house_bill_of_lading, master_bill_of_lading,
> house_air_way_bill, master_air_way_bill

What are the primary keys of your tables? I cannot see any relationship to your supertype in your subtypes.

I assume you are using the doc_id in both, the supertype and your subtype tables. In addition i assume you have foreign keys from each subtype to your supertype.

This given:
1. Insert your row in the supertype table. 2. Insert your row in the subtype table.

Additional hint: If you have distinct subtypes you should add insert and update triggers on each subtype table to ensure that a primary key value you want to insert in one subtype table is not used in another subtype table.

-- 
All emails sent to this address are never read and never will be
answered. Sorry, but until someone cleans up the spam mess, that's the
way it has to be.

E-Mails, die direkt an diese Adresse geschickt werden, lese und
beantworte ich nicht. Ich bedauere diesen Umstand sehr, kenne derzeit
aber keine bessere Möglichkeit, um die Spam-Flut abzustellen.

Mit freundlichen Grüßen / Best Regards
Michael Gast
SEPP MED GmbH
Received on Wed Nov 06 2002 - 18:26:25 CET

Original text of this message