Composite PK, restricting the values for the 2nd column of the FK in the child table

[expired user #6206]'s profile image [expired user #6206] posted 12 years ago in Feature discussion Permalink
Hi guys,

I was using the front end to populate a child table linked to the one below where PK=grp+id

+--------+----+---------+
| grp* | id*| name |
+--------+----+---------+
| fish | 1 | lax |
| mammal | 1 | dog |
| mammal | 2 | cat |
| mammal | 3 | whale |
| bird | 1 | penguin |
| bird | 2 | ostrich |
+--------+----+---------+

And the problem I've encountered is that the front end doesn't restrict the value you can enter in the 2nd column depending on what you've already choosing for the 1st column of the FK.

For example, in the child table I wanted to use a FK of fish & 1 (as 1 is the only value in the table above) and heidiSQL front end displayed me 1, 2 and 3 once I've already selected 'fish' for the 1st column and then it even accepted 3 as the value for the 2nd column (when I was expecting that to fail) :S

Is there a way to restrict the values that are displayed on the 2nd column depending on what you've already selected for the 1st?

Many thanks!

Please login to leave a reply, or register at first.