⚠ Switch to EXCALIDRAW VIEW in the MORE OPTIONS menu of this document. ⚠ You can decompress Drawing data with the command palette: ‘Decompress current Excalidraw file’. For more info check in plugin settings under ‘Saving’
Excalidraw Data
Text Elements
Embedding vs. referencing
Embedded
order 1001
customer: { name: “Anna”, city: “Krems” }
items: [ { product: “Keyboard”, price: 40, qty: 1 }, { product: “Mouse”, price: 25, qty: 2 } ]
- one read, one atomic write – Anna’s data is copied into every order (duplicates)
Referenced
order 1001
customer_id: 1
items: [ … ]
customer 1
name: “Anna” city: “Krems”
points to
- no duplicates, change Anna once – second query / $lookup needed – two documents = no single-document atomicity any more
Rule of thumb: embed what you read together, reference what changes on its own or grows without limit