Entity Modelling

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

ER Script — Concept to Code

Open source software for scripting ER models and generating code.

About this software

This chapter describes entity modelling software designed and written by the author and supporting both software and database design and code generation to a modern technology stack. This software is copyright Cyprotex Discovery Ltd. but is made freely available under a GPL v3 license. Before you download it you need be aware that currently this software does not include a graphical user interface, instead ER models inclusive of diagrams are scripted — they require representation in XML. From the XML, diagrams can be generated in svg format and also in postscript or pdf format using the pstricks latex packages. A variety of code generators support implementation in XML, typescript, python and in Google's protocol buffer format.

Code generators inclusive of the diagram generators are written in xslt 2.0 and have been developed and tested using the Saxon xslt processor. All the diagrams in this book have been generated this way; indeed the whole book is generated from structured content represented in XML — the structure of which content — you should have guessed it — is described by an ER model. Along the same lines, the XML representation of an ER model has a structure which is described by an ER meta model.

This software is a work in progress. The source code is made freely available on GitHub at JohnWCartmell/ERmodelSeries1. Raise an issue on Github or contact the author john.w.cartmell on gmail if you would like to get involved. There is lots to be done but the project is clear and the current implementation has been stress-tested, so to speak, in the development of business critical laboratory workflow systems at Cyprotex Discovery Ltd. To the software developer I say that to utilise this software you need to be bought into, or to be open to an idea of a smooth path from concept to code, to the ideas of Computer Aided Software Engineering (CASE) and, as a corollary, to the idea of meta-CASE. The software implements the novel ideas described in the relational design section of this book — as a user you can model scope and eliminate data normalisation — you get a smoother road, concept to code.

The following development work is in progress:

  • Improved scripting of diagrams — this is the highest priority.
  • Support for universals and reference by type.
  • Support for recursive identification.
  • Support for rules.
  • Though the relational concepts are all there, the final translation into SQL has not been programmed as yet.

ERScript Release 3

First public release of this software. Click here to download. This is a zip file containing the ER modelling software and also containing Saxon and Jing jar files — each of these have their own specific license conditions and these are included in the download.