1.Embed-when and reference-when signals
Three signals point to embedding: read together, bounded, naturally owned by the parent. Three signals point to referencing: grows independently, shared across many parents, has its own lifecycle. Most relationships show a clear majority one way.
Key features
- Embed signals: read together with the parent, bounded in size, owned only by this parent
- Reference signals: grows independently, shared across many parents, has its own lifecycle
- A relationship rarely shows every signal on one side — weigh which signals matter most for this workload
- When signals conflict, the more expensive failure mode (unbounded growth vs. an extra query) usually decides it
Command
// Embed signals: read-together + bounded + parent-owned
// Reference signals: independent-growth + shared + separate lifecycleEmbed: read together, bounded, parent-owned. Reference: independent growth, shared, own lifecycle. Weigh signals per relationship, not per document.