By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,825 Members | 1,254 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,825 IT Pros & Developers. It's quick & easy.

table relationships

P: n/a
When you connect to an Oracle database with Access and ADO, is there a way
to get information on the Oracle table relationships?

Jeff
Jul 19 '05 #1
Share this Question
Share on Google+
7 Replies


P: n/a
"Daniel Morgan" <da******@x.washington.edu> wrote in message
news:1093194494.325919@yasure...

Query the data dictionary views. Run this query for a list of them.

SELECT view_name
FROM all_views
WHERE view_name LIKE 'ALL%';

But why connect to Oracle with MS Access? An overwhelming desire to use
the worst possible tool to do the job?


HAHAHAHA. No, us low ranking po' folk in the military don't have Oracle
installed let alone get Oracle training, or ANY database training for that
matter. All government desktop PCs come with Microsoft Access installed and
I had to teach myself to use it. I have a couple of stand-alone
applications I have to use that connect to an Oracle database, but the
applications leave ALOT to be desired because I still have to build my own
lists of data and compile statistics by hand over and over. If I can
connect to the Oracle database with Access and ADO, I can build my own
queries and reports once and be done with it at the click of a button
whenever it's needed. Whether or not Access and ADO are the worst possible
tools, it's still a hell of alot faster than doing it by hand the way I do
it now. The Oracle database I tried to connect to turned out to have about
2000 tables with a jillion fields. I need to figure out what the
relationships are before I can build my own queries.

Jeff
Jul 19 '05 #2

P: n/a
GQ
You can start out with something like the following - select * from
dict where table_name like '%COLUMN%';
Note that most views are available in three flavors (e.g. user_tables,
all_tables, dba_tables).
I'd recommend looking at User_tab_columns and user_constraints (where
constraint_type='R').
And if you are really lucky, you could try user_tab_comments and
user_col_comments.

GQ

"Jeff" <id***@thinkso.com> wrote in message news:<Pw7Wc.92$4o.40@fed1read01>...
"Daniel Morgan" <da******@x.washington.edu> wrote in message
news:1093194494.325919@yasure...

Query the data dictionary views. Run this query for a list of them.

SELECT view_name
FROM all_views
WHERE view_name LIKE 'ALL%';

But why connect to Oracle with MS Access? An overwhelming desire to use
the worst possible tool to do the job?


HAHAHAHA. No, us low ranking po' folk in the military don't have Oracle
installed let alone get Oracle training, or ANY database training for that
matter. All government desktop PCs come with Microsoft Access installed and
I had to teach myself to use it. I have a couple of stand-alone
applications I have to use that connect to an Oracle database, but the
applications leave ALOT to be desired because I still have to build my own
lists of data and compile statistics by hand over and over. If I can
connect to the Oracle database with Access and ADO, I can build my own
queries and reports once and be done with it at the click of a button
whenever it's needed. Whether or not Access and ADO are the worst possible
tools, it's still a hell of alot faster than doing it by hand the way I do
it now. The Oracle database I tried to connect to turned out to have about
2000 tables with a jillion fields. I need to figure out what the
relationships are before I can build my own queries.

Jeff

Jul 19 '05 #3

P: n/a
"Jeff" <id***@thinkso.com> wrote in message news:<Pw7Wc.92$4o.40@fed1read01>...
"Daniel Morgan" <da******@x.washington.edu> wrote in message
news:1093194494.325919@yasure...

Query the data dictionary views. Run this query for a list of them.

SELECT view_name
FROM all_views
WHERE view_name LIKE 'ALL%';

But why connect to Oracle with MS Access? An overwhelming desire to use
the worst possible tool to do the job?


HAHAHAHA. No, us low ranking po' folk in the military don't have Oracle
installed let alone get Oracle training, or ANY database training for that
matter. All government desktop PCs come with Microsoft Access installed and
I had to teach myself to use it. I have a couple of stand-alone
applications I have to use that connect to an Oracle database, but the
applications leave ALOT to be desired because I still have to build my own
lists of data and compile statistics by hand over and over. If I can
connect to the Oracle database with Access and ADO, I can build my own
queries and reports once and be done with it at the click of a button
whenever it's needed. Whether or not Access and ADO are the worst possible
tools, it's still a hell of alot faster than doing it by hand the way I do
it now. The Oracle database I tried to connect to turned out to have about
2000 tables with a jillion fields. I need to figure out what the
relationships are before I can build my own queries.


Hmmm, when I was a gummint mil contractor a few years ago, it seemed
there was a lot of online training available. Perhaps, really bad
training, but there you go. Find out where the online training
available to you is, and you might find a scrollable list that
actually includes both unix and oracle. One thing you might check out
is perl, which has oracle extensions as well as numerous places online
with examples. You might also discover the gummint has pretty
extensive site licensing, although you may need to discover how to
find a demigod called a "DBA" to find out how to use that stuff. But
for free, register on technet.oracle.com and you can download an
amazing amount of stuff, as well as tutorials and other information.
Not to mention your help desk might be able to give you licensed
copies of stuff. If you can access an Oracle database, you must be
authorized, right? There are a number of tools that help you figure
out the relationships, too, no need to torture yourself (especially in
the future, when you have to unlearn all the bad habits) with access.
TOAD, or even Oracle's own SQL Worksheet are better just for starters.
You surely must be able to get official Oracle client software for
accessing Oracle servers?

