Documentation

No results
    gitHub

    Entity boxes in ER diagram

    In Hackolade Studio, we use the generic name of "entity" to designate objects for which data is collected or transmitted.  In physical data models, this entity bears a different name depending on the target technology: table in relational and analytics databases, collection in document database (MongoDB, Couchbase, DocumentDB, etc...), node in graph database, record in Avro, message in Parquet and Protobuf, request and response in REST APIs and GraphQL, class in RDF triple stores, etc...

    Create an entity

    In Hackolade Studio, there are many ways to add an entity to the central pane canvas:

    - menu : Action > Add Entity (added at default location)

    - keyboard shortcut (Ctrl/Cmd+L): added at location of mouse cursor

    - toolbar: Add Entity icon: added at location of mouse cursor

    - Diagram Object pane: Add entity via click (added to default location), or via drag-and-drop to the location of your choice

    - Object Browser pane: right-click on container name and use contextual menu (added at default location)

    - Central pane: right-click on model name and use contextual menu (added at default location)

     

     

    - via the Actions menu:

    Menu - Actions - Add Collection

    - by pressing the shortcut Ctrl/Cmd+L

    - with a click of the toolbar icon Icons - addCollection 

    - or with a right-click anywhere in the central pane 

    ER Diagram - contextual menu - add collection

    and choose 'Add Collection'.  

     

    You can proceed to fill collection properties and create fields.

     

    The usual edit actions are possible on an existing collection: cut, copy, paste, duplicate, delete.

     

    To move a collection in the ER diagram, hover the mouse to the collection title so the mouse cursor becomes a move cross:

    ER Diagram - move collection

    then click and hold your left mouse button, then drag the collection where you'd like to place it.  If relationships are attached, they follow the collection and reposition themselves dynamically.

     

    The name bar of a collection is blue, unless changed in the Options tab.  When you select a collection by clicking on the name bar, the related properties pane gets displayed in the Properties Pane on the right.  The collection window can be resized so the content fits in.

     

    ER Diagram - full size collection box

     

    Otherwise, vertical and/or horizontal scroll bars appear:

    ER Diagram - reduced size collection box

     

    The collection window position and size are saved with the model, so they can be retrieved next time it is consulted.

     

    To open a new tab with the hierarchical schema view of a collection, you double-click on the collection name bar, or right-click then choose Open in new tab, or by clicking on the icon

    ERD - open in a new tab

     

     

    A couple of drag-and-drop operations are possible in the ERD:

    - using the handle on the left of each attribute:

    ERD - attribute drag-and-drop

    you may move an attribute up or down within an entity, or to another entity, provided that there are no conflicts.  It is not possible to move attributes across different views.  By pressing the ctrl key, it is possible to perform a copy operation.

    - using the attribute name, to create a relationship.

     

    Several of the controls available in the hierarchical schema view are also available from the ERD view and the Object Browser.

     

    Visual indicators

    The ERD entity boxes have been enriched with visual indicators.  Here is a list of abbreviations:

    pk: primary key

    fk: foreign key

    fm: foreign master

    dk: destination or denormalized key (parent of a foreign key.)  Marks keys that are the parent of a foreign key or are denormalized elsewhere in the model.

    dm: destination or denormalized master (parent of a foreign master.)  Marks non-key attributes that are the parent of a foreign attribute or are denormalized elsewhere in the model.  

    PK: partition key, where applicable

    CK: clustering key, where applicable

    sk: sort key, where applicable

    *: required attribute

    +: only in Avro: null allowed

    Ix,y: indexed attribute, with x= index number, y= attribute number in a composite index

     

    Both dk and dm attributes allow access to the Where-Used function in the contextual menu to find all the places in the model where they are denormalized.

     

    You may arrange and align entity boxes in the ERD using the menu option Edit > Align, or the arrange toolbar buttons:

    ERD arrange entities toolbar button  Options include: align left, align center, align right, align top, align middle, align bottom, distribute horizontally, distribute vertically, distribute orthogonally.

     

     

    Display options

    There are different ways to customize your ERD: with the Options tab in the properties pane, you may change the color and font style.  You maybe also modify the sizing behavior when adding or removing attributes, if you do not want the box to automatically adjust.

    ERD display options tab-font style and color

     

    You may also change the display of the ERD:

     

    ERD display options toolbar

     

    to toggle the display of:

    - business names versus technical names

    - the handle allowing to drag-and-drop attributes within the entity

    - annotations

    - materialized/read-only views where applicable

    - foreign master relationships (when denormalization has taken place)

    - data types

    - attributes

    - non-primary key attributes

    - non-required attributes

     

    Diagram Views

    Description of this feature, to create subsets of the main diagram in separate views, has now been moved here.