Cookie

This site uses tracking cookies used for marketing and statistics. Privacy Policy

  • Home
  • FAQs
  • Embedded vs referenced: how do you decide?

Embedded vs referenced: how do you decide?

The decision comes from your access pattern, not from an abstract rule. Embed when the child data is always accessed with the parent, when it does not grow unbounded, and when it does not change independently. Reference when the child data is accessed independently, when it grows unbounded (activity logs, comments, transactions), when multiple parents share it, or when it needs its own indexes. Extended Reference is the middle ground: reference the child but embed the 3 to 5 fields you always display alongside the parent to avoid the join.