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

Home -> Community -> Usenet -> c.d.o.server -> Re: Making an ERD from an existing db

Re: Making an ERD from an existing db

From: Karl-Heinz Schubert <kschuber_at_de.oracle.com>
Date: Thu, 29 Oct 1998 18:27:17 +0100
Message-ID: <3638A575.F7E6D175@de.oracle.com>


Hi Dan,

you can use the datadictionary views dba_constraints,all_constraints and user_constraints

in the column constraint_type you see 'P' for Primary Keys 'U' for Unique Keys and 'R' for Foreign Keys. For the Constraint_type 'R' check out the column r_constraint_name for the Unique or Primary Key Constraint_Name for the referenced table

Hoppe this helps

Kalle

Dan Roberts schrieb:

> Hello All
>
> I have an existing Oracle rdbms for which I would like to draw up an ERD.
> How can I get PK and FK information from the DB in the process of
> determining the realtionships btw the tables as I do a desc on each
> table??
>
> Thanks!!.Dan
>
> --
> NOTE:REMOVE THE *.* in my address for direct replies
> Dan Roberts
> BRISTOL-MYERS SQUIBB PHARM. RES. CENTER "Nature is last at Bats"
> PRINCETON, NEW JERSEY U.S.A. PLANET EARTH, MILKY-WAY GALAXY
> <<<<INTERNET ADDRESS>>>>Roberts_Daniel_G.PriLVMS4_at_MSMAIL.BMS.COM

--


Karl-Heinz Schubert Tel. : +49 40 89091-255 Senior Consultant Fax : +49 40 89091-222 Notkestraße 15
22607 Hamburg e-mail: kschuber_at_de.oracle.com


Legal Disclaimer: The statements and opinions expressed here are my own and do not necessarily represent those of Oracle Corporation.


Received on Thu Oct 29 1998 - 11:27:17 CST

Original text of this message

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