Subject General question about Master/Detail
Author Ryan Nilsson-Harding
Hi there,

this is just a simple question about the way I have set up my
Master/Detail tables.

In my Master, I have an Integer primary key. In my detail, I have
the same field set as a foreign key, and I also have another integer
field (keyF) which merely is used to make a composite primary key
for the detail. the keyF field is generated by a generator.

I have it like this because there is no other field in the detail,
which, when mixed with the foreign key, will be guaranteed to be
unique.

Is this OK, or not a good solution?

Also, if this is an OK solution, in the Detail table which should be
the first field? The foreign key to the master, or the unique keyF
to the detail?

Rgds,
-Ryan