Columns
| Column | Type | Size | Nulls | Auto | Default | Children | Parents | Comments |
|---|---|---|---|---|---|---|---|---|
| id | bigserial | 19 | √ | nextval('demographic_attribute_values_id_seq'::regclass) |
|
|
||
| demographic_item_type | varchar | 2147483647 | null |
|
|
|||
| demographic_item_id | int8 | 19 | null |
|
|
The demographic item which this value is linked to. This is a polymorphic reference, normally it would link to either a demographic_group or to a specific member. |
||
| demographic_attribute_id | int8 | 19 | null |
|
|
|||
| qualifier | varchar | 2147483647 | √ | null |
|
|
Optional qualifier for this demographic attribute value, eg. an “age bracket probability” row might have an age bracket as the qualifier, and a probability as the value. |
|
| value | varchar | 2147483647 | null |
|
|
String representing the value of this demographic attribute - expected to represent the data class/type in the linked demographic_attribute.data_class |
||
| source | varchar | 2147483647 | √ | null |
|
|
Optional source for where the information about the demographic group, member, etc came from |
|
| created_at | timestamp | 29,6 | null |
|
|
|||
| updated_at | timestamp | 29,6 | null |
|
|
Indexes
| Constraint Name | Type | Sort | Column(s) |
|---|---|---|---|
| demographic_attribute_values_pkey | Primary key | Asc | id |
| idx_demographic_attribute_values_on_demographic_item | Performance | Asc/Asc | demographic_item_type + demographic_item_id |
| idx_demographic_attribute_values_on_item_attribute | Must be unique | Asc/Asc/Asc | demographic_item_type + demographic_item_id + demographic_attribute_id |
| idx_demographic_attribute_values_on_item_attribute_qualifier | Must be unique | Asc/Asc/Asc/Asc | demographic_item_type + demographic_item_id + demographic_attribute_id + qualifier |
| index_demographic_attribute_values_on_demographic_attribute_id | Performance | Asc | demographic_attribute_id |
