Entity Modelling

www.entitymodelling.org - entity modelling introduced from first principles - relational database design theory and practice - dependent type theory


This website is an online book, part written as yet, in which entity modelling and data design, both relational and hierarchical, are described from first principles so as to harmonise with and benefit from mathematical type theory and category theory. It features a new theory of relational design supported by open source software implementing the physical data design transformation and other model transformations accompanied by code generators to support a variety of programming languages.

I give the reader the challenge, as I have given myself, of understanding and articulating entity modelling and the whole business of representation of the world in data from first principles and without reliance, recourse or reference to particular technology - neither any programming language nor any database system. I wish the reader to be open to discovering previously unrecognised patterns of concepts and data in their own areas of interest and of a kind that can be exploited in database design and software development.

Entity Modelling ...

Entity modelling is saying what is and doing so purposefully— it's a technique and a notation for describing and communicating what is in the world and we set out to present it here from first principles. It enables the representation of conceptual models. Its practitioners represent types of entity as labelled boxes and relationships as annotated connections between boxes:

There is no standard notation for entity modelling - different authors use different diagramming styles and models are variously known as entity models, entity-relationship (ER) models or entity relationship attribute (ERA) models. This site promotes a notation that is an extension of the data modelling notation used in the SSADM1 software design methodology and which is described in a book by Richard Barker2. Sometimes, recognising the influence of Harry Ellis, it is described as the Barker-Ellis notation. It is used in a number of data modelling tools including Oracle's SQL Developer Data Modeler.

...with a Difference

Compared to the many books, web pages and lecture notes on this subject, key differentiating features of the presentation here are

  • we describe concepts from afresh and, as part of the deal, neither rely on nor promote some established terminology which we judge to be not fully fit for purpose,
  • a distinction is made between composition relationships and reference relationships,
  • diagrams are laid out top-down,
  • there is the concept of the scope of a relationship which is then utilised in data design and code generation,
  • database design is right first time — the normalisation step from relational data design is eliminated,
  • the pullback concept from category theory is incorporated and feeds into code generation.

These differences in approach represent a significant and valuable step up from established practice. The crux, as expressed in the penultimate bullet point above, is the elimination of the database normalisation step and therefore of much of physical database modelling - the fulcrum on which this hinges is the modelling of the scope of reference relationships as a way of encapsulating commutative diagrams of relationships.


Perspective Entity Modelling — An Introductory Perspective that seeks to locate entity modelling so that it is not seen as an isolated discipline. Entity modelling evolved in the 1960s an 70s as an abstract way to describe databases (more specifically the structure of databases), and so it is, but its utility goes further than this as described here.

Tutorial Part One The Entity Modelling Tutorial Part One — Entities, Relationships and Attributes which introduces from first principles a good part of the basic notation.

Examples One Examples and applications of the notation of Tutorial One which contains various examples of modelling using the notation introduced upto this point.

Tutorial Part Two Entity Modelling Tutorial Part Two - Representing Data which is a tutorial describing use of the notation for data modelling.

Blog Data Modelling, Entity Modelling and Logic Some further thoughts on data modelling, entity modelling and logic.

ER Script Software ER Script — Concept to Code First release of this open source software.

Theory The mathematics of dependent types, category theory and entity modelling Work in progress - papers about dependent types and category theory.

The Author About the Author

1 Goodland, Mike and Slater, Caroline. SSADM Version 4: A prractical Approach. McGraw Hill Publishing Co., 1995.
2 Barker, Richard. Case Method: Entity Relationship Modelling. Addison-Wesley Longman Publishing Co., Inc., Boston, MA, USA, 1990.