Skip to content

Flow documentation · legacy product

DB Definitions ​

DB Definitions allow you to "describe" the structure of your database to the Flow application. This allows Flow to understand your particular database structure and read and write data to it. This gives you the flexibility to interact with any database structure as you are in complete control over the definition.

A DB Definition is an in-memory representation of the data you are going to read or write from the database. When reading data the definition is opened against the database and data read from the database into memory. The data is retained in memory until the definition is closed.

When writing data the definition is opened against the database but no data is read. This provides an in-memory representation of what the data structure is. You then write data into the definition using a map, and this is subsequently converted to appropriate Insert/Update statements when writing the data into the database. Even after writing the data to the database, the data is retained in memory until the definition is closed. If the act of writing to the database has caused auto-generated fields to create values, these values can be returned to the in-memory dataset.

You can create a single DB Definition and use it against multiple similar databases simply by assigning a different DB Connection. When assigning a DB Connection to a DB Definition it is considered a design time assignment, when coming to use the DB Definition in an Action you have the chance to reassign the DB Connection (run time assignment). This allows you to use the same DB Definition in multiple Actions each with their own DB Connection.

Create a DB Definition
  1. Open the Flow Designer

  2. Navigate to Configuration > Components > Data Definitions > DB Definitions

  3. Right click DB Definitions and select New

  4. Fill in the details and click Save. See DB Definition

Edit a DB Definition

TIP

A single left click on the DB Definition will also open the edit window

  1. Open the Flow Designer
  2. Navigate to Configuration > Components > Data Definitions > DB Definitions
  3. Right click the desired DB Definition and select Edit
  4. Change the details as required and click Save. See DB Definition
Delete a DB Definition
  1. Open the Flow Designer

  2. Navigate to Configuration > Components > Data Definitions > DB Definitions

  3. Right click the desired DB Definition and select Delete

  4. Click Yes to confirm your choice

Copy a DB Definition
  1. Open the Flow Designer
  2. Navigate to Configuration > Components > Data Definitions > DB Definitions
  3. Right click the desired DB Definition and select Copy
  4. The copy of the DB Definition will display in the edit window. Change the details as required and click Save. See DB Definition
Export a DB Definition
  1. Open the Flow Designer

  2. Navigate to Configuration > Components > Data Definitions > DB Definitions

  3. Right click the desired DB Definition and select Export

  4. The template Web will be assigned a default file name consisting of the name and type of the module. Change the name if desired and click Save. See Exporting and Importing

Import a DB Definition
  1. Open the Flow Designer

  2. Navigate to Configuration > Components > Data Definitions > DB Definitions

  3. Right click DB Definitions and select Import

  4. Select the Template Web you wish to import and click Open

  5. Choose the import method and click OK. See Exporting and Importing A confirmation screen will show what has been imported.

TIP

Note how dependant modules like the DB Connection have been imported. When exporting a module that is dependant on other modules, these dependant modules are also included in the Template so that it can be recreated exactly when imported

Change Security on DB Definition
  1. Open the Flow Designer
  2. Navigate to Configuration > Components > Data Definitions > DB Definitions
  3. Right click the desired DB Definition and select Security
  4. Change the details as required and click Save. See Managing Security
Refresh list of DB Definitions
  1. Open the Flow Designer
  2. Navigate to Configuration > Components > Data Definitions > DB Definitions
  3. Right click DB Definitions and select Refresh