Hi,I have a five tables representing a many to many relation as follows:
------------------------------------------
1.labels
------------------------------------------
id (primary key)
label_key
label_value
------------------------------------------
2.resource_a
------------------------------------------
id (primary key)
instance_name
------------------------------------------
3.resource_b
------------------------------------------
id (primary key)
instance_name
------------------------------------------
4.resource_c
------------------------------------------
id (primary key)
instance_name
------------------------------------------
5.resource_d
------------------------------------------
id (primary key)
instance_name
What I have tried:
Labels table id respectively with the following four resource table instance_name is a many-to-many relationship, my idea is to establish a middle table, a foreign key field in the table among associated labels in the table id, another field don't do link, just instance_name storage field, but this kind of structure when adding data don't know how to join
please advice me
Thank you