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

Home -> Community -> Usenet -> c.d.o.misc -> Re: help on building up relationships among different tables

Re: help on building up relationships among different tables

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Sat, 15 Sep 2001 20:46:31 +0200
Message-ID: <tq78ggmn136g33@news.demon.nl>

"Kai Huang" <khuang_at_andrew.cmu.edu> wrote in message news:Pine.GSO.4.33L-022.0109151428260.23166-100000_at_unix1.andrew.cmu.edu...
> Hi Folks,
>
> We have a database composed of 20 tables. Some tables have foreign keys
> from some other tables. Since we used ACCESS2000 before we switch to
> Oracle, we know that in ACCESS we can just drag the key in one table which
> is a foreign key to the table in which it is the primary key in the
> relationship window in access. We want to know if Oracle has similar
> method of building the relationship among all the tables. The method that
> we are now thinking is to use triggers, however, the boss said it's a
> walk-around. He supposed there should be simliar way as access in Oracle
> to do that. The deadline is coming, we really need help. Thanks a lot for
> your kind help.
>
> With best regards,
> Kai
>

alter table ... add constraint <constraint_name> foreign key(<column_names>,...) references <table_name>

Please check the sql reference manual and/or the Oracle Application developers manual with respects to constraints.

Graphical methods are available in Designer 6i, but most likely you don't have that so you will need to do that in sql*plus as outlined above.

Please try todo at least something to resolve your problem, like reading a manual, before you start posting.

Regards,

Sybrand Bakker, Senior Oracle DBA Received on Sat Sep 15 2001 - 13:46:31 CDT

Original text of this message

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