<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta>
      <journal-title-group>
        <journal-title>V. Hnatiuk); dominik.bork@tuwien.ac.at (D. Bork)</journal-title>
      </journal-title-group>
    </journal-meta>
    <article-meta>
      <title-group>
        <article-title>The bigER Modeling Tool</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Philipp-Lorenz Glaser</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Georg Hammerschmied</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Vladyslav Hnatiuk</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <contrib contrib-type="author">
          <string-name>Dominik Bork</string-name>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>TU Wien, Business Informatics Group</institution>
          ,
          <addr-line>Favoritenstrasse 9-11, 1040 Vienna</addr-line>
          ,
          <country country="AT">Austria</country>
        </aff>
      </contrib-group>
      <pub-date>
        <year>2022</year>
      </pub-date>
      <volume>000</volume>
      <fpage>0</fpage>
      <lpage>0002</lpage>
      <abstract>
        <p>This paper introduces the first major release of the bigER modeling tool. bigER ofers various features for lfexibly specifying and visualizing Entity Relationship (ER) data models. Within the Visual Studio (VS) Code IDE, the tool enables hybrid modeling through a textual editor and a graphical editor to display and modify the textual and graphical ER model, respectively. Both editors are realized with a custom language to specify ER elements and allow multi-notation support (currently Bachman, Chen, Crow's Foot, Min-Max, and UML). The bigER modeling tool incorporates the Language Server Protocol and is based on web technologies, which makes the tool platform-independent and easily extensible. We present the newest extensions of bigER , i.e., multi-notation support and improved edge routing.</p>
      </abstract>
      <kwd-group>
        <kwd>eol&gt;Entity Relationship</kwd>
        <kwd>Modeling</kwd>
        <kwd>Tool</kwd>
        <kwd>Language Server Protocol</kwd>
        <kwd>Sprotty</kwd>
        <kwd>Code generation</kwd>
      </kwd-group>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>-</title>
      <p>In the following, we first describe the architecture of the tool and provide a demonstration of
its main features. We then elaborate the above-mentioned extensions in more detail before we
conclude this paper.</p>
      <p>
        Tool Architecture bigER is based on the Language Server Protocol (LSP) and the
diagramming framework Sprotty1 with a client and a server component. The server is implemented as
a language server with Xtext2 that communicates through the LSP to the extension (client) to
enable rich-text editing support. The server is further enhanced with Sprotty to support
graphical language features, e.g., with a diagram generator for the graphical model. The client-side
contains a language client that communicates with the server and integrates Sprotty with VS
Code to render the diagram in a web view. A web view manager is responsible for managing
the web view where Sprotty-specific components are located, such as, e.g., SVG views or CSS
styling. Fig. 1 shows a high-level view of the bigER architecture – for a detailed view, see [
        <xref ref-type="bibr" rid="ref4 ref5">4</xref>
        ].
      </p>
    </sec>
    <sec id="sec-2">
      <title>Webview</title>
      <p>Toolbar
Sprotty Diagram
CSS Styles
Actions /
Commands</p>
      <p>Model
SVG Views
Sprotty
Actions</p>
    </sec>
    <sec id="sec-3">
      <title>Extension</title>
      <p>Webview
Manager
Extension
Manifest
Language Client
Syntax Highlight
(TextMate)
Language
Configuration</p>
      <p>LSP /
Sprotty LSP
Diagram Module
(Sprotty)
Language IDE
Module
(Xtext)</p>
    </sec>
    <sec id="sec-4">
      <title>Language Server</title>
      <p>Diagram
Generator
Layout Engine</p>
      <p>(ELK)</p>
      <p>Language
Runtime Module
(Xtext)</p>
      <p>Tool Demonstration ER models are created in text files ending with .erd which, when
opened in VS Code, automatically activate the extension. The tool mainly consists of three
components for modeling: ) the textual editor (Fig. 2 left) to specify the ER models through a
textual Domain-specific Language including rich-text editing support (e.g., syntax highlighting,
code completion, validation), ) the diagram view (Fig. 2 center) that renders an ER diagram
corresponding to the specification in the textual file that is also synchronized on text changes and
can be partly used as a graphical editor, and ) the code generator (Fig. 2 right) for transforming
the conceptual ER models into a logical schema for a relation database by generating SQL tables.
The ER model in the figure features a basic example of a university database, where students
take exams of courses that include multiple lectures and are graded by instructors. As can be
seen in the textual editor, various keywords are used to classify model elements, a complete
specification of the language can be seen in the language guide on GitHub 3.</p>
      <p>Multi-Notation Support The first major extension to the tool is multi-notation support to
