Entity boxes in ER diagram
There are several ways to create a new collection in the ER diagram of a model:
- via the Actions menu:
- by pressing the shortcut Ctrl+L
- with a click of the toolbar icon
- or with a right-click anywhere in the central pane
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:
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. When you select a collection by clicking on the name bar, it becomes green and the related properties pane gets displayed. The collection window can be resized so the content fits in.
Otherwise, vertical and/or horizontal scroll bars appear:
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
A couple of drag-and-drop operations are possible in the ERD:
- using the handle on the left of each attribute:
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.
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: denormalized key (parent of a foreign key.) Marks keys that are denormalized elsewhere in the model.
dm: denormalized master (parent of a foreign master.) Marks non-key attributes that 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:
Options include: align left, align center, align right, align top, align middle, align bottom, distribute horizontally, distribute vertically, distribute orthogonally.
ER Diagram Views
With v4.3.2, Hackolade has introduced the possibility to add separate ER Diagram Views (ERDV): a subset of entities selected from the main ER diagram, to help manage large models by focusing on a smaller set of entities, by domain or subject. Entities may appear in multiple Diagram Views. Modifications made inside Diagram Views are immediately reflected in the main diagram and other views where present.
A new Diagram View can be added in different ways:
1) from the Actions menu option:
2) from the toolbar:
: toolbar button
3) from the Object Browser or the main Entity Relationship Diagram:
by selecting one or more entities, then doing a right-click on an entity to display the contextual menu:
Editing an ER Diagram View name or membership is done from the contextual menu of the Object Browser:
In this dialog, you may edit the name of the Diagram View and modify the selection of the entities selected: