B
baud
Hi,
Let's say I have a M:N relationship between table A and table B.
I create the C table with primary key [idA & idB].
I want to create a 1:N relation ship between table C and a table D.
So I should have [idA & idB] acting as a foreign key in table D.
idA is autonumber primary key in table A; idB is autonumber primary key
in Table B.
In table C, idA and idB are declared as long integers, and the primary
key is [idA & idB].
What about the foreign key [idA & idB] in table D? I guess I should
have to create a field that is the concatenation of two long integers,
so I am in trouble here.
So I did the following: create an autonumber idC in table C as a simple
key without duplicates, and add idC as a foreign key to table D; of
course, I also added individually idA and idB to table D, and created
some keys on them.
Did I follow the right approach to solve my problem?
Let's say I have a M:N relationship between table A and table B.
I create the C table with primary key [idA & idB].
I want to create a 1:N relation ship between table C and a table D.
So I should have [idA & idB] acting as a foreign key in table D.
idA is autonumber primary key in table A; idB is autonumber primary key
in Table B.
In table C, idA and idB are declared as long integers, and the primary
key is [idA & idB].
What about the foreign key [idA & idB] in table D? I guess I should
have to create a field that is the concatenation of two long integers,
so I am in trouble here.
So I did the following: create an autonumber idC in table C as a simple
key without duplicates, and add idC as a foreign key to table D; of
course, I also added individually idA and idB to table D, and created
some keys on them.
Did I follow the right approach to solve my problem?