Hi I know that this question has been asked before but I fail to find an efficient way to solve my problem. I have a table that has 10 columns accepting INT that is referring to 10 other tables. My problem is that now I require to have in just one column, two Integers that are both referring to the same table. How is this possible? I thought of having another table to save one row per column and have 10 rows per row of the first table and in this way I can have it linked with that first table's ID but now a new problem.. I can't know which row references which table since in this way it becomes dynamic. Is there any solution to this?
Edit: Just thought of creating 10 new tables all linking to the first table which in turn references everything. Is that really the only way? This will leave me with 21 tables but it will work. Is this good for performance?