Databases

Online Shop ER DiagramdatabasesCrow's foot ER model of customers, orders, order lines, products and a category tree. Library ER Diagram (Chen)databasesChen notation for a lending library, with a weak entity, multivalued and derived attributes. Cardinality: Crow's Foot GuidedatabasesOne-to-one, one-to-many, many-to-many and optional relationships, and the SQL behind each. Logical Schema DiagramdatabasesSupport-desk tables with data types, keys, indexes and constraints, close to DDL. Star Schema DiagramdatabasesFact_sales with date, product, store and customer dimensions, plus a snowflake variant. Data Vault Model DiagramdatabasesHubs, links and satellites for customers, orders and products, and how marts are built on top.

Sample diagrams for designing databases and data warehouses: entity-relationship models in crow's foot and Chen notation, a cardinality guide, a logical schema with keys and indexes, a star schema and a Data Vault. Each page is a complete, realistic example you can copy.


1. Which Diagrams Databases Use

UML covers software structure and behaviour; these are the other standard notations used alongside it. Database work relies almost entirely on entity-relationship (ER) style diagrams, because the questions are about data: what is stored, how rows relate, and which keys and constraints hold it together. UML class diagrams can describe data too, but ER notation shows keys and cardinality more directly and is what DBAs, data engineers and modelling tools expect.

The section moves from concept to warehouse. A Chen or crow's foot ER diagram captures the business concepts. A logical schema adds columns, data types, primary and foreign keys and indexes, ready to become DDL. On the analytics side, a Data Vault integrates many sources with full history, and star schemas present that data to BI tools in an easy-to-query shape.

Database Modelling: From Idea to Warehouse Conceptual ER Chen / crow's foot Logical schema keys, types, indexes Physical DDL OLTP database Data Vault integration layer Star schema BI data marts ETL / CDC transactional (writes, OLTP) analytical (reads, OLAP) Every box is drawn with ER-style tables and crow's foot lines, except Chen for early concepts.

Every sample page shows one realistic diagram, a step-by-step walkthrough, a legend, a variant, pros and cons, and the same model as Mermaid or PlantUML code.

2. Pick a Diagram by Question

QuestionDiagramSample page
What things exist and how do they relate?Crow's foot ER diagramOnline Shop ER Diagram
What is a weak entity or a relationship attribute?Chen ER diagramLibrary ER Diagram (Chen)
Is this relationship optional, one or many?Cardinality line endingsCardinality: Crow's Foot Guide
Which columns, types, keys and indexes do we build?Logical schema diagramLogical Schema Diagram
How will analysts slice sales by date, product and store?Star schemaStar Schema Diagram
How do we integrate many changing sources with history?Data Vault modelData Vault Model Diagram

Most real projects use two or three of these together: an ER diagram for the operational database, then a star schema (and sometimes a Data Vault) for the warehouse fed from it.

Data ModellingSectionnotation and method references, including ER diagrams and normalisation Relational DatabasesSectionstar and snowflake schemas, Kimball architecture DiagrammingSectionUML, C4, BPMN and diagrams-as-code