For example I have a tag lookup table joining tags to 3 different types of tables (ObjectTypes). Each has tags, but they are not shared.
So I could do this
Tagid | ObjectType | ObjectId |
And when i join the table together I would just filter by object type before I joined.
Now I know that this would break the ability to do a foreign key on the ObjectId column sense is could be any of three tables.
Question is.. Is this a terrible thing? if so why?
The other option is to create a lookup table for each object, unless there is a better way.