Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.tools -> Re: Help with table design (easy?)

Re: Help with table design (easy?)

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Thu, 12 Apr 2001 20:40:22 -0700
Message-ID: <3AD67526.5046D750@exesolutions.com>

You can do it all in a single table with fields such as the following:

Group_id
Group_name
Group_parent

Where Group_id is a foreign key to Group_parent.

To query the values use the PL/SQL "CONNECT BY".

Daniel A. Morgan

Sean Dolan wrote:

> Oracle 8.1.7 platform.
>
> I have a table called SYS_GROUPS that has a primary key of the groupname as
> shown below:
>
> GrpName
> --------------
> Descr
>
> A group can have control over other groups. How do I build a table to
> represent that? I thougha circular reference via a FK to grpName would work
> but that only allows control over 1 group. I basically need a many to many
> relationship, but how can I build a table that looks like:
>
> GrpName
> GrpName
> ---------------
>
> You can't have the same column name twice. Any ideas?
>
> Thank you.
> Sean
Received on Thu Apr 12 2001 - 22:40:22 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US