16 reputation
2
bio website
location PT
age
visits member for 2 years, 7 months
seen May 23 '12 at 17:49

Feb
13
comment Where to place junction table?
Yes, you've made a perfect job, and I can't be thankful enough. The main point is: all the data in the tables 'RiskCategories','RisksDangers','RiskConditions' and 'ControlMeasures' is already there. I use it, for instance, to populate combo box in the GUI. The user then selects some of those Conditions and Measures and i must save them. Some Conditions may have more than one Measure. I understand it may be a little confusing to explain, though.
Feb
13
comment Where to place junction table?
I have to continue here. I made this drawing wich I guess is closer to the solution: link. I realized I don't need to care with RiskCategories and Risks/Dangers, as I can access them by the RiskCondition. Basically, I have all the data in those tables, and then I need to be able to create a RiskAssessment with some of that data. It may have some RiskConditions, and some of those conditions may have ControlMeasures.
Feb
13
comment Where to place junction table?
Hi @gbn! Thanks for all the effort to help me, I really appreciate it! You were right by saying I neglected the modelling phase, but I'm really struggling to have the project finished on time. I read all you've written, and it helped me a lot on how to face the problem. However, I can't follow some of your advices. Explaining: the hierarchical model of the Categories->Dangers/Risk->RiskConditions->ControlMeasures has to be just like it is, unfortunatly. I have to be able to have a RiskCondition with several (or none) ControlMeasures.
Jan
18
comment Where to place junction table?
I've made some drawings to help me understand the problem. This one demonstrates the hierarchy between the categories, risks/dangers, risk conditions, and control measures: Hierarchy This is a sample of a 'risk assessment' entry on the database: Risk Assessment Entry As you can see, a 'risk_assessment' entry does not need all categories, neither all risks/dangers inside, and so on.
Jan
18
comment Where to place junction table?
Thaks for the answer JNK. I would like to know what is the best approach to do this. I know I could have a junction table linking 'risk_assessments' and 'control_measures', and from there get the 'risk_condition', the 'risk/danger' and the category'. But since one 'condition_risk' may not have 'control_measures', it wouldn't work.