A simple design with the following tables should suffice:
Code:
Table product (id, name, description, ...)
module(id, name, description, ...)
product_module_usage(product_id references product(id),
module_id, references module(id) ...)
The primary keys are in
bold.
This way, a module can have as many parents as it cares to.
For the bug tracking part, one way of doing it is:
Code:
Table bug (id, name, description, reported_date, resolved_date, ...)
Table affected_modules(bug_id, references bug(id),
module_id references module(id),....)
Columns involved in the primary key may not be null, thus satisfying your business requirement.
You can create a view called affected_products by using the affected_modules table and the product_module_usage table.
Conversely, you can create the table affeted_products and the view affected_modules. Either way, what is a table and what is a view does not matter much.
Hope that helps.
Ravi