Design Patterns for CosmosDB and/or Graph Databases

Author: aronchick

Originally Sourced from: https://stackoverflow.com/questions/61641962/design-patterns-for-cosmosdb-and-or-graph-databases

I have a graph with the following pattern:

- Workflow:

-- Step #1
--- Step execution #1
--- Step execution #2
    [...]
--- Step execution #n

-- Step #2
--- Step execution #1
--- Step execution #2
    [...]
--- Step execution #n

[...]

-- Step #m
--- Step execution #1
--- Step execution #2
    [...]
--- Step execution #n

I have a couple of design questions here.

  1. Is it appropriate to have so many execution documents hanging off a single vertex? E.g. each "step" could have 100s of 'executions' off it. I'm using two edges to connect them - 'has_runs' (from step -> execution) and 'execution_step' (from execution -> step).
  2. Each 'execution' has (theoretically) unlimited properties associated with it, but is probably 10 < x < 100 properties. Is that ok? Are graph databases made to support many, many properties off a vertex? All the demos I've seen seem to have <10 total properties.