Documentation

No results
    gitHub

    Attribute boxes in hierarchical schema view

    This page explains how to introduce new attributes and control them in a hierarchical schema view.  Typically, these attributes are simple fields, but there are other possibilities, as detailed in the Attributes page.  Most of the controls below are also available from the ERD view and the Object Browser.

     

    1. Root

    2. Add, Insert or Append  

    3. Controls

    4. Choosing family of attribute, field type, and choice

     

    1. Root

    When you create a new collection, you get an empty hierarchical schema view with a fixed root:

    Tree view - root

     

    2. Add, Insert or Append

    In simple terms, the difference between the 3 actions are:

    - Add: introduce a new attribute as a child to the right of the selected attribute 

    - Insert: introduce a new attribute before the selected attribute and as a sibling, i.e; at the same level

    - Append: introduce a new attribute at the bottom of the level of the selected attribute

    2.1 Add Attribute

    Not all types of fields are allowed to have attributes.  Root is allowed to have only attributes as children, no siblings.  Documents are also allowed to have attributes a and arrays are will have array items.  

    Tree view - root doc or array box plus Contextual menu - Add Attribute selected equals Tree view - Child added

     

    2.2 Insert Attribute

    Siblings can be inserted before the selected attribute, at the same level.   .

     

    Tree view - Child added plus Contextual menu - Insert selectedequals Tree view - field inserted

     

    2.3 Append Attribute

    Siblings can be appended at the bottom of the same level.

    Tree view - field inserted plus Contextual menu - Append selected equals Tree view - field appended

     

     

    3. Controls

    When an attribute is selected, the color of the box is changed to turquoise.  

    3.1 Introduce an attribute

    There are 4 ways to introduce a new attribute

    3.1.1 Menu

    Choose the appropriate option in the Actions menu:

    Menu - Actions

    3.1.2 Shortcuts

    Press the keyboard shortcut of your choice:

    ShortcutDescription
    Ctrl+AAdd attribute
    Ctrl+IInsert field
    Ctrl+EAppend field
    Ctrl+XCut
    Ctrl+CCopy
    Ctrl+VPaste
    DelDelete
    Ctrl+DDuplicate

    3.1.3 Toolbar

    Choose the appropriate icon in the toolbar:

    Tree view - icons

    with:

     

    IconDescription
    ImageAdd attribute
    ImageInsert field
    ImageAppend field
    ImageMove up
    ImageMove down
    ImageToggle details in diagram

     

    and also:

    Toolbar - Edit section

    with:

     

    IconDescription
    Icons - cutCut
    Icons - copyCopy
    Icons - pastePaste
    Icons - deleteDel
    Icons - duplicateDuplicate

    3.1.4 Contextual menu

    Right-click on an existing item to display a contextual menu:

    Tree view - contextual menu

    Only available options are activated, depending on the item selected when you perform the right-click.  To understand the different types of attributes, you may want to read this page.

    3.2 Move an attribute

    To change the order of the attributes within a level, use the Move Up or Move Down icons in the toolbar.  You may also move an attribute with your mouse by selecting the attribute, holding your left mouse button and dragging the box up or down in the same level.

    3.3 Delete an attribute

    There are several ways to delete an attribute.  You must first select it, then:

    - choose Delete from the Edit menu

    Menu Edit - Delete selected

    -  press the Delete key on your keyboard

    - click the button Icons - deletein the toolbar

    - right-click the attribute and choose Delete

    Contextual menu - Delete selected

     

    3.4 Duplicate an attribute

    When you choose to duplicate an attribute, all the properties of the selected item will be copied to a new attribute as a sibling at the same level, including the relationship.  There are several ways to delete an attribute.  You must first select it, then:

    - choose Duplicate from the Edit menu

    Contextual menu - Duplicate selected1

    - press the shortcut Ctrl+D

    - click the button Image in the toolbar

    - right-click the attribute and choose Duplicate

    Contextual menu - Duplicate selected

     

    3.5 Cut, Copy, and Paste

    These control have a behavior similar to what is expected in any desktop application.  When performing the operation, all the properties of the selected attribute will be copied to a new attribute as a sibling at the same level, including the relationship. 

     

    3.6  Collapse/Expand

    When an attribute has at least one attribute, its descendance can be collapse or expanded by pressing the - or the + sign to the right of the box:

    Tree view - expanded

    Tree view - collapsed

     

     

    3.7 Toggle details

    You may also toggle the appearance of details by pressing the Icons - toggle Details button:

    Tree view - no details

     

     

    4. Choosing family of attribute, field type, and choice

    4.1 family of attributes

     

    Family of Attributes

     

     

    For an array:

    Family of Attributes - Array

     

    For schema composition choices:

    Family of Attributes - choices

     

    4.2 Field type

    Field types include standard JSON Schema field types, plus the BSON types not already in JSON Schema.  BSON is a binary serialization format used to store documents and make remote procedure calls in MongoDB. The BSON specification is located here.  BSON supports the following data types as values in documents.

    Tree view - field types

     

    This list varies depending on the database target.

     

    Often with modern databases, you may specify more than one data type for a given attribute, for example string and null.  This is the simplest form of polymorphism.

     

    To add another type, simply click on the + sign to the right in the Properties Pane:

    Data type - single

     

    Then you may select the additional data type from the dropdown list, change the order with the up/down arrows, or delete with the X:

     

    Image

     

    4.3 Choice

    For schema composition choices, you may add choices for alternate sub-schemas:

     

    Tree view - choices

     

     

    4.4 Reference definition

    You may add references to re-usable objects as explained here.

    Family of Attributes - Ref Def

     

    4.5 DBRef (MongoDB only)

    Hackolade supports this MongoDB convention.   

     

    Family of Atributes - DBRref

     

    4.6 Pick from list

    If you want to re-use a previously created attribute (without making it a re-usable reference definition), then you can copy its properties with this option:

     

    Family of Attributes - Pick from List

     

     

     

    There are several ways to create a new field.  Depending on which attribute you select, you will want to add the new attribute as an attribute, or as a sibling.

     

    and to Append:

     

    For each of the 3 methods (Add attribute, Insert, and Append), there are 4 ways to do so:

    - from the menu, choose Actions >  then Add attribute, Insert field or Append field

    - press the shortcut Ctrl+H (Add attribute), Ctrl+E (Insert field), or Ctrl+D (Append field) 

    - from the toolbar, choose the 'add attribute' button Image

    - inside the central pane, Schema tab, right-click on the box for which you want to create a child attribute, and choose Add Attribute

    Contextual menu - attributes