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

[ database, development, program, public-domain ] [ Propose Tags ] [ Report a vulnerability ]

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 is just below. The original source file can be found amongst the examples in the repository.

$ cat simple.er
# 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.
#
[Person]
*name
height
weight
+birth_location_id

[Location]
*id
city
state
country

# 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 simple.er -o simple.pdf

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

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

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.1.0, 0.1.2.0, 0.1.3.0, 0.2.0.0, 0.2.1.0
Change log changelog.md
Dependencies base (>=4.5 && <5), bytestring (>=0.10 && <0.11), containers (>=0.5.11.0), directory (>=1.3.1.5), filepath (>=1.4.2), gitrev (>=1.3.1), graphviz (>=2999.20 && <2999.21), parsec (>=3.1 && <3.2), raw-strings-qq (>=1.1), text (>=1 && <2), yaml (>=0.8.32) [details]
Tested with ghc ==8.6.4 || ==8.4.4
License LicenseRef-PublicDomain
Author Andrew Gallant
Maintainer jamslam@gmail.com
Category Database, Development
Home page https://github.com/BurntSushi/erd
Source repo head: git clone git://github.com/BurntSushi/erd.git
Uploaded by mmzx at 2020-02-02T11:59:04Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Executables erd
Downloads 7008 total (23 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
Last success reported on 2020-02-02 [all 3 reports]