# Embedding vs Referencing

*noun*

say it: **“em-BED-ing VER-sus REF-er-un-sing”** **/ɛmˈbɛdɪŋ ˈvɝsəs ˈrɛfərənsɪŋ/**

The choice between storing related data inside a document and storing only an id that points to another document.

## What is **Embedding vs Referencing**?

**Embedding** puts related data inside the document (an order's lines); **referencing** stores an ID pointing to another document (the customer). Embed what is read together and bounded in size; reference the rest.

## In a sentence

- “Decide **embedding vs referencing** from how the app reads the data.”
- “The **embedding vs referencing** question: an order's lines go inside the order, the customer is a reference.”

Level: Apprentice · [More NoSQL terms at this level](https://www.ask-codey.com/glossary?category=nosql&level=2)

Updated: November 19, 2026

Source: https://www.ask-codey.com/glossary/embedding-vs-referencing
