<mxfile host="Electron"><diagram id="design-layers" name="Database Design Layers"><mxGraphModel grid="1" gridSize="10" page="1" pageWidth="960" pageHeight="460" background="#ffffff"><root>
<mxCell id="0"/><mxCell id="1" parent="0"/>
<mxCell id="title" value="Database design: five decisions, not one product label" style="text;html=1;fontSize=24;fontStyle=1;fontColor=#172b4d;align=left;" vertex="1" parent="1"><mxGeometry x="40" y="30" width="860" height="40" as="geometry"/></mxCell>
<mxCell id="sub" value="Work left to right. Revisit earlier decisions when measurements reveal a mismatch." style="text;html=1;fontSize=16;fontColor=#42526e;align=left;" vertex="1" parent="1"><mxGeometry x="40" y="80" width="860" height="40" as="geometry"/></mxCell>
<mxCell id="facts" value="1. MODEL&lt;br&gt;&lt;b&gt;What is true?&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0fe;strokeColor=#315b96;fontColor=#172b4d;fontSize=16;strokeWidth=2;" vertex="1" parent="1"><mxGeometry x="40" y="160" width="140" height="60" as="geometry"/></mxCell>
<mxCell id="queries" value="2. ACCESS&lt;br&gt;&lt;b&gt;What is queried?&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e8f0fe;strokeColor=#315b96;fontColor=#172b4d;fontSize=16;strokeWidth=2;" vertex="1" parent="1"><mxGeometry x="220" y="160" width="140" height="60" as="geometry"/></mxCell>
<mxCell id="correct" value="3. GUARANTEES&lt;br&gt;&lt;b&gt;What is allowed?&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#e0f2ec;strokeColor=#236b52;fontColor=#172b4d;fontSize=16;strokeWidth=2;" vertex="1" parent="1"><mxGeometry x="400" y="160" width="140" height="60" as="geometry"/></mxCell>
<mxCell id="layout" value="4. PHYSICAL&lt;br&gt;&lt;b&gt;Where is work?&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#fff1d6;strokeColor=#96620b;fontColor=#172b4d;fontSize=16;strokeWidth=2;" vertex="1" parent="1"><mxGeometry x="580" y="160" width="140" height="60" as="geometry"/></mxCell>
<mxCell id="ops" value="5. OPERATIONS&lt;br&gt;&lt;b&gt;How to recover?&lt;/b&gt;" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#f0eafa;strokeColor=#6b4596;fontColor=#172b4d;fontSize=16;strokeWidth=2;" vertex="1" parent="1"><mxGeometry x="760" y="160" width="140" height="60" as="geometry"/></mxCell>
<mxCell id="f-note" value="Customer → order&lt;br&gt;Order → line items&lt;br&gt;&lt;br&gt;Keys and relationships" style="text;html=1;whiteSpace=wrap;fontSize=15;fontColor=#172b4d;verticalAlign=top;" vertex="1" parent="1"><mxGeometry x="40" y="250" width="140" height="100" as="geometry"/></mxCell>
<mxCell id="q-note" value="Recent orders&lt;br&gt;by customer&lt;br&gt;&lt;br&gt;Filters and ordering" style="text;html=1;whiteSpace=wrap;fontSize=15;fontColor=#172b4d;verticalAlign=top;" vertex="1" parent="1"><mxGeometry x="220" y="250" width="140" height="100" as="geometry"/></mxCell>
<mxCell id="c-note" value="No orphan orders&lt;br&gt;No double charge&lt;br&gt;&lt;br&gt;Constraints and scope" style="text;html=1;whiteSpace=wrap;fontSize=15;fontColor=#172b4d;verticalAlign=top;" vertex="1" parent="1"><mxGeometry x="400" y="250" width="140" height="100" as="geometry"/></mxCell>
<mxCell id="l-note" value="Index before sharding&lt;br&gt;Replicas for copies&lt;br&gt;&lt;br&gt;Plans and placement" style="text;html=1;whiteSpace=wrap;fontSize=15;fontColor=#172b4d;verticalAlign=top;" vertex="1" parent="1"><mxGeometry x="580" y="250" width="140" height="100" as="geometry"/></mxCell>
<mxCell id="o-note" value="Lag and p99 alerts&lt;br&gt;Tested restore&lt;br&gt;&lt;br&gt;RPO and RTO" style="text;html=1;whiteSpace=wrap;fontSize=15;fontColor=#172b4d;verticalAlign=top;" vertex="1" parent="1"><mxGeometry x="760" y="250" width="140" height="100" as="geometry"/></mxCell>
<mxCell id="e1" style="edgeStyle=orthogonalEdgeStyle;html=1;strokeColor=#42526e;strokeWidth=2;endArrow=block;" edge="1" source="facts" target="queries" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="e2" style="edgeStyle=orthogonalEdgeStyle;html=1;strokeColor=#42526e;strokeWidth=2;endArrow=block;" edge="1" source="queries" target="correct" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="e3" style="edgeStyle=orthogonalEdgeStyle;html=1;strokeColor=#42526e;strokeWidth=2;endArrow=block;" edge="1" source="correct" target="layout" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="e4" style="edgeStyle=orthogonalEdgeStyle;html=1;strokeColor=#42526e;strokeWidth=2;endArrow=block;" edge="1" source="layout" target="ops" parent="1"><mxGeometry relative="1" as="geometry"/></mxCell>
<mxCell id="takeaway" value="SQL / NoSQL describes neither all five decisions nor the failure guarantees of a deployment." style="rounded=1;html=1;whiteSpace=wrap;fillColor=#f4f6f8;strokeColor=#c1c9d2;fontSize=17;fontColor=#172b4d;" vertex="1" parent="1"><mxGeometry x="40" y="380" width="860" height="50" as="geometry"/></mxCell>
</root></mxGraphModel></diagram></mxfile>
