Created
April 20, 2025 05:39
-
-
Save XavM/0373e4529142da34c5e63120735df429 to your computer and use it in GitHub Desktop.
DB test DrawIO
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<mxfile host="app.diagrams.net"> | |
<diagram name="E-commerce DB Schema" id="schema1"> | |
<mxGraphModel dx="800" dy="600" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1"> | |
<root> | |
<mxCell id="0" /> | |
<mxCell id="1" parent="0" /> | |
<!-- Users --> | |
<mxCell id="Users" value="Users
id (PK)
name
email" style="shape=swimlane;childLayout=stackLayout;" vertex="1" parent="1"> | |
<mxGeometry x="40" y="40" width="160" height="120" as="geometry" /> | |
</mxCell> | |
<!-- Products --> | |
<mxCell id="Products" value="Products
id (PK)
name
price" style="shape=swimlane;childLayout=stackLayout;" vertex="1" parent="1"> | |
<mxGeometry x="300" y="40" width="160" height="120" as="geometry" /> | |
</mxCell> | |
<!-- Orders --> | |
<mxCell id="Orders" value="Orders
id (PK)
user_id (FK)
order_date" style="shape=swimlane;childLayout=stackLayout;" vertex="1" parent="1"> | |
<mxGeometry x="40" y="200" width="160" height="120" as="geometry" /> | |
</mxCell> | |
<!-- OrderItems --> | |
<mxCell id="OrderItems" value="OrderItems
id (PK)
order_id (FK)
product_id (FK)
quantity" style="shape=swimlane;childLayout=stackLayout;" vertex="1" parent="1"> | |
<mxGeometry x="300" y="200" width="180" height="140" as="geometry" /> | |
</mxCell> | |
<!-- Edges (Relationships) --> | |
<mxCell id="edge1" style="endArrow=block;" edge="1" source="Orders" target="Users" parent="1"> | |
<mxGeometry relative="1" as="geometry" /> | |
</mxCell> | |
<mxCell id="edge2" style="endArrow=block;" edge="1" source="OrderItems" target="Orders" parent="1"> | |
<mxGeometry relative="1" as="geometry" /> | |
</mxCell> | |
<mxCell id="edge3" style="endArrow=block;" edge="1" source="OrderItems" target="Products" parent="1"> | |
<mxGeometry relative="1" as="geometry" /> | |
</mxCell> | |
</root> | |
</mxGraphModel> | |
</diagram> | |
</mxfile> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment