I'm working on a project where the database has a few tables that contain a type_id field that stores id's from multiple tables
for instance:
id | table_type | table id
==============================
1 ADDRESS 1
2 ADDRESS 2
3 CITY 1
4 CITY 2
4 ADDRESS 3
5 COUNTRY 1
the table_id field holds either an id from the Addresses table, or the Cities table, or the Countries table
I'm just wondering if this is good design. or should i avoid this whenever possible?
This table is used to grab all locations that a user has entered.