I have a user that is linked to an item list where the item could be linked to multiple type tables (either or).
table users
id|name|email|etc
table itemnos
id|code
table itemtype1
id|item|size|etc
table itemtype2
id|name|dob|etc
Normally I would just use a join table but, each type tables id could conflict and I am wondering which way I should configure this. I was thinking
join_users_itemnos_itemtype1_itemtype2
Where the type column would be either 0 or the id of the related table
Does this make sense or is there a better way? I am also thinking of the select query and how I would select the related items to display.
Any help or suggestions would be appreciated.