I have a RDBMS database and I need to associate a column in a new table to multiple other existing tables whose schema can't be changed.
The new table looks something like this,
UUID(pk) PartId(pk) Somecolumn1 SomeColumn2
asdf56das 0001 val1 val2
u44ighhuh 0002 val3 val4
u44ighhuh 0003 val5 val6
I want to associate UUID column with data from other tables.
One method is to add a XML column to this new table which would store the associations as,
<tablename><pkcolumn1>value</pkcolumn1>
<pkcolumn2>value2</pkcolumn2>...........<pkcolumnN>valueN</pkcolumnN>
</tablename>
With this approach there is some performance cost involved in creating and parsing XML.
One other way is to have a new "Mapping table" which will map the new table with the other existing table that I am trying to establish an association with.
Are there any other ways we can solve this?