Even though I am not sure what exactly you are trying to do I have a question for you.
What happens with the delete in all cases for your system?
Ok, "delete" is good point. Isn't resolved, yet in presented solution. I'm developing this on the fly, so I will edit my post, if I find something bad.
And what I trying to do:
It's hard to describe in my mother-language, so in english is more difficult. I will write example:
- I have database of gaming servers - table "servers"
- I have self-defined properties for them - in table "properties" (for example: IP, name, several server configuration parameters... - I have not exact count for now and I don't want to rebuild database after each add of new parameter)
- I have N:N table for join it in table "server_properties"
- BUT DIFFERENCE between classic N:N relation and this relation is, that I set properties for every servers, but not every property is needed to fill. VALUE of property is NOT in "properties" table, but in "server_properties" table. For example: I have property "IP" I want it for every server, so every server get only ID from properties table, but I don't want ID, I want join value to it - so I put value, for example "127.0.0.1" in "server_properties" table in field "value".
servers
item: id_server = 1
...
properties
item: id_property = 1 | label = "IP" | codename = "ip"
...
server_properties
item: id_server_property = 1 | id_server = 1 | id_property = 1 | value = "127.0.0.1"
- Now I know, that I should divide this form into 2 forms (cruds) - For servers (with categories, etc) itself and for properties and join them (link from server item to properties crud) - maybe I will rebuild it in future, now I like the idea have "all in one"