liveBook · Manning

Entity-relationship diagram

As explained in Data-Oriented Programming: Reduce software complexity

A data entity diagram is a visual model that represents data entities and distinguishes association and composition relationships between them.

When a library system’s data is designed separately from its code, an entity-relationship diagram makes the structure explicit. It identifies entities, refines their fields, and distinguishes association from composition relationships. section 3.1 section 2.2

A practical design proceeds by making each relationship representable in data:

  • Group entities such as books, authors, users, members, and librarians into high-level areas. section 2.2
  • Represent a many-to-many Book–Author association with author IDs on books and book IDs on authors. section 3.1
  • Define identifiers and indexes explicitly, such as ISBN-based books and catalog lookup indexes. section 3.1
Figure 3.3 Library management relation model. Dashed lines (e.g., between Book and Author) denote indirect relations, [String] denotes a positional collection of strings, and {Book} denotes an index of Books.

Use the relation model to inspect indirect relations, positional string collections, and indexed entities. section 3.1

How Data-Oriented Programming: Reduce software complexity covers it

How deep it goes
Refines entities, fields, relationship kinds, identifiers, and indexes, but leaves broader representation details for later design.
Examples
Uses a library system containing books, authors, catalogs, users, members, and librarians.
What you can do after
Build it from scratch by grouping entities, classifying relationships, choosing identifiers, and defining lookup indexes.
How it connects
Connects data entities with data models, association, composition, identifiers, indexes, and separation of concerns.

Also explained in

Compare how 4 books explain entity-relationship diagram →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Data-Oriented Programming: Reduce software complexity. The section links point to the parts of the book it draws on.