图表
库
模板首页
在线编辑器
首页
/ 架构与系统 / 数据库表结构图
数据库表结构图模板
Database Schema
展示数据库表、字段、主键外键与表间关系的图表。后端开发文档与数据库设计评审的必备附件,表结构一图看懂。
开发文档
技术方案
浅色
深色
模板预览
Commerce schema · public + billing
Physical database schema diagram showing five commerce tables with column-level foreign keys, SQL types, and constraint chips, including a cascading delete from orders into order_items and a billing schema group.
BILLING
ON DELETE RESTRICT
ON DELETE CASCADE
ON DELETE RESTRICT
ON DELETE RESTRICT
public.customers
TABLE
id
PK
uuid
email
UQ
NN
text
created_at
NN
timestamptz
public.orders
TABLE
id
PK
uuid
customer_id
FK
NN
uuid
status
NN
text
total
NN
numeric(12,2)
placed_at
NN
timestamptz
INDEXES
idx_orders_customer_id
idx_orders_status
public.order_items
TABLE
id
PK
uuid
order_id
FK
NN
uuid
product_id
FK
NN
uuid
qty
NN
integer
unit_price
NN
numeric(12,2)
public.products
TABLE
id
PK
uuid
sku
UQ
NN
text
name
NN
text
price
NN
numeric(12,2)
+ 3 more columns
INDEXES
uq_products_sku
billing.invoices
TABLE
id
PK
uuid
order_id
FK
NN
uuid
issued_at
NN
timestamptz
LEGEND
Table
Schema group
PK
Constraint chip
Foreign key (column to column)
Destructive delete (CASCADE)
Commerce schema · public + billing
Physical database schema diagram showing five commerce tables with column-level foreign keys, SQL types, and constraint chips, including a cascading delete from orders into order_items and a billing schema group.
BILLING
ON DELETE RESTRICT
ON DELETE CASCADE
ON DELETE RESTRICT
ON DELETE RESTRICT
public.customers
TABLE
id
PK
uuid
email
UQ
NN
text
created_at
NN
timestamptz
public.orders
TABLE
id
PK
uuid
customer_id
FK
NN
uuid
status
NN
text
total
NN
numeric(12,2)
placed_at
NN
timestamptz
INDEXES
idx_orders_customer_id
idx_orders_status
public.order_items
TABLE
id
PK
uuid
order_id
FK
NN
uuid
product_id
FK
NN
uuid
qty
NN
integer
unit_price
NN
numeric(12,2)
public.products
TABLE
id
PK
uuid
sku
UQ
NN
text
name
NN
text
price
NN
numeric(12,2)
+ 3 more columns
INDEXES
uq_products_sku
billing.invoices
TABLE
id
PK
uuid
order_id
FK
NN
uuid
issued_at
NN
timestamptz
LEGEND
Table
Schema group
PK
Constraint chip
Foreign key (column to column)
Destructive delete (CASCADE)
在线编辑此模板
下载 SVG
相关图表模板
架构图
架构变更对比图
总体架构概览图
分层架构图
使用提示:在编辑器中可修改模板里的全部文字、替换配色,并导出 SVG(矢量无限放大)或 PNG(2 倍高清)用于文档、论文与演示文稿。