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

how to change the relationship between a primary key and foriegn key?

P: n/a
Hey there,

Im not even sure if im using the terminology correctly. Anyway heres
my questions. I have a three tables. The main table has two ID fields.
A website id, which is the primary key in that table, and a
SupplierID.

In the second table, websiteID is not the primary key, so when i want
to relate the table above with this one, its always 1 to many. I need
this to be 1 to 1. what can i do here.

In the third table, the primary key is SupplierID, which is related to
the first table. again the relationship is 1 to many, and i need it to
be one to one.

Also, with the remaining tables, where the relationships are all 1 to
1, each "sub" table displays the correct information from main table.
I need to do this with the table ive just mentioned. is it possible?

regards
adham

May 28 '07 #1
Share this Question
Share on Google+
1 Reply

P: n/a
On May 28, 3:33 pm, adham <adhamsel...@yahoo.comwrote:
Hey there,

Im not even sure if im using the terminology correctly. Anyway heres
my questions. I have a three tables. The main table has two ID fields.
A website id, which is the primary key in that table, and a
SupplierID.

In the second table, websiteID is not the primary key, so when i want
to relate the table above with this one, its always 1 to many. I need
this to be 1 to 1. what can i do here.

In the third table, the primary key is SupplierID, which is related to
the first table. again the relationship is 1 to many, and i need it to
be one to one.

Also, with the remaining tables, where the relationships are all 1 to
1, each "sub" table displays the correct information from main table.
I need to do this with the table ive just mentioned. is it possible?

regards
adham
Do a search on "one to one relationship" in this group. You will find
you need to adjust your thinking in the use of one to one
relationships.

If you want a one to one relationship between tables just give the
primary key in both tables the same name:
tblTable1.lngPrimaryID
tblTable2.lngPrimaryID
May 30 '07 #2

This discussion thread is closed

Replies have been disabled for this discussion.