Skip to main content

Entity Designer

Entity Designer Overview

  1. The Entity Designer tool mainly used to create entity, relationship between entities in Arango DB. This tool internally calls the Arango Adapter API’s.

  2. In simple words,this tool used to create database, DB collections with schema in ArangoDB.

  3. Each entity has multiple fields and each field has multiple properties(datatype, mandatory, autoIncrment etc).

  4. This tool was placed under the project. For each project the entity designer tool has unique metadataId.

  5. If we create entity under any project using entity designer tool that should be mapped to that respective metadataId.

Structure

Create New Entity

  1. This button used to create new entity in the UI screen. After clicking this button, this button will display following popup.

Here we need to fill the details, once done we have to click the save button. It will create a new entity

Save Entity

  1. After creating the new entity, click the save button, it will internally invokes the save_schema API.

  2. The save schema API will store the entity details to metadatadb(ATP_Platform).

  3. Then in UI background, it will invoke the getschema API, this API will return the stored entity details.

    Below was the UI screenshot for save schema button.

Publish Entity

  1. After getting the result from get schema API(UI).

  2. Then we have to click the publish schema button, This API will create the database and collections with schema in ArangoDB server

ArangoDB Database and Collections

  1. After publish, the new database and entity(collections) will create in arangodb server.

  2. The collection will create with schema.

    Below was the database and collections screenshot

Collections with schema UI screen

Entity Properties

  1. Here, User was entity, the (userid, name) were entity fields and each fields have multiple properties

  2. In each entities have multiple fields and each fields have its properties.

  3. To view the properties, click the fieldname in the UI, it will show the properties slide popup in right side.

List of properties

  1. Datatype
  2. Default Value
  3. Case sensitive
  4. Auto Increment
  5. UUID Generation
  6. Sequence Generate
  7. Security Encryption
  8. Unique
  9. Mandatory
  10. Masked
  11. Indexes
  12. Security Encryption
  13. Regex Pattern validation
  14. Length Min and Max validation check
  15. Number Min and Max validation check

Properties UI Screenshot

Entity Properties Explanation

Datatype control

  1. This was one of the controls on properties list. This was a dropdown control using this we can set field datatype (string, number, Boolean, array etc).

Default Value Control

  1. This was one of the controls on properties list. This was a text box control using this we can set a default value to the field.

  2. Like we can set number field default value to zero(0).

Case Sensitive Control

  1. This control only for string datatype

  2. This was a dropdown box control using this we can set a case sensitive option(Lowercase, uppercase, camel case) to the field.

Mandatory Control

  1. This was a check box control using this we can set a mandatory to the field. If the input document doesn’t have any mandatory field, then it will throw error.

Unique Control

  1. This was a check box control using this we can set a unique to the field. It will not allow two documents have same value in the DB side.

Masked Control

  1. This was a check box control. If we enable masked to any field in the entity. Then, If user upsert document with the field with value Arango adapter API will convert the value to base64 format and store to DB.

Securirty Encryption Control

  1. This control only for string datatype

  2. Arango Adapter supports (AES, MD5) encryption method. In entity designer tool side, if we enable any field with any one of mentioned encryption method, the Arango adapter convert the incoming field value to the encryption methods

Auto Increment Control

  1. This control only for number datatype

  2. This was a check box control. If we enable Auto Increment to any field in the entity. Then, the field.

  3. Value automatically incremented from 1 to and so on.

UUID Control

  1. This control only for string datatype

  2. This was a check box control. If we enable UUID to any field in the entity. Then, the field Value automatically generate the UUID and then store to database.

Regex Pattern Validation

This was a text box control. Based on the given regex the validation will happen, if the pattern doesn’t match then it will throw error.

Length min and max Validation

  1. This control only for string datatype

  2. This was a text box control. There was a two-text box in the UI one for min and another for max. Based on the given value in the textbox the field value length validation will happen.

min and max value validation

  1. This control only for number datatype

  2. This was a text box control. There was a two-text box in the UI one for min and another for max. Based on the given value in the textbox the field value validation will happen.

Entities with relationship

In entity designer tool, we can link the field from one collection to another collection field.

We can achieve following relationship in entity designer

  1. One to one relationship
  2. One to Many relationship
  3. Many to one relationship
  4. Many to Many relationship

In UI, click the right arrow icon which is placed near the fieldname, Please refer below screenschot

After clicking, it will show the popup for entity relationship

  1. In UI, separated into two sections, one was source, and another was destination.

  2. The source means, from entity and destination means to entity.

  3. Here we can link the one field from source(collection) to one field from destination collection.