Re: sub-super entity physical design

From: Tobin Harris <comedyharris_at_hotmail.com>
Date: Wed, 2 Oct 2002 20:45:13 +0100
Message-ID: <anfhqf$e8pda$1_at_ID-135366.news.dfncis.de>


"stu" <smcgouga_at_nospam.co.uk> wrote in message news:anf15f$7cu$1$8300dec7_at_news.demon.co.uk...
> When doing er modeling what does sub-super entity map to? One table with
a
> view for each sub type or lots of tables with a union view for the super
> type? Or something else?

I'm a bit rusty on this, but as far as I'm aware, you create a supertype table, and then individual tables for each sub-type. The id of the supertype table is part of the PK for the sub-types table (meaning it's dependant, so you can't delete a row in the super-type without first deleting rows in the sub-type). Yo may want to create views to facilitate access to the tables. Which might me something like...

create view BooksResources as select resource.*, book.* from resource inner join resource_id on book_resource_id

E.g:

Resources:
resource_id: 1 (PK)
resource_name: Collins English Dictionary

Books:

book_resource_id: 1   (PK)
book_id: 76    (PK)
book_publisher: Collins

 HTH Tobin

> cheers
> stu
>
>
Received on Wed Oct 02 2002 - 21:45:13 CEST

Original text of this message