Changes

Jump to navigation Jump to search
731 bytes added ,  23:15, 9 February 2023
Line 45: Line 45:  
|-
 
|-
 
| Studies || text || M2M
 
| Studies || text || M2M
 +
|}
 +
 +
Each primary key (disease) can be associated with multiple values in each attribute. For example, CAD is associated with multiple risk factors (age, male gender, smoking, etc) and multiple symptoms (angina, dyspnea, nausea, etc). At the same time, each of these risk factors and symptoms are associated with other diseases besides CAD. For example, smoking is a risk factor for CAD, lung cancer, PVD, COPD, head and neck cancer, etc. In order to handle this many-to-many cardinality of the data, multiple base tables should be created and an associative table (junction table) can then be created as needed. The base tables in the above example would be:
 +
{| class "wikitable"
 +
|+ Base Table 1
 +
|
 +
! Disease (PK)
 +
|-
 +
| Risk factors
 
|}
 
|}
 
Disease < Symptom < Disease
 
Disease < Symptom < Disease

Navigation menu