Relationship question

From: Bryce Fischer <spamtrap_at_berzerker-soft.com>
Date: Tue, 08 Oct 2002 17:24:29 -0400
Message-ID: <d42dnc2NCfnT0z6gXTWQlg_at_News.GigaNews.Com>



Hope someone can help.

I've got the following 2 tables:

CREATE TABLE SA."PROJECT"
(
"PROJ_NBR" NUMBER(10) NOT NULL,

  CONSTRAINT "PK_PROJECT" PRIMARY KEY ("PROJ_NBR") )

CREATE TABLE SA."PERMIT"
(
"PERMIT_NBR" NUMBER(10) NOT NULL,
"PROJ_NBR" NUMBER(10) NOT NULL,
"ADDR_NBR" NUMBER(10) NOT NULL,

  CONSTRAINT "PK_PERMIT" PRIMARY KEY ("PERMIT_NBR") )

I've got a 3rd table:
CREATE TABLE SA."FEE_DETAIL"
(
"FEE_NBR" NUMBER(10) NOT NULL,

  CONSTRAINT "PK_FEE_DETAIL" PRIMARY KEY ("FEE_NBR") )

The Entrees in FEE_DETAIL can have a relationship with both PROJECT and PERMIT tables (i.e., both projects and permits can have fees).

I've set it up to have non-identifying relationships with PROJECT and PERMIT. This required the table FEE_DETAIL to have 2 FK entries, one for PROJECT and one for PERMIT. That didn't seem logical.

Any suggestions on a good way to do this?

TIA

--
Bryce

I don't like having disks crammed into me... 
unless they're Oreos, and then only in the mouth
Received on Tue Oct 08 2002 - 23:24:29 CEST

Original text of this message