Assuming you aren't Libyan, or whatever.

jg
--
@home.com is bogus.
http://en.wikipedia.org/wiki/Data_haven
Jul 19 '05 #4

P: n/a
Oracle client software? Why didn't I think of that? Probably because
Access users don't think in those terms. That sounds like something that
might help me. Does that allow you to run queries and view table
relationships after logging into an X.WORLD connection?

"Joel Garry" <jo********@home.com> wrote in message
news:91**************************@posting.google.c om...

Hmmm, when I was a gummint mil contractor a few years ago, it seemed
there was a lot of online training available. Perhaps, really bad
training, but there you go. Find out where the online training
available to you is, and you might find a scrollable list that
actually includes both unix and oracle. One thing you might check out
is perl, which has oracle extensions as well as numerous places online
with examples. You might also discover the gummint has pretty
extensive site licensing, although you may need to discover how to
find a demigod called a "DBA" to find out how to use that stuff. But
for free, register on technet.oracle.com and you can download an
amazing amount of stuff, as well as tutorials and other information.
Not to mention your help desk might be able to give you licensed
copies of stuff. If you can access an Oracle database, you must be
authorized, right? There are a number of tools that help you figure
out the relationships, too, no need to torture yourself (especially in
the future, when you have to unlearn all the bad habits) with access.
TOAD, or even Oracle's own SQL Worksheet are better just for starters.
You surely must be able to get official Oracle client software for
accessing Oracle servers?

Assuming you aren't Libyan, or whatever.

jg
--
@home.com is bogus.
http://en.wikipedia.org/wiki/Data_haven

Jul 19 '05 #5

P: n/a
Thanks, I'll play with that.

"GQ" <db********@yahoo.com> wrote in message
news:aa**************************@posting.google.c om...
You can start out with something like the following - select * from
dict where table_name like '%COLUMN%';
Note that most views are available in three flavors (e.g. user_tables,
all_tables, dba_tables).
I'd recommend looking at User_tab_columns and user_constraints (where
constraint_type='R').
And if you are really lucky, you could try user_tab_comments and
user_col_comments.

GQ

"Jeff" <id***@thinkso.com> wrote in message

news:<Pw7Wc.92$4o.40@fed1read01>...
"Daniel Morgan" <da******@x.washington.edu> wrote in message
news:1093194494.325919@yasure...

Query the data dictionary views. Run this query for a list of them.

SELECT view_name
FROM all_views
WHERE view_name LIKE 'ALL%';

But why connect to Oracle with MS Access? An overwhelming desire to use the worst possible tool to do the job?


HAHAHAHA. No, us low ranking po' folk in the military don't have Oracle
installed let alone get Oracle training, or ANY database training for that matter. All government desktop PCs come with Microsoft Access installed and I had to teach myself to use it. I have a couple of stand-alone
applications I have to use that connect to an Oracle database, but the
applications leave ALOT to be desired because I still have to build my own lists of data and compile statistics by hand over and over. If I can
connect to the Oracle database with Access and ADO, I can build my own
queries and reports once and be done with it at the click of a button
whenever it's needed. Whether or not Access and ADO are the worst possible tools, it's still a hell of alot faster than doing it by hand the way I do it now. The Oracle database I tried to connect to turned out to have about 2000 tables with a jillion fields. I need to figure out what the
relationships are before I can build my own queries.

Jeff

Jul 19 '05 #6

P: n/a
"Jeff" <id***@thinkso.com> wrote in message news:<pfxWc.1585$4o.24@fed1read01>...
Oracle client software? Why didn't I think of that? Probably because
Access users don't think in those terms. That sounds like something that
might help me. Does that allow you to run queries and view table
relationships after logging into an X.WORLD connection?


There's so much, I can't begin to tell you. Enterprise manager can
show dependencies, table layouts and contents. The downside is, there
is so much I can't begin to tell you.

A lot of people like http://www.quest.com/toad/ (I have no opinion one
way or another, no relation to quest, I know many mil sites use their
stuff). Look at cdo.marketplace in general for downloadable tools.

comp.databases.oracle is defunct, don't crosspost between cdos and
there. Here is a primer for cdos:
http://members.cox.net/oracleunix/readme-cdos.htm

jg
--
@home.com is bogus.
....persists for 4 or more hours, seek medical help immediately.
http://www.sfgate.com/cgi-bin/articl...0/MN243061.DTL
Jul 19 '05 #7

P: n/a
rcc
"Jeff" <id***@thinkso.com> wrote in message news:<lH3Wc.14$4o.0@fed1read01>...
When you connect to an Oracle database with Access and ADO, is there a way
to get information on the Oracle table relationships?

Jeff


The following query lists all relationships:

select a.owner||'.'||a.table_name "Referenced Table",
b.owner||'.'||b.table_name "Referenced by", b.constraint_name "Foreign
Key"
from all_constraints a, all_constraints b
where b.constraint_type = 'R'
and a.constraint_name = b.r_constraint_name;

....And the following one lists all columns that compose each foreign
key:
SELECT CONSTRAINT_NAME, TABLE_NAME, POSITION, COLUMN_NAME
FROM ALL_CONS_COLUMNS
ORDER BY CONSTRAINT_NAME, TABLE_NAME, POSITION
/

Good luck.
Jul 19 '05 #8

This discussion thread is closed

Replies have been disabled for this discussion.