erd: An entity-relationship diagram generator from a plain text description.

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.


erd transforms a plain text description of a relational database schema to a graphical representation of that schema. It is intended that the graph make use of common conventions when depicting entity-relationship diagrams, including modeling the cardinality of relationships between entities.

A quick example that transforms an er file to a PDF:

$ curl '' >
$ cat
# Entities are declared in '[' ... ']'. All attributes after the entity header
# up until the end of the file (or the next entity declaration) correspond
# to this entity.


# Each relationship must be between exactly two entities, which need not
# be distinct. Each entity in the relationship has exactly one of four
# possible cardinalities:
# Cardinality    Syntax
# 0 or 1         0
# exactly 1      1
# 0 or more      *
# 1 or more      +
Person *--1 Location
$ erd -i -o simple.pdf

The PDF should now contain a graph that looks like this:

See the file for more examples and instructions on how to write ER files.


Dependenciesbase (>=4.5 && <5), bytestring (==0.10.*), containers (==0.6.*), directory (>=, erd, filepath (>=, graphviz (==2999.20.*), parsec (==3.1.*), raw-strings-qq (>=1.1), text (==1.*), yaml (>= [details]
AuthorAndrew Gallant
CategoryDatabase, Development
Home page
Source repositoryhead: git clone git://
UploadedSun Nov 24 21:04:57 UTC 2019 by mmzx




Maintainers' corner

For package maintainers and hackage trustees