Documentation

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:

Image

 

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.  

Image plus Image equals Image

 

2.2 Insert Attribute

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

 

Image plus Imageequals Image

 

2.3 Append Attribute

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

Image plus Image equals Image

 

 

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:

Image

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:

Image

with:

 

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

 

and also:

Image

with:

 

IconDescription
ImageCut
ImageCopy
ImagePaste
ImageDel
ImageDuplicate
3.1.4 Contextual menu

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

Image

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

Image

-  press the Delete key on your keyboard

- click the button Imagein the toolbar

- right-click the attribute and choose Delete

Image

 

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

Image

- press the shortcut Ctrl+D

- click the button Image in the toolbar

- right-click the attribute and choose Duplicate

Image

 

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:

Image

Image

 

 

3.7 Toggle details

You may also toggle the appearance of details by pressing the Image button:

Image

 

 

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

4.1 family of attributes

 

Image

 

 

For an array:

Image

 

For choices:

Image

 

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.

Image

 

This list varies depending on the database target.

 

 

'4.3 Choice

You may add choices for alternate sub-schemas:

 

Image

 

 

4.4 Reference definition

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

Image

 

4.5 DBRef (MongoDB only)

Hackolade supports this MongoDB convention.   

 

Image

 

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:

 

Image

 

 

 

 

 

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

Image