I'm trying to design a simple database for a project I am working on and I just need a small amount of advice to get it wrapped up. I have a junction table taking two foreign keys and they won't necessarily be unique. Is this the kind of situation where you would add an auto-incremented index? Is it possible to then compound the three fields into a compound key?
Hopefully the picture here demonstrates my situation clearly.
The database is for storing game object information. Object is a generic object in the game world and components are children components of the object which will have associated information like mesh location and relative position. There are more fields in the junction table because each component needs its own position specified. If any object has multiple components of the same type then the two foreign keys (which would usually make up the primary key) won't be unique. So that's the situation I'm wondering how to handle.