I am trying to solve the following problem.
It seems to me that this is possible, but I do not seem to understand.
Here's the script:
Table 1 (Assets)
1 Asset-A
2 Asset-B
3 Asset-C
4 Asset-D
Table 2 (Attributes)
1 Asset-A Red
2 Asset-A Hard
3 Asset-B Red
4 Asset-B Hard
5 Asset-B Heavy
6 Asset-C Blue
7 Asset-C Hard
If I am looking for something that has the same attributes as Asset-A, then it should identify Asset-B, since Asset-B has all the same attributes as Asset-A (it should drop heavy because Asset -A didn’t indicate something else or similar). Also, if I wanted only the attributes for Asset-A AND Asset-B to be distributed, how would I get this?
It seems simple, but I can not nail it ...
The actual table I'm using is almost exactly Table2, just the association of AssetId and AttributeId like this: PK: Id
int: AssetId
int: AttributeId
I just included the idea of an asset table to simplify the issue.