Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: Help with Dictionary Views: confirming FK relationship
"BD" <bobby_dread_at_hotmail.com> wrote in message
news:1146543424.551894.70030_at_j73g2000cwa.googlegroups.com...
: >I take exception
:
: If that is your choice, so be it.
:
: >Valid naming conventions within an organisation can, and do, cause your
statement to be false.
:
: Technically valid, absolutely. But IMO, this type of standard is far
: less straightforward to manage.
:
probably not so when you have significant systems. the 'same name as PK' standard works for simple systems -- but as soon as you have two FKs referencing the same PK table, it breaks (although care needs to be taken that the multiple FKs don't actually belong in an associative table)
but more important (and not illustrated in David Fitzjarrell's reply) is that many naming conventions require the context of the FK to be included in the column name. for instance:
create table project (
proj_id ....
, manager_emp_id ...
, sponsor_emp_id ...
hopefully this would never show up as:
create table project (
proj_id .... , emp_id_1 ... , emp_id_2 ...
(but, on further analysis, the designer may determine that the FK actually belongs in a PROJECT_EMP_ROLE table. )
so, relying on the data dictionary (ie, constraints) and (hopefully) on the data model to document the FKs is essential -- naming conventions are helpful depending on how they are used, but really cannot be the primary way to manage FKs (no pun intended)
++ mcs Received on Tue May 02 2006 - 05:31:36 CDT
![]() |
![]() |