From: Jeremy C. <je...@co...> - 2005-01-12 02:06:26
|
I have about 9 tables that all accept notes. So, I created one note table that looks something like: CREATE TABLE notes ( id int unsigned auto_increment primary key, obj_type int, obj_id int unsigned, title varchar(80), body text); In each object I have a .OBJ_TYPE field that has a 1, 2, 3, etc... Then, when a note is added, I use both the .OBJ_TYPE and the object id to insert into the notes table. This gives me 1 table, and also when searching for information this is a great plus. I think you can see the problem already. How can I relate to that table in my 9 different objects? There needs to be an additional condition on my link. Is this possible? If not, is my database design bad? Thanks, Jeremy Cowgar |