I have an entity type called 'Object', and I need to model an object set as a list of unique objects with variable length. Then, each object could belongs to many object sets.
Current entity-relationship diagram (ERD)
This is my ERD so far, with a many-to-many relationship:
At this point, we have the next tables:
- ObjectID (PrimaryKey)
- ObjectSetID (PrimaryKey)
- ObjectSetID (ForeignKey)
- ObjectID (ForeignKey)
Using this model, we could have two different sets of objects with exactly the same combination of objects, which could never happen.
How could improve my model to implement this restriction?