---
feature_story: FS_82_35_57_62
feature_title: envelope relationship data design
feature_status: TBD
---

For example, consider "is owned by" relationship between `data_envelope` classes:
a `ServiceEnvelopeClass.class_cluster` has many `ServiceEnvelopeClass.class_host`-s.

When `data_envelope`-s has an "is owned by" relationship (or the like) with another, there are two approaches:

*   A: populate all props identifying owner into ownee:

    `class_host` has extra props from `class_cluster`:

    *   `ServicePropName.code_maturity`
    *   `ServicePropName.geo_region`
    *   `ServicePropName.flow_stage`
    *   `ServicePropName.cluster_name`

*   B: populate only owner id prop only:

    `class_host` has only `ServicePropName.cluster_name` prop from `class_cluster`.

    In this case, these `prop_name`-s are useless to search `class_host`:

    *   `ServicePropName.code_maturity`
    *   `ServicePropName.geo_region`
    *   `ServicePropName.flow_stage`

   `class_host` `data_envelope` simply cannot be found by (`code_maturity`, `geo_region`, `flow_stage`)<br/>
   until `ServicePropName.cluster_name` is found by that tuple first.

   In this case, `cluster_name` (owner id) can be propagated as `ValueSource.init_value` into (ownee) `class_host`.

Comparison:

| A: propagate all       | B: propagate id only                                                                                   |
|------------------------|--------------------------------------------------------------------------------------------------------|
| no limitation          | no `class_host` props can be searched until `class_cluster` is found first                             |
| no limitation          | functions requiring `class_host` has to include search for `class_cluster`                             |
| no limitation          | narrowing down is not possible as `class_host` is indexed by exact unique `cluster_name` (one or none) |
| possibly slower search | likely faster search for initial (`code_maturity`, `geo_region`, `flow_stage`) tuple                   |

Basically, A is almost always a better choice.
