Tables in this data model
- policyholders — 3 columns
- products — 3 columns
- policies — 7 columns
- coverages — 5 columns
- premiums — 5 columns
- adjusters — 2 columns
- claims — 6 columns
- claim_payments — 4 columns
How to use this ER diagram template
- Click Open in the editor. The ER diagram opens on a new page in FlowDiagram — nothing is uploaded and there is no sign-up.
- Rename, add or delete shapes and drag them where you want; connectors stay attached as things move.
- Drop in vendor logos from the library — 1,160 of them, including every AWS, Azure and Google Cloud service icon — or restyle it with the colour and theme controls.
- Prefer text? Edit the SQL DDL below and paste it in through ☰ → Import / export SQL; the finished model exports back to DDL.
- Export to PNG, SVG or PDF, or press Ctrl+L for a link that carries the whole diagram.
SQL DDL source
The whole template is the text below. Paste it into FlowDiagram, keep it in Git next to the code it describes, or hand it to an AI assistant to extend.
CREATE TABLE policyholders (
holder_id INTEGER NOT NULL PRIMARY KEY,
full_name VARCHAR(150) NOT NULL,
dob DATE
);
CREATE TABLE products (
product_id INTEGER NOT NULL PRIMARY KEY,
line VARCHAR(30) NOT NULL,
name VARCHAR(80) NOT NULL
);
CREATE TABLE policies (
policy_id INTEGER NOT NULL PRIMARY KEY,
holder_id INTEGER NOT NULL REFERENCES policyholders(holder_id),
product_id INTEGER NOT NULL REFERENCES products(product_id),
policy_no VARCHAR(30) NOT NULL UNIQUE,
starts_on DATE NOT NULL,
ends_on DATE NOT NULL,
status VARCHAR(20) NOT NULL
);
CREATE TABLE coverages (
coverage_id INTEGER NOT NULL PRIMARY KEY,
policy_id INTEGER NOT NULL REFERENCES policies(policy_id),
kind VARCHAR(40) NOT NULL,
limit_amount DECIMAL(14,2) NOT NULL,
deductible DECIMAL(10,2)
);
CREATE TABLE premiums (
premium_id INTEGER NOT NULL PRIMARY KEY,
policy_id INTEGER NOT NULL REFERENCES policies(policy_id),
amount DECIMAL(10,2) NOT NULL,
due_on DATE NOT NULL,
paid_on DATE
);
CREATE TABLE adjusters (
adjuster_id INTEGER NOT NULL PRIMARY KEY,
full_name VARCHAR(150) NOT NULL
);
CREATE TABLE claims (
claim_id INTEGER NOT NULL PRIMARY KEY,
policy_id INTEGER NOT NULL REFERENCES policies(policy_id),
coverage_id INTEGER REFERENCES coverages(coverage_id),
adjuster_id INTEGER REFERENCES adjusters(adjuster_id),
loss_date DATE NOT NULL,
status VARCHAR(20) NOT NULL
);
CREATE TABLE claim_payments (
payment_id INTEGER NOT NULL PRIMARY KEY,
claim_id INTEGER NOT NULL REFERENCES claims(claim_id),
amount DECIMAL(14,2) NOT NULL,
paid_on DATE NOT NULL
);
Related: Database schema diagram tool · ER diagram from SQL · All database & er models templates · All 521 templates