Creating A Simple Database Structure
  • Updated on 25 Aug 2014
  • 2 minutes to read
  • Print
  • Dark

Creating A Simple Database Structure

  • Print
  • Dark

A data structure is a particular way of storing and organizing data in a computer so that it can be used efficiently. A data structure represents real or abstract objects through use of data members-basic units of information which can be thought of as variables belonging to the object you wish to represent. An example could be a Person data structure. Its attributes could be data like hair color, shoe size, and date of birth. Each data structure has unique properties that make it well suited to give a certain view of the data.
This data structure is used to create an entity that is stored in a table created just for the data structure with in the Decisions database. Its limitation is that it can’t perform actions on itself or others. It relies on other components to manipulate it, other entities to contain it, and steps in the flow to create it. Essentially, it is a way to create a database table.
A Simple Database Structure is designed to create instances that are like a single row of data in a database table. For example if we have a "Customers" table a single row will represent a single customer's information as: CustomerID FirstName LastName.
With a Simple Database Structure we are able to create something similar and use this Structure to create complex instances like (Customer).
In this example we are going to create Customer Data Structure using Simple Database Structure .
We begin in a Designer FolderDatatypes/Databases > User Defined Types >Database Structure.


In the resulting popup window we name our structure Customer . We name our data member CustomerID and define its type as Int . Add other data members that will live in this structure.

To test our structure we will create a new flow. In the Designer Folder select Create Flow .

In the Flow Designer Quick Add window select All Steps [Catalog]Data > Create Data and click Add to add it to our workspace.

Under the Data Definitions options we click the Add New link to add a new Data Definition .

In the resulting popup window we name our Data Definition (NewCustomer ). Next we click the t ype picker and search for our Database Structure that we created previously. We choose it as a type of our Data Definition and click CLOSE to save and close this window.

In the Properties panel under Inputs, we can see our NewCostumer Mapping Type has been set to Constant. Click on the Value selector to define values for our fields. When finished, click Ok to save. We can use our NewCustomer as a single object with all of its properties.

Was this article helpful?