[AccessD] referential integrity in a relationship

Gustav Brock Gustav at cactus.dk
Tue Mar 27 01:19:41 CDT 2012


Hi William

Seems for some reason you don't like it, but without a primary key on Table A you won't get any near referential integrity.

/gustav


>>> Benson at ge.com 27-03-2012 07:38 >>>
I have two tables, A and B.

Table A has field Fld1 which is indexed but non-unique, so has records like:

X
X
X
Y
Z
Z
Z
Z

Table B has a foreign key to Fld1, and has values like:

X
X
Z
Z
Z

I don't want to be able to add a value "P" in table B which does not exist in Table A.

I do not seem to be able to set up a relationship between these with referential integrity. 

Is it because of the repetition within Fld1 in Table A?

If so, it would seem that the remedy is going to be to create a primary key in Table A and a foreign key to THAT in Table B instead of (or in addition to) the one on Fld2.

But oh, I really don't want to do this.

Is there maybe some other problem, or is it the repetition causing this issue, as I suspect?




More information about the AccessD mailing list