Path: newssvr20.news.prodigy.com!newsmst01.news.prodigy.com!prodigy.com!in.100proofnews.com!in.100proofnews.com!pd2nf1so.cg.shawcable.net!residential.shaw.ca!sjc70.webusenet.com!news.webusenet.com!sn-xit-02!sn-xit-06!sn-post-01!supernews.com!corp.supernews.com!not-for-mail
From: Daniel Morgan <damorgan@exxesolutions.com>
Newsgroups: comp.databases.oracle.tools
Subject: Re: Relation ship
Date: Fri, 08 Aug 2003 08:22:48 -0700
Organization: EXE
Message-ID: <3F33C048.11781B0D@exxesolutions.com>
X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
References: <15e9d0f4.0308080612.6ca027b3@posting.google.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Cache-Post-Path: yasure!unknown@pond178.drizzle.com
X-Cache: nntpcache 2.4.0b5 (see http://www.nntpcache.org/)
X-Complaints-To: abuse@supernews.com
Lines: 35
Xref: newssvr20.news.prodigy.com comp.databases.oracle.tools:82473

MeDhanush wrote:

> Hi,
>
> I have huge number of tables in db..,I'm trying to find out the
> relationship among the tables(like master/detail)..,
> Can sb tell me any tool or method that can help me out ?
>
> TIA
> Kishroe

Tools ... any entity relationship diagraming ... Designer, ERwin, Visio
Professional

Otherwise ...

SELECT T.owner AS CHILD_OWNER,
               T.table_name AS CHILD_TABLE,
               T.constraint_name AS FOREIGN_KEY_NAME,
               R.owner AS PARENT_OWNER,
               R.table_name AS PARENT_TABLE,
               R.constraint_name AS PARENT_CONSTRAINT
FROM dba_constraints T, dba_constraints R
WHERE T.r_constraint_name = R.constraint_name
  AND T.r_owner = R.owner
  AND T.constraint_type='R'
AND R.owner = T.owner;

--
Daniel Morgan
http://www.outreach.washington.edu/extinfo/certprog/oad/oad_crs.asp
damorgan@x.washington.edu
(replace 'x' with a 'u' to reply)


