X-Git-Url: https://git.auder.net/?p=erdiag.git;a=blobdiff_plain;f=README.md;h=83d1b909db3f30907f34bf8f17cb9705c82d809b;hp=2f543b96e5ff9a1221131b3c3311935666db549e;hb=01cb2ab3fccbc8e9fb6afd23db54c5e2613c24c5;hpb=3ca1e50c87c462e39ba19b5c7720715353315080 diff --git a/README.md b/README.md index 2f543b9..83d1b90 100644 --- a/README.md +++ b/README.md @@ -5,10 +5,6 @@ Inspired by [this repository](https://code.google.com/archive/p/merisier/). This parser reads ER diagrams definition files, and produces two types of diagrams + SQL code. [Graphviz](https://www.graphviz.org/) is used on server side to translate parsed graph descriptions into SVG objects. -*TODO list:* functional integrity constraints (CIF), inter-relations constraints (or, and, xor...), inheritance with the right symbol (triangle). - -*Note:* temporary dependency to [underscore](http://underscorejs.org/); good library but used so far only for its shuffle() method. - ----- An entity is defined as follow @@ -38,6 +34,12 @@ Cardinality dictionary: Special cardinalities are also available to indicate relative identification: `?R` and `1R`. +And, in case of a self-relationship, symbols '>' and '<' can indicate the sense, as in + + {manage} + Users *> + Users 1< + To mark a weak entity, just surround its name by extra-brackets [[WeakEntity]] @@ -54,8 +56,19 @@ To indicate an inheritance relation, proceed as follow Animal Cat Fish Planet Mars Venus -Finally, blocks must be separated by new lines. For a usage example, see example.html (it should render as seen in example\_\*.svg) +Finally, blocks must be separated by new lines. For a usage example, see example.html (it should render as seen in example\_\*.svg); +or example2.html for a bigger, more realistic illustration (small social network). Note that the "drawMcd" method can take a second argument, which indicates the type of graph. - * "bubble" draws the standard graph, as seen [here](https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model#/media/File:ER_Diagram_MMORPG.png) for example + * "bubble" draws the standard graph, as seen [here](https://en.wikipedia.org/wiki/Entity%E2%80%93relationship_model#/media/File:ER_Diagram_MMORPG.png) * "compact" (default) use the same box for an entity and its attributes + +----- + +**TODO** list: + + - functional integrity constraints (CIF) + - inter-relations constraints (or, and, xor, inclusion) + - inheritance with the right symbol (triangle) + +*Implementation note:* temporary dependency to [underscore](http://underscorejs.org/); used only for its shuffle() method.