Modules define relations and relations sets and are the building blocks for an IC application. This section contains the following topics:
● Overview of moduleson page 160
● Overview of relationson page 167
● Overview of 1 to N relationson page 167
● Overview of M to N relationson page 170
● Overview of relation setson page 174
Overview of modules
A module defines relations and relation sets, using:
● A relation to link tables in the database and create objects that enable application users to link records
● A relation set to constrain the relations included in a search.
You create one or more modules to define a focus in your application. A focus provides a workflow for the user. You specify the application interface and its database structure in one or more modules, using:
● Table sets that constrain the tables that can be displayed and updated in a form or browser.
● Browsers that gather and display data from anchor tables.
● Forms that are associated with a table set. The groups in a form can display records within the tables of the associated table set.
● Relations that define how the tables in one or more table sets are related, using 1 to N and M to N relations.
● Relation sets that are a collection of relations that constrain a search.
Each module defines a focus in an IC application. You can nest additional modules within a focus to add additional table sets, forms, browsers, relations, and relation sets.
Note:
In the sample focus below, the Product form displays records from the Product and
QuickCall tables. The user can create and update records in both tables, and link records together using an M to N relation defined in the module. To find related records in each table, the relation set linked to the Search buttons includes the M to N relation.
Module properties
You can view the module properties, or add and remove shared components from modules, in the module’s Properties tab.
For details about module properties, see:
● Module nameon page 162.
● Labelon page 162.
● Invisibleon page 162.
Descriptionon page 162.
There is an M to N relation between the Product and QuickCall tables.
The user can link a record in the Product group to a record in the Quick Call
group. The M to N link requires an M to N relation between the tables.
● Formson page 163.
● Browserson page 163.
● Nested moduleson page 164.
● Form orderon page 164.
Note:
Note: Changes to focus module properties are automatically reflected in the properties
of the associated focus.
Module name
The module name (required; case sensitive) references the module. If you rename a module, all linked components are updated to reflect the new name.
To change a module name, modify the name in the Name text box.
Label
The label is the title of the module and should correspond to the workflow. For a focus-level module, the title is displayed in the title bar of the focus window.
To change the label for a module, change the name in the Label text box.
Invisible
You can create module that is not visible to the user of an IC application. To set the visibility of a module:
● Select the Invisible check box to make the object invisible to an application user. ● Clear the Invisible check box to make the object visible to an application user.
Description
The module description (optional) is a place where you can keep information that identifies the module.
To change the description for a module, type a description in the Description text box.
Table sets
Table sets in modules specify the table information needed to: ● Add a form. By default, a form is associated with a table set.
● Create a relation. A module defines the relations that link tables together. The relations that you can create are constrained by the table aliases in the table sets.
To add a table set to a module: 1. Select Add.
2. Select a table set from the pop-up list. To remove a table set from a module:
1. Select a table set from the Table Sets list.
2. Remove all associated components from the table set. 3. Select Remove.
Forms
You can add forms based on the table sets in the modules, including any shared table sets in a nested module (see Nested moduleson page 164 and Form orderon page 164).
To add a form to a module: 1. Select Add.
2. Select a form from the pop-up list. To remove a form from a module:
1. Select the form from the Forms list.
2. Remove all associated components from the form. 3. Select Remove.
Browsers
A browser gathers and displays search results. All browsers associated with groups or objects are automatically added to the module.
You can add a browser that is not associated with a group or object. For example, a browser used in an IC Script to gather and update records.
To add a browser to a module: 1. Select Add.
2. Select a browser from the pop-up list. To remove a browser from a module:
1. Select the browser from the Browsers list.
2. Remove all associated components from the browser. 3. Select Remove.
Nested modules
All properties of a nested module are shared in the module, including relations and relation sets. To add a nested module:
1. Select Add.
2. Select a module from the pop-up list. To remove a nested module:
1. Select a module from the Modules list.
2. Remove all associated components from the nested module. 3. Select Remove.
Form order
In a focus-level module (see Focuses in applicationon page 218), you set the form order to define the tab order, from left to right, in the application interface. The form order of a focus-level module overrides a form order specified in nested modules. You must set the form order for a focus-level module in the module’s Properties tab.
To change the order of forms in a focus-level module:
1. Select a focus-level module in the Database Designer tree view. 2. In the Properties tab of the module, select Form Order.
Database Designer displays all forms and nested modules in the Form Order list. The top to bottom order of the forms determines the left to right order of the forms in the focus. 3. Select a form from the list, then:
● Select Up to move the form up ● Select Down to move the form down. 4. When you are finished, select OK.
How to create a module
The pre-defined modules that ship with IC applications are designed to be reused.
The naming convention for modules reflects their use. Avaya recommends that you follow the naming convention:
Note:
Note: Do not use the following module names: qw_system, qw_system#1, or
q_escalation because they are already in use for internal system modules.
If you want to reuse relations across modules, Avaya recommends that you create a separate module to define relations.
After you create a module, add the following components, then create one or more relations and relation sets: ● Table sets ● Forms ● Browsers ● Nested modules. To create a module:
1. Select New > Component.
2. In the New Component dialog box, select Module then select OK. Database Designer
If name begins with… They are…
f_ Focus modules. These are the primary modules that make up an application.
q_ IC modules. These deal with addressibility. They should be included in your application. They should not be modified. r_ Relation modules. These provide reusable relation set
definitions.
c_ Component modules. These contain those items necessary to create a functioning form (form, browsers, relation sets). tr_ Table-set relation modules. These provide relations within a
table set.
ir_ Inter-table-set relation modules. These provide relations between table sets.
qsc_ IC Script modules. These contain those items necessary for running an IC Script.
3. Enter the module name in the text box.
Tip: Avaya recommends that you use the convention described above when naming a
module.
4. Enter a label for the module in the middle text box. The label is the title of the module and should correspond to the workflow contained in the module.
5. Type a description of the module in the bottom text box. 6. Select Finish.
7. In the module’s Properties tab, review the properties for your new module and modify, if necessary. For details, see Module propertieson page 161.
8. Select File > Save to save your new module.
How to change a module
You can change the module settings, or add and remove any of the following shared components from modules in the module’s Properties tab.
How to view properties for a shared component
To view the properties for a shared component:
1. Select the component in the module’s Properties tab. 2. Select Go to.
How to view the properties for a nested module
To go to the properties for a module where the current module nests: 1. Select Used in.
2. Select a module.
How to change a module
To change a module:
1. Select the module in the Database Designer tree view.
2. Modify the desired module properties in the Properties tab, as described in Module
propertieson page 161.
To set permissions for the module, select the lock icon in the Properties tab of the module or select Edit > Permissions. For more information, see How to set permissionson page 31.
How to delete a module
To delete a module:
1. Select the module in the Database Designer tree view. 2. Select Edit > Delete.
Overview of relations
A relation defines a database relation between tables in a module. For details about the types of relations that Database Designer supports, see:
● Overview of 1 to N relationson page 167 (one to many)
● Overview of M to N relationson page 170 (many to many)
The tables within a module’s table sets constrain the relations that you can define in the module. If you nest other modules within the module, you can create relations between any of the tables in the nested modules.
After you create a relation, you can create:
● Objects that enable the user to link records (see 1 to N link objectson page 132 and
M to N link objectson page 138).
● One or more relation sets to constrain the relations included in a search (see How to
create a relation seton page 176).
Overview of 1 to N relations
A 1 to N (one-to-many) relation links a single record in a table to one or more records in another table. The New Relation Wizard can create the foreign key that defines the 1 to N relation between the From and To tables.
An example of a 1 to N relation is shown below. The call table is the one side of the relation (or the From table), and the task table is the N side of the relation (or the To table). The 1 to N relation between the call table and the task table is maintained by the foreign key in the task table named call_FKey.
1 to N relation properties
You can view the properties for a 1 to N relation in the relation’s Properties tab.
Note:
Note: After you define a relation, you cannot change its relation type.
1 to N relation properties are:
● Relation nameon page 168.
● Relation descriptionon page 169.
● From tableon page 169.
● To tableon page 169.
● Foreign keyon page 169.
Relation name
The relation name (required; case sensitive) references the 1 to N relation. A relation name must be unique; it cannot be duplicated within an ADL file.
When naming a 1 to N relation, Avaya recommends that you use the convention
<FromTable><ToTable> where <FromTable> is the table where a single record can be linked to one or more records using the foreign key in <ToTable>.
If you rename a relation, Database Designer updates all linked components to reflect the new name.
To change the name for a 1 to N relation, change the name in the Name text box. 10 10 21 call table task table
Primary key - PKey
Foreign key - call_FKey 1 to N
Relation description
The relation description (optional) is a place where you can keep information that identifies the relation.
To change the description for the relation, type a description in the Description text box.
From table
The From table is the table where several records can be linked to a record in the To table. To change the From table, select a table from the From Table combo box.
To table
The To table is the table which contains the foreign key needed to link a record to several records in the From table.
The To table must contain a foreign key that can be used to define a relation to the From table. To change the To table, select a table from the To Table combo box.
Foreign key
The foreign key is the key in the To table that maintains the relation to the From table. To change the foreign key in the To table, select a foreign key from the Foreign Key combo box.
How to create a 1 to N relation
After creating a 1 to N relation, you can create a 1 to N link object which enables an application user to link records between tables (see 1 to N link objectson page 132).
To create a 1 to N relation:
1. Select the module in the Database Designer tree view.
2. Select New > Relation. Database Designer displays the New Relation Wizard. 3. In the first Wizard dialog box:
a. Enter the relation name in the text box. The name must be unique within the ADL file.
Tip: Avaya recommends that you use the names of the From and To tables to name a
1 to N relation. For example: calltask.
4. In the second Wizard dialog box, select:
a. The table that forms the 1 side of the 1 to N relation from the From drop-down list. b. The table that forms the N side of the 1 to N relation from the To drop-down list. c. The foreign key field from the To table that maintains the 1 to N relation.
5. Select Finish.
6. In the relation’s Properties tab, review the properties for your new relation and modify, if necessary. For details, see 1 to N relation propertieson page 168.
7. Select File > Save to save your new 1 to N relation.
How to change a 1 to N relation
You change the properties of a 1 to N relation in the relation’s Properties tab. After you define a relation, you cannot change its relation type. To change the relation type, you must delete the relation and create a new relation.
To change a 1 to N relation:
1. Select the relation in the Database Designer tree view.
2. Modify the desired 1 to N relation properties in the Properties tab of the relation. For more information about specific relation properties, see 1 to N relation propertieson page 168.
How to delete a 1 to N relation
To delete a 1 to N relation:
1. Select the relation from the Database Designer tree view. 2. Select Edit > Delete.
Overview of M to N relations
An M to N (many-to-many) relation links multiple records between two target tables. The target tables are the From and To tables. An M to N relation links the target tables to an Intermediate table. The intermediate table stores foreign key information between the target tables. Each target table is linked to the intermediate table with a 1 to N relation.
The foreign keys in the intermediate table maintain the relation between the target tables.
M to N relation properties
You view the properties for an M to N relation in the relation’s Properties tab. After you define a relation, you cannot change its relation type. You must delete the relation and create a new relation with the correct relation type.
M to N relation properties are:
● Relation nameon page 171.
● Relation descriptionon page 172.
● From tableon page 172.
● To tableon page 172.
● Intermediate tableon page 172.
● Relation 1on page 172.
● Relation 2on page 172
Relation name
The relation name (required; case sensitive) references the M to N relation. A relation name must be unique. The name cannot be duplicated in an ADL file.
When naming an M to N relation, Avaya recommends that you use the convention
<fromtable><totable> where <fromtable> is the name of the From table and <totable> is the name of the To table, for example, productcall.
If you rename a relation, Database Designer updates all linked components to reflect the new name. movie table 10 10 21 theater table PKey 30 30 Foreign key movietheatermovie_FKey Foreign key theatertheatermovie_FKey PKey theatermovie intermediate table
Relation description
The relation description (optional) is a place where you can keep information identifies the relation.
To change the description for the relation, type a description in the Description text box.
From table
You can link several records in the From table to records in the To table. In an M to N relation, the order that you specify for the From and To tables is not important.
To change the From table, select a table from the From Table combo box.
To table
You can link several records in the To table to records in the From table. In an M to N relation, the order that you specify for the To and From tables is not important.
The To table in an M to N relation does not use a foreign key. An M to N relation consists of two 1 to N relations that link the From and To tables to an Intermediate table.
To change the To table, select a table from the To Table combo box.
Intermediate table
The Intermediate table maintains the foreign key information between the From and the To tables. The New Relation Wizard can automatically create the Intermediate table.
If you change the Intermediate table in an M to N relation, you must update the 1 to N relations that link the From and To tables to the foreign keys in the new Intermediate table.
To change the Intermediate table in an M to N relation, select a table from the Intermediate Table combo box.
Relation 1
Relation 1 is the 1 to N relation between the From table and the Intermediate table. This relation must use a foreign key in the Intermediate table.
To change the relation between the From table and Intermediate table, select a relation from the
Relation 1 combo box.
Relation 2
Relation 2 is the 1 to N relation between the To table and the Intermediate table. This relation