PK-FK relationship: lookup & main table

M

mgupta010

Hi there,

I am working on creating data model from existing database using MS
Visio 2007 Profesional Edition.
Present DB is w/o PK-FKs & I am working to create relational DB which
enforces RI etc
I have a lookup table which contains language codes,used by main
table. The problem ,I am running into, is that these language
codes(from lookup table) are used by 3 columns in main table.
So, I am wondering how can I enforce PK-FK relationship here.
As in...
language_code from lookup table is PK and it has to associated w/
column(s) existing in main table
FYI:
I think VISIO doesn't allow relating a single column (from parent
table) to 3 different columns. It associates with Either ColA or ColB
or ColC.. not with all of them

Please advise

Thanks
 
B

Barb Way

You can involve more than one column in a single relationship, but the
Visio UI only provides a way to relate each column set in pairs. So I can
create a table with two columns in the Primary key, and a second table with
two columns in the intended Foreign key, and then drop a Relationship shape
on the page - and define each association (PKa to FKa and PKb to FKb)
within the single relationship.

But you are correct that there is no way to associate 1 column to 3
columns, for instance.


Barb Way
Product Support - Visio
Microsoft Corporation
[This posting is provided "As Is" with no warranties, and confers no
rights.]
--------------------

Hi there,

I am working on creating data model from existing database using MS
Visio 2007 Profesional Edition.
Present DB is w/o PK-FKs & I am working to create relational DB which
enforces RI etc
I have a lookup table which contains language codes,used by main
table. The problem ,I am running into, is that these language
codes(from lookup table) are used by 3 columns in main table.
So, I am wondering how can I enforce PK-FK relationship here.
As in...
language_code from lookup table is PK and it has to associated w/
column(s) existing in main table
FYI:
I think VISIO doesn't allow relating a single column (from parent
table) to 3 different columns. It associates with Either ColA or ColB
or ColC.. not with all of them

Please advise

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top