Watch this example for an identifying relationship between project and bug:
MySQL Workbench creates on identifying relationships not a single primarykey like bug.id
for table bug
. The primary key in this case consist of bug.id
and bug.project_id
beacause project
is the identifying parent entity for bug
.
If I make in this case a n:m
table like bug_has_media
there are also the primarykey field bug_project_id
added with reason project
has an 1:n identifying relationship
with bug
. In this case MySQL Workbench create this bug_project_id
field automatically. Is it possible to delete the bug_project_id
field in bug_has_media
if it's not necessary? Or what is the background and purpose for difference between identifying and non-identifying relationships in MySQL? I know what the meaning of these two relationships is. But not why MySQL Workbench in this situation creates primarykeys based on two fields, and add these two fields in all n:m relations.