Forum OpenACS Q&A: combining general-comments, categories and survey simple

One part of our platform is an opinion system ala epinions.

We are using general_comments on categories. The comment
(in our case opinion) has on_what_id = category_id and
on_which_table = categories.

We would like to integrate survey simple with our opinions now...

If we want to integrate a specific survey to a category (product),
we can alter the table where the survey is saved in the db and
add one row for on_what_id and and another for
on_which_table.

BUT if we want to have a group of products that use the same
survey... Anyone with a good idea?

David, we have been working with the categories in the last months a lot, but not exactly in the same way.

Probably if simplicity matters (always matters) you can just add a new row to your category table that references to survey_id.
In that way you won't need to alter the survey table, no need to add more fields.

If you want to create something more nice, maybe, a single category could have more than one possible surveys? you can create a new table with three main fields,

cat_suv_id is a sequence

category_id

survey_id

The things should be different if you want convert the survey module ala general_comments, in order to apply it to whatever module you want.

Hope this helps!