If I have 6 fields in a table, where one of them is the id of "x" table so that it becomes the primary key e.g. "x_id" and then have a, b, c, d fields which are also id fields (a_id, b_id, c_id, d_id) to form a composite key, is this ok?
And the next question is how would I code up the MySQL?
Is it allowed to join a composite key field e.g. "a_id" (foreign key) in the child table to the primary key "a_id" of the parent table in a one-to-many relationship?
May I ask the relationship you plan on implementing? 6 keys seems to me like theres something a little excessive going on
It's a one-to-many relationship. There's only 4 keys now.
Well you see what I mean? You're down to 4 rather than 6. Can you explain the relationship? Column names and what they are / mean?
This topic is now closed. New replies are no longer allowed.