Oracle Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsDatabasesOracle Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old June 5th, 2004, 12:46 PM
rabia409 rabia409 is offline
Registered User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Dec 2003
Location: pakistan
Posts: 2 rabia409 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Send a message via ICQ to rabia409
where all the relations and attributes are saved in oracle?

greetings
can any1 plz tell me where all the relations and attributes are saved in oracle? i mean i have to find out a few things
in what table all names of relations are stored
names and defintions of views
names and types of attributes of each reltions are stored
and where all integrity constraints are stored

plz, i will be grateful if any1 help me

thx alot
God bless

ps. if possible plz email at URL

Last edited by pabloj : June 6th, 2004 at 05:16 AM. Reason: More descriptive subject added

Reply With Quote
  #2  
Old June 5th, 2004, 11:06 PM
shafique shafique is offline
Senior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Sep 2003
Location: Canada
Posts: 305 shafique User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 45 m 20 sec
Reputation Power: 6
Oracle stores these all information in data dictionary, you can execute query any dictionary view by default Oracle grants public to these all views and any user could fetch the required information. Furthur more these all views started by presuffix 'USER' or 'DBA' there are difference between both type of views but i don't wanna go in more depth, just walk through Oracle SQL reference documentation available at Oracle website with no cost. Following is your required query you could make it more specific for you.

set pagesize 500
set line 500
col table_name format a50
col constraint_name format a50
col constraint format a20
col search_condition format a50
col column_name format a30
select a.table_name,a.constraint_name,
decode(a.constraint_type,'P','Primary Key','R','Foreign Key','U','Unique Key',null) constraint,
b.column_name,a.search_condition
FROM user_constraints a, user_cons_columns b
where a.constraint_name=b.constraint_name
and a.table_name='EMP'

Just copy paste it in any editor then save it (for example myquery.sql) in ORACLE_HOME/bin directory and run it as follows:

SQL>@myquery

Reply With Quote
Reply

Viewing: Dev Shed ForumsDatabasesOracle Development > need help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway
Stay green...Green IT