Columns used:
Name of the DB table | Columns Used | Is this column used for join? (Key) |
---|---|---|
Story | ID, Change ID, Project ID | ID (Story ID) |
Story Indicator Beneficiaries | ||
Story Change Beneficiaries Sub Ratios Indicators Changes | ||
Beneficiary | ||
Custom Fields |
Columns not used:
Name of the table | Columns not used |
---|---|
JSON Structure:
Way 1: (Story as unique value perspective)
Code Block | ||
---|---|---|
| ||
{
{
story {id:1
},
indicator { id10,id20,id30
},
change { id100,id200
},
beneficiary {001,0012,00123
},
custom fields {
}
}
} |
Way 1: (Story as unique value perspective) (Different Structure)
Code Block | ||
---|---|---|
| ||
{
{
{id:1, text: "i", story caregory id:7574, indicator {
id10,id20,id30
}, change { id100,id200
}, beneficiary {001,0012,00123
}, custom fields { 112:"Hello",113:"Hi"
}, latitude:110,longitude:130
},
{
{id:1, text: "i", story caregory id:7574, indicator {
id10,id20,id30
}, change { id100,id200
}, beneficiary {001,0012,00123
}, custom fields { 112:"Hello",113:"Hi"
}, latitude:110,longitude:130
},
{
{id:1, text: "i", story caregory id:7574, indicator {
id10,id20,id30
}, change { id100,id200
}, beneficiary {001,0012,00123
}, custom fields { 112:"Hello",113:"Hi"
}, latitude:110,longitude:130
},
{
{id:1, text: "i", story caregory id:7574, indicator {
id10,id20,id30
}, change { id100,id200
}, beneficiary {001,0012,00123
}, custom fields { 112:"Hello",113:"Hi"
}, latitude:110,longitude:130
}
} |
Way 2: (Individual response (It could be indicator or change) as unique value (One story can have multiple responses))
Downside: The same data needs to be sent multiple times
Code Block | ||
---|---|---|
| ||
{
story id:1,
indicator id:01,
},
{
story_id:2,
change_id:002
},
{
story_id:1,
indicator id:02
},
{
story_id:1,
change id:002
}
{
story_id:1,
indicator id:02
} |