X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=README.md;h=acf706ea4e311240e017fa47bba8d34225048ab2;hb=b74cfe416ba9082d2fb7e6b33fd72c83d20708b3;hp=93b13149d1c9970bff222fe231a276f28126ca54;hpb=fe021b27455df1f9cd8392b2bba235029c567dec;p=erdiag.git diff --git a/README.md b/README.md index 93b1314..acf706e 100644 --- a/README.md +++ b/README.md @@ -5,27 +5,29 @@ 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. -*Note:* at the moment, only the conceptual graph is implemented, and no comments are allowed in textual descriptions. -At least the former is planned, and also probably a way to indicate relative identifiers. +*Note:* at the moment only the conceptual graph is implemented, and no comments are allowed in textual descriptions. +At least the former is planned, and also probably a way to indicate relative identifiers, and maybe links between relationships. + +*Note bis:* temporary dependency to [underscore](http://underscorejs.org/); good library but used so far only for its shuffle() method. ----- An entity is defined as follow - [Entity] - #attr1 (*) - attr2 (*) + [Entity] + #attr1 (*) + attr2 (*) with (\*) = optional SQL indications, and # denoting a (part of) a key. A relationship is defined in this way - {Relation} - Entity C1 - Entity2 C2 - -- - attr1 (*) - attr2 (*) + {Relation} + Entity C1 + Entity2 C2 + -- + attr1 (*) + attr2 (*) where attributes are optional, and C1 (resp. C2) = cardinality for entity 1 (resp. 2). Defining relationships with more than two attributes is easy: just add entities. @@ -47,9 +49,9 @@ The syntax for these two last is then the same as in the non-weak versions. To indicate an inheritance relation, proceed as follow - is_a - Animal Cat Fish - Planet Mars Venus + is_a + 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)