Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
dean
Starting Member
1 Post |
Posted - 2010-10-20 : 16:33:40
|
Is there a clever way to accomplish the following:One table to hold user comment information. This table would require a many-to-many relationship to dozens of other tables.NOT have to create dozens of junction (bridge, linker) tables?One way I thought of is storing the ID of the table name row of sysobjects system table so I can retrieve the table name to know which table to query from and also to filter what rows apply as the foreign key. This seems a little clumsy and possibly prone to errors (if the ID in sysobjects is deleted or table name changes). If the best way is the junction tables, I'll probably just create multiple comment tables for a one-to-many relationship for each table that needs comments. |
|
jezemine
Master Smack Fu Yak Hacker
2886 Posts |
Posted - 2010-10-21 : 08:12:54
|
I would not use the object_id from sys.objects. elsasoft.org |
|
|
|
|
|