Creating Database Table Relationships
  • Updated on 16 Jun 2015
  • 1 minute to read
  • Print
  • Dark
    Light

Creating Database Table Relationships

  • Print
  • Dark
    Light

Overview

The purpose of creating a Database Table Relationship is to integrate data from two separate database tables and pull from them at the same time.  For your own purposes, you can use your default Decisions database or you can integrate with another database. For more information on integrating a database, see Integrating an External Database with a Flow .

Example

This example demonstrates how to display columns from related Tables in the Report Designer . This is done by creating a Relationship between Tables to join them. Then, this Relationship can be used in the Report designer to add a related Data Source.
Start by creating a Relationship between Tables . In the designer Folders Navigate to System > Integrations > Databases folder in the Portal . Next, we navigate to the Database Folder where we need to create Relationship . From the Folder Actions Panel , select Add Relationship.
2018-08-30_132825.jpg

In the Add Relationship resulting window we Name our Relationship . Then, we pick Tables and Fields that should be Related . Click Ok when finished.
Relationship.jpg

Our Relationship is being created in our Database Folder.
2018-08-30_133242.jpg

Next, we navigate to the Designer Folder and click Create Page/Report > Create Report from the Folder Actions Panel.
2018-08-30_133530.jpg

Nest, Name the***Report*** and select Create to proceed to the Report Designer.
2018-08-30_133839.jpg

In the Report designer we expand Data Sources > Common > [Folder For Our Database] and add one of the Tables from our Relationship as Data Source.
2018-08-30_150752.jpg

Because a relationship has been created an option will appear called Add related table. Select Add and then select Add related table and the second table will be added to the report. 
add-related-table.jpg

When both tables from the Relationship have been added, fields from either table can be added as a column to our Report.
2018-08-30_151534.jpg

When columns added and Report populated with Data , we can Group or Filter data as needed.
2018-08-30_153314.jpg

Was this article helpful?