Tool guide · Database Design & Development

Building SQA-style ER and entity-occurrence diagrams in draw.io

draw.io (also called diagrams.net) is a free, browser-based diagramming tool. This guide shows you how to build both diagram types DDD needs so they match exactly what SQA expects to see — not just any diagram draw.io lets you make.

app.diagrams.net No account needed Entity Relation library Crow's-foot notation Entity-occurrence diagrams

A free browser-based tool — no account, no install

draw.io (diagrams.net) runs at app.diagrams.net. You don't need to create an account, and it's free to use. For Higher DDD, you'll use it to build entity-relationship diagrams with SQA's crow's-foot notation, as evidence for DDD2's task-set questions and later ER-diagram work.

On school devices: when draw.io asks "Where do you want to save your diagram?", choose Device — OneDrive sign-in is blocked on school machines. Save your working file to your H drive, and export a PNG separately for anything you need to submit or paste into a lesson.
Setup

Open draw.io and load the Entity Relation shapes

app.diagrams.netDeviceBlank DiagramMore ShapesEntity Relation
  1. 1

    Go to app.diagrams.net. When asked where to save, choose Device.

  2. 2

    Choose Create New Diagram, then Blank Diagram.

  3. 3

    At the bottom of the left-hand shape panel, click More Shapes. Under the Software category, tick Entity Relation, then click Apply. This adds a set of ready-made connector ends for cardinality — you'll use these instead of drawing crow's feet by hand.

  4. 4

    You should now see an extra shape section in the left panel with pre-styled ER connectors. Leave this open — you'll come back to it in the connectors section below.

Entity box

Build an entity box the way SQA expects to see it

draw.io's Entity Relation library also includes ready-made "database table" shapes with their own built-in primary/foreign key icons. Don't use those for Higher DDD — they don't look like SQA's expected notation. Use a plain rectangle with manually formatted text instead, so your diagram matches what an SQA answer is expected to look like.

  1. 1

    From the General section of the left panel, drag a plain Rectangle onto the canvas.

  2. 2

    Double-click the rectangle and type the entity name on the first line, then press Shift+Enter to add each attribute on its own line below it.

  3. 3

    Highlight the primary key's text, then use the Format panel on the right (or the floating text toolbar) to apply underline.

  4. 4

    For each foreign key, type an asterisk * directly after the attribute name — SQA's own convention, not a draw.io feature, so it's just typed text.

  5. 5

    Resize the box using the blue handles if the text doesn't fit neatly.

Booking bookingRef memberID * classCode * bookingDate attended
Connectors

Crow's-foot connector ends — use only "one" and "many"

Hover over an entity box until blue arrows appear, then drag from a blue arrow to another entity box to draw a connector. Double-click the connector to add its relationship name (a verb phrase, e.g. "generates").

  1. 1

    Click the connector to select it, then open the Format panel on the right (or the Arrange tab → line-end options).

  2. 2

    Use the dropdown arrows at each end of the line to pick a crow's-foot style. Hover over each option before choosing — the list includes several styles, not just the two you need.

  3. 3

    Put a plain single-line end ("one") on the entity that is the "one" side of the relationship, and the crow's-foot ("many") end on the entity that is the "many" side.

Higher only needs "one" and "many." draw.io's connector-end list also includes optionality styles like "zero or one" and "zero or many" — these come from full crow's-foot notation used in industry, but they're not part of the Higher DDD specification and aren't examined. Don't use them, even if one looks like a closer match to a relationship you're drawing — stick to the plain line and the plain crow's foot.
EO diagram

Ovals, dots, and plain lines — no crow's foot needed

An entity-occurrence diagram is simpler to build than an ER diagram — it just needs two tall ovals and a dot for each individual record, joined by plain connector lines. You don't need the Entity Relation library or any crow's-foot connector ends for this one.

  1. 1

    From the General section of the left panel, drag two Ellipse shapes onto the canvas, tall and narrow, one for each entity. Label each one above the oval.

  2. 2

    Add a small circle (or use the Ellipse shape resized very small) inside each oval for every individual record in your sample data. Label each dot with its record's ID.

  3. 3

    Draw a plain connector line between two dots whenever those two specific records are linked — hover over a dot until the blue arrows appear, then drag to the other dot. Don't use any crow's-foot connector ends here; a plain line is all an EO diagram needs.

  4. 4

    Once every line from your sample data is drawn, count the lines leaving each dot on both sides to work out the cardinality, then state it in words next to the diagram — a diagram without a stated cardinality doesn't get full marks.

Member Booking
Draw the dots first, then the lines. Placing every dot before connecting anything makes it much easier to check you haven't missed a record from the sample data — count your dots against the sample data before drawing a single line.

What examiners and this guide both flag

Using draw.io's database-table shape

The dedicated ER "table" shapes look like a real database schema, not SQA's plain-rectangle-with-underline-and-asterisk convention. Stick to a plain rectangle with manually formatted text.

Picking an optionality connector end

"Zero or one" / "zero or many" ends are real draw.io options but aren't part of the Higher spec. Use only the plain line ("one") and the crow's foot ("many").

Missing the underline or the asterisk

A primary key must be underlined and a foreign key marked with * — this is typed formatting you apply yourself, draw.io won't add it automatically.

Naming a relationship with a noun

Label the connector with a verb phrase ("teaches", "generates"), not an entity name — the same rule as when describing relationships in words.

Forgetting to export a PNG

Your .drawio working file only opens in draw.io. Always export a PNG as well if you need to paste your diagram somewhere else, like a lesson task or the assignment.

Missing a dot on an entity-occurrence diagram

Every distinct record mentioned in the sample data needs its own dot. Count your dots against the sample data before drawing any connector lines — a missing or extra dot breaks the diagram's accuracy.

Not stating the cardinality

An entity-occurrence diagram on its own doesn't answer the question — always write the cardinality (e.g. "one-to-many") next to the diagram rather than leaving it to be inferred.

Export

Save your working file, then export a PNG

  1. 1

    Save your working file regularly with Ctrl+S (draw.io saves as a .drawio XML file) to your H drive.

  2. 2

    When your diagram is finished, use File → Export As → PNG. Keep the default settings and click Export.

  3. 3

    Save the PNG somewhere you can find it again, then use it to compare against the model answer in your lesson task.

ActionWindowsMac
SaveCtrl+SCmd+S
UndoCtrl+ZCmd+Z
Zoom inCtrl+=Cmd+=
Fit pageCtrl+Shift+HCmd+Shift+H
ExportCtrl+Shift+ECmd+Shift+E