Well, I'm in a middle of some design issue. I'm trying to built kinda universal commenting system for my site. So I started with two tables:
Comment_node has many Comments
Now I want to be able to attach my cool comment system to various places on my site. For example to blog_posts and to user_pages.
blog_posts has one comment_node
user_pages has one (different) comment_node
So I ended up in idea of storing additional comment_node_id field in blog_posts and user_pages tables. But the problem here is in the fact that this connection is unidirectional - I can get Comment node from either blog posts and user pages, but having comment_node I cannot find which other table uses it.
Sure I may store 'linked_table' string in comment_nodes or something, but I suppose that will kill my database design.
Is there a nice way to achieve this? thanks