enable modeling in diferent ER variations. The notation can be changed textually or graphically
and if not specified, a default notation is used (see Figure 2). Besides the default notation, bigER
supports many popular ER notations including Bachman, Chen, Crow’s Foot, Min-Max, and
UML. To only allow the characteristics of one notation at a time, the language server validates
the textual model and informs the user whether the model contains an error or the specified
cardinality does not match the notation. If the model is valid, a new diagram representation that
1Sprotty: https://github.com/eclipse/sprotty
2Xtext: https://www.eclipse.org/Xtext/
3bigER language guide: https://github.com/borkdominik/bigER/wiki/Language</p>
      <sec id="sec-4-1">
        <title>Notation</title>
        <sec id="sec-4-1-1">
          <title>Bachman</title>
        </sec>
        <sec id="sec-4-1-2">
          <title>Chen Min-Max UML</title>
        </sec>
      </sec>
      <sec id="sec-4-2">
        <title>Textual Syntax</title>
        <p>
          A[0], A[0+], A[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ], A[1+]
        </p>
        <p>
          A[
          <xref ref-type="bibr" rid="ref1">1</xref>
          ], A[N], A[M]
        </p>
        <p>A[min, max] or A[min, *]</p>
        <p>A[num], A[min..max] or A[min..*]</p>
        <sec id="sec-4-2-1">
          <title>Crow’s Foot A[0+], A[1], A[1+], A[?]</title>
        </sec>
      </sec>
      <sec id="sec-4-3">
        <title>Diagram Representation</title>
        <p>entails notation-specific data is generated and sent to the client for rendering. In the web view
on the client, the data is extracted, the cardinalities interpreted, and additional SVG elements
are rendered on the edge if required by the specified notation and cardinality. An overview of
the diferent notations and how they are rendered in bigER can be seen in Table 1 including the
textual syntax that is used to specify the cardinalities of relationships.</p>
        <p>
          Improved Edge Router An additional extension to the tool is the improved routing of edges
in the diagram. Previously, the default router provided by Sprotty was used, which worked
well in most cases, but had the disadvantage of routing each edge independent of other model
elements, resulting in intersections between nodes and other edges (see University entity in
Fig. 3 left). This problem was solved by replacing the router with a Libavoid router from the
sprotty-libavoid-routing package4. The libavoid library is a well-known open-source solution
for diagram routing including a feature for avoiding obstacles (i.e., other model elements). With
the new router, manual changes of edges are not needed anymore and the routing of edges is
completely automated. Two further benefits of the replacement include the use of orthogonal
edges as opposed to more inconsistent polyline edges, and an overall improved behavior when
nodes are being manually moved in the diagram (see Fig. 3 right).
2. Conclusion
We have presented the centerpieces of the bigER modeling tool, proceeding our work in [
          <xref ref-type="bibr" rid="ref3">3</xref>
          ].
bigER is the first ER modeling tool that is freely available as an extension to the widely used VS
Code IDE, supporting hybrid ER modeling using a textual and a graphical editor that are always
synchronized. The tool moreover supports five widely used ER notations and a code generator
that transforms the ER models into SQL code. More details on the process of developing
Sprottybased modeling tools in general and the bigER tool in particular are provided in [
          <xref ref-type="bibr" rid="ref4 ref5">4</xref>
          ]. We believe
bigER can be very valuable for the ER community and educators in database design courses.
bigER can be downloaded via the VS Code Marketplace5, the source code is available here6.
        </p>
      </sec>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          [1]
          <string-name>
            <given-names>P. P.-S.</given-names>
            <surname>Chen</surname>
          </string-name>
          ,
          <article-title>The entity-relationship model-toward a unified view of data</article-title>
          ,
          <source>ACM Trans. Database Syst</source>
          .
          <volume>1</volume>
          (
          <issue>1976</issue>
          )
          <fpage>9</fpage>
          -
          <lpage>36</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          [2]
          <string-name>
            <given-names>J.</given-names>
            <surname>Cooper</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Kolovos</surname>
          </string-name>
          ,
          <article-title>Engineering hybrid graphical-textual languages with sirius and xtext: Requirements and challenges</article-title>
          ,
          <source>in: 22nd International Conference on Model Driven Engineering Languages and Systems Companion</source>
          ,
          <year>2019</year>
          , pp.
          <fpage>322</fpage>
          -
          <lpage>325</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          [3]
          <string-name>
            <given-names>P.-L.</given-names>
            <surname>Glaser</surname>
          </string-name>
          ,
          <string-name>
            <given-names>D.</given-names>
            <surname>Bork</surname>
          </string-name>
          ,
          <article-title>The bigER Tool - Hybrid Textual and Graphical Modeling of Entity Relationships in VS Code</article-title>
          , in: 25th
          <source>International Enterprise Distributed Object Computing Workshop, EDOC Workshop</source>
          <year>2021</year>
          , IEEE,
          <year>2021</year>
          , pp.
          <fpage>337</fpage>
          -
          <lpage>340</lpage>
          .
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          [4]
          <string-name>
            <given-names>P.-L.</given-names>
            <surname>Glaser</surname>
          </string-name>
          ,
          <article-title>Developing sprotty-based modeling tools for vs code</article-title>
          ,
          <year>2022</year>
          . URL: https:// model-engineering.info/publications/theses/thesis-glaser.pdf, bachelor thesis at TU Wien.
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          <article-title>4sprotty-libavoid-routing on GitHub: https</article-title>
          ://github.com/Aksem/sprotty-routing-libavoid 5https://marketplace.visualstudio.com/items?itemName=BIGModelingTools.erdiagram 6https://github.com/borkdominik/bigER
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>