Skip to main content

Database-relation Systems

The relationship between databases and Hexabase is explained here.

A Hexabase data store can be operated like a relational database, but the actual mechanism is storing items as documents in mongoDB and managing relations in ArangoDB. For this purpose, Hexabase has the following entity data that represents the relationship:

  • Database Related: Defines relationships between databases
  • Data link: link to items that have a relationship

How the data store works

Each relationship/link has a direction, and the related source database ⇒ Set as the related database. Settings must be done in each DB in order to have a bidirectional relationship.

The associated destination database can be configured across applications. This can be used in the following cases:

  • The common master application has master data and refers to it in each business application
  • Refer to the sales application data in the purchasing application

Comparison of RDBMS and Hexabase datastores

DB designRelationship model (E-R diagram)Relationship model (E-R diagram)
RelationNo entity dataHave entity data
SearchTable with a JOIN in the SELECT statement.実行時に結合。Performance degrades depending on table structurePre-merge with data link。High speed for searching by following data links
UpdateUpdate only records, No need to update relations > Easy to guarantee ACIDData link are also update when item is updated > Updates may take some time.
TransactionCan beTransaction support for major APIs: CreateItem API, UpdateItem API, ExecuteAction API

Comparison of RDBMS and Hexabase datastores

Database-relation configuration steps

Perform the database-relation settings using the following steps:

Database relation settings

  1. 案件一覧のデータベース設定を呼び出す
  2. Open the “Database relation settings” tab
  3. Specify “Project details” in “Database related”

Set up associations in database settings

※ More detailed database-related configuration procedures are described in Admin panel reference > Database relation.

Related items can be manipulated with the following API.

Specify related items in the related_ds_items option for each API.

Specify related items when creating/updating items

Manipulate relation items on the administration panel

Once a database relation is set up, a list of related items will be displayed on the "Related Data" tab of the item detail page. You can add, update, and delete related items here.

Display of relationship data