Step 2 Define Elements for the Entity

Visual LANSA Logical Modeler

Step 2. Define Elements for the Entity

In this step, you will add the elements for the Customer entity. Some elements will be defined using Data Types and some elements will be defined manually.

The Customer entity will have the following elements: Customer Number, Customer Name, Address Line 1, Address Line 2, Address Line 3, Address Line 4, Postal Code and Country.

Note: If you compare the Customer Entity to the one in the sample, you will see that it has a different structure. In tutorial LMG004, you will transfer some of these elements to a Conceptual Entity and use relationships to include them into the Customer Entity so that it matches the sample model.

1.  Right-click the Customer entity and select the Elements… option.

     The Maintain Entity Elements window will be displayed:

     Note that this window can also be displayed by selecting the entity and then selecting the Edit menu and choosing the Entity Elements… option.

2.  Click the New button to create a new element.

     The Create Element dialog will be displayed:

3.  Enter a Name of Customer number.

4.  Using the Data type drop-down list, select the ID Number (Long) data type.

     Note that the type and length of the data type is displayed to the right of its description. This can aid you in selecting an appropriate data type.

5.  Give the element a field name of iiiCUSNUM, where iii are your initials.

6.  Click the OK button.

7.  The Customer Number element will be added to the list of elements and the Create Element window will be redisplayed.

8.  Create an element called Customer name. This field will be manually defined as follows:

a. Select the Type/length option.

b. Using the  drop-down list, select Alphanumeric and specify a length of 50.

c. Enter a field name should be iiiCUSNAM.

d. Click the OK button.

9.  Create the remaining element for the Customer entity as follows:

Element Name

Data Type

Field Name

Address line 1

Text

iiiADDL1

Address line 2

Text

iiiADDL2

Address line 3

Text

iiiADDL3

Address line 4

Text

iiiADDL4

Post code

Zip/Post Code

iiiPSTCD

Country

Description (Short)

iiiCNTRY

 

 

     Note that, although you have specified field names for all the elements you have created, it is not necessary. The field name is only required when the entity is built.

10. Click the Cancel button to return to the entity elements window.