Assume I have a Table
StackBox that holds items as
Item. I allow
StackBox to have multiple
Item and I allow
Item to be in different
StackBox. It is obviously an m-to-n relation. Solving this with an according m-to-n mapping table is easy.
But my problem here is the thing that I want to store the information in which order many
Item are stored inside a
StackBox. I could e.g. add a column to the m-to-n mapping table. Is this a valid solution even though I never want to ask "At which places does
Item occur"? I am only interested in "At which place inside
Item with id x"?
The other option would be to create two additional tables of course. One for the mappings from
Item that just contains two index tables and another one for the mappings from
StackBox that contains the two index columns plus e.g. an additional column position.
I hope my question is clear. Please let me know if I should clarify anything.