[go: up one dir, main page]

0% found this document useful (0 votes)
52 views93 pages

Chapter 1 - An Introduction To Synon/2E Data Modeling: Objectives

Uploaded by

vgrynyuk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
52 views93 pages

Chapter 1 - An Introduction To Synon/2E Data Modeling: Objectives

Uploaded by

vgrynyuk
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 93

Synon Made Simple Data Modeling

Chapter 1 - An Introduction To Synon/2E Data Modeling

Objectives:

This chapter will introduce you to the details of Synon Data Modeling Concepts:

Edit Database Relations Panel


Data Modeling Concepts
Synon/2E Data Relations
Designing Business Rules into the Data Model
Synon Field Types
Field Details
Field Conditions
Synon Access Paths
Physical
Retrieval
Updated
Resequence
Query
Involution
Virtual Fields
Editing Access Path Relations

Edit Database Relations Panel

This is the Synon/2E Edit Database Relations Panel used to define the fields (attributes) and files (entities)
which comprise a Synon/2E Data model.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:21


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> Rel lvl:
? Typ Object Relation Seq Typ Referenced object
__ _________________________ ____________ ___ ___ ___________________
__ _________________________ ____________ ___ ___ ___________________
__ _________________________ ____________ ___ ___ ___________________
__ _________________________ ____________ ___ ___ ___________________
__ _________________________ ____________ ___ ___ ___________________
__ _________________________ ____________ ___ ___ ___________________
__ _________________________ ____________ ___ ___ ___________________
__ _________________________ ____________ ___ ___ ___________________

Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options


F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys
(C) Copyright Synon Corporation 1984, 1994.

The Synon Data Model, that is, the Edit Database Relations screen shows the following items:

System/Job Detail Information

1-1
Synon Made Simple Data Modeling

User Class - *DSNR or *PGMR (Designer or Programmer). Only two types of users are allowed to edit
the Synon Data Model, Designers or Programmers. A Designer is mainly responsible for the contents of the
data model or the data relations. Only one Designer is allowed in the model at any given time. Whenever a Designer is
using the model, everyone else is locked out. A Programmer, on the other hand, cannot modify the Data base relations
found in the Data Model. A programmer can specify programs, subroutines, and access paths. Unlike the Designer,
multiple programmers can be in a data model at the same time.

Current Model - The Name of the Data model you have selected is displayed. In our example, the name of
our model is SYN51MDL.

User Profile - The name of the user editing the model.

Work Station ID - Time/Date - The ID of the Work Station editing the data model.
You will also notice the data and time in the upper right hand corner. Sorry, the time is not dynamic. To get a current
time, you must press F5=Reload.

Positioning Fields - Above the Type, Object, Relation, and Referenced object fields are what appears to be
blank lines. These lines are actually positioning fields. These fields are used by the user (programmer or designer) to
selectively display specific detailed information about the data model. For example, to see all of the Objects beginning
from the letter 'J', position the cursor above the Object field, enter a 'J' and Press ENTER.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/99519:21


EDIT DATABASE RELATIONS Synon Release 4.1 Model
=> ___ J________________________ Rel lvl: ___ ___ _________________________
? Typ Object Relation Seq Typ Referenced object
__ Company Master___________ Known by____ Company ID_______________
__ Company Master___________ Has_________ Company Name_____________
__ Department Master________ Known by____ Department ID____________
__ Department Master________ Has_________ Department Name__________
__ Job Master_______________ Known by____ Job ID___________________
__ Job Master_______________ Has_________ Job Description__________
__ Job Master_______________ Has_________ Salary/Hourly Code_______
__ Job Master_______________ Has_________ Pay Rate-Low_____________
__ Job Master_______________ Has_________ Pay Rate-Mid ____________
__ Job Master_______________ Has_________ Pay Rate-High____________
__ _________________________ ____________ _________________________
+
SEL: Z1_3-Details, NO_3-Narr., S1_2-Select, E-Entries, V-Virt.fields, F-Funcs.
F3=Exit F5=Reload F7=Fields F9=Insert F10=Define obj. F17=Services

All Objects beginning from the letter 'J' will be displayed.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:21


EDIT DATABASE RELATIONS Synon Release 4.1 Model
=> ___ J*_______________________ Rel lvl: ___ ___ _________________________
? Typ Object Relation Seq Typ Referenced object
__ Job Master_______________ Known by____ Job ID___________________
__ Job Master_______________ Has_________ Job Description__________
__ Job Master_______________ Has_________ Salary/Hourly Code_______
__ Job Master_______________ Has_________ Pay Rate-Low_____________
__ Job Master_______________ Has_________ Pay Rate-Mid ____________
__ Job Master_______________ Has_________ Pay Rate-High____________
__ _________________________ ____________ _________________________
+
SEL: Z1_3-Details, NO_3-Narr., S1_2-Select, E-Entries, V-Virt.fields, F-Funcs.
F3=Exit F5=Reload F7=Fields F9=Insert F10=Define obj. F17=Services

Let's talk about the Synon/2E Data Model, the foundation of Synon/2E application development.

1-2
Synon Made Simple Data Modeling

Data Modeling Concepts

A Synon/2E Data Model is a structured, organized description of a set of data and its relationships of a
business or organization. Data models are intellectual and sometimes graphical tools representing logical data
relationships. A Data model does not comprise in itself a true representation of all the business's information, but, is a
simplified view of it.

Goals Of Data Modeling

A data model must meet three main objectives to be deemed acceptable:

Comprehensive - Every item of information (field) that is relevant to the organization should be identified.

Non-Redundant - Every item of information should appear once and only once. This elimination of
repeating groups of data is one of the elements of what is commonly known as Normalization.

Consistent - There should be no mutually incompatible representations of information (data), nor


conflicting rules about what can be done with data. That is, a particular data element should have the same attributes
each and every time it is found in the model.

Synon/2E Concepts and Vocabulary

The Edit Database Relations screen allows you to describe the data portion of an application. The data portion
consists of entities (files), attributes (fields), and data relations.

Let's define the terms we will be using throughout this course.

Data Relation - A logical association between two Synon entities or a Synon entity and
a Synon field.

Entity - A group or list of Synon Data Relations.

Attribute - A unit or element of information. This is also known as a field.

Condition - A specific value or values associated with an attribute. A condition may


be a discrete value, a comparison, or a range of values.

Synon/2E Data Relations

The Synon data model explicitly declares relationships between files, and files and fields. These statements are
known as Data Relations. There are eight Data Relations in the Synon/2E product. However, we will focus our
attention on five of those relations at this time.

The Data Relations we will use are the Defined As, Known By, Has, Owned By and Refers To.

1-3
Synon Made Simple Data Modeling

Defined As - The Defined As data relation declares or defines a file (entity) to the Synon Data Model. Whenever you
enter data relations into a file, the Defined As relation, is not a relation you have to remember to enter, it happens
automatically. Unlike the other Synon Data Relations, the Defined As relation does not appear on the screen without
requesting that to happen. To see Defined As relations, position the cursor in one of the selection or position field
called Relation Level (Rel lvl) and enter "ALL" or "DFN" and Press ENTER. All files currently defined in the data
model will be displayed.

The last item you must know about the defined as relation is that it must be removed BEFORE any file is
deleted from the model.

Known By - The Known By relation defines a field to be present on a file as a key field, usually the Primary Key.
This is a File-to-Field relation.

Has - The Has relation defines a field to be present on a file as a non-key or data attribute field. This is a File-to-Field
relation.

Owned By - The Owned By relation causes the key fields of the owning file to be included among the key entries of
the owned file as major or superordinate keys. For example, if the Employee file is owned by the Company file, then the
key field(s) of the Company file would be included as keys on the Employee file. The key fields of the Company file
would appear before the key fields of the Employee file, making them the major or superordinate keys. This is a File-
to-File relation.

Refers To - The Refers To relation causes the key fields of the referenced file to be included as non-key fields on the
referring file. For example, if the Employee file Refers To Job Master file, the keys of Job Master file will be included
as non-key fields on the Employee file. This is a File-to-File relation.

Data Versus Process Driven

A Data Model defines explicit relations of the data. This means that all fields and files are defined, and data
relationships declared BEFORE any programming or construction begins. This is known as the Data Driven
Philosophy. A Data Driven Philosophy places the emphasis on the data. If the data has been correctly designed, and
the relationships have also been correctly stated, then the program design specifications (based on that correctly
designed data model) will also be correct.

If a change to a data element is ever needed, simply make the modification at the data model level. That
change is automatically reflected in every function and/or entity using that field.

By contrast, a Process Driven Philosophy does not concentrate on the Database being well designed or
explicit data relations stated. Instead, a Process Driven application focuses around the process (program). For example,
the automatic business rules like Automatic Referential Integrity that is the result of precise business rules being stated in
the data model does not exist in a Process Driven system. The programmer would have to remember to include the
subroutine performing this validation in every program.

Designing Business Rules into the Data Model

One of the greatest advantages of using a Data Driven Design is that specific methods of handling certain types
of data are built directly into the data model. These specific methods are also known as Business Rules. Whenever
business rules are specified in a data model, these rules are automatically propagated into the programs or functions.
This means that instead of remembering to validate the Customer number field against the Customer Master file each
and every time it's used in a program, specify this business rule in the data model and whenever a function (program) is
created (built over the file containing the Business rule) that validation AUTOMATICALLY appears in the program.

1-4
Synon Made Simple Data Modeling

Business rules can be as simple as specifying the file to be used for validating a foreign key, assigning specific
values or conditions to a field, or defining an access path used to validate an involution data base relation.

Remember, the more Business Rules you can define or place into the data model, the less you will need to
place into Synon/2E functions. Defining Business Rules in the Synon Data Model is a way to "Work Smarter...Not
Harder".

Defining A Synon Entity

To define the Entities, Attributes, and Data Relation in Synon, you specify this information in the Object,
Relation, and Referenced Object fields on the Edit Database Relations screen.

The Object specifies the English-like name of the file or entity you are defining. Up to twenty five characters
may be used to name the file. In this example, the Item Master file is being defined.

The Relation field defines the Data Relation of the object to the Referenced Object. In this example, the
Known By data relation specifies the Primary Key of the file being defined.

The Referenced Object field contains the name of the attribute (field) or entity (file) you're working with. If
the relationship you are defining is a File to File, you may place a ? in the field or position the cursor on the field and
press F4, and a listing of all the entities defined in the model will appear for your selection.

In this particular example, Item Number is being defined a the Primary Key in the Item Master file.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:22


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> Rel lvl:
? Typ Object Relation Seq Typ Referenced object
___ Item Master File____ Known by Item number______
___ ____________________ ________ ___ _________________
___ ____________________ ________ ___ _________________
___ ____________________ ________ ___ _________________
___ ____________________ ________ ___ _________________
___ ____________________ ________ ___ _________________
___ ____________________ ________ ___ _________________
Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

Before we begin creating Synon/2E Entities, let's take a look at two categories of Data Relations, the File to
File and File to Field relations.

File To File Relations - Whenever a file to file relationship is established, the Object and Referenced Object
fields contain the names of entities. Synon takes the key entries of the Referenced Object and makes them apart of the
file specified in the Object field. The Owned By and Refers To data relations are examples of file to file relations.

A File to File relation allows the user to get a selection list of all possible values or conditions being referenced
by using F4 or ? prompting. It also performs automatic referential integrity checking (a business rule). Automatic
referential integrity checking means that if a value is entered into a field (established by a file to file relation) Synon will,
AUTOMATICALLY, verify that value is contained in the Referenced object or file.

File to Field Relations - The file to field relation states a field is present on a file. The Object field contains
the name of the file containing the field and the Referenced object contains the name of the field. The Known By and
Has relations are examples of file to field relations.

1-5
Synon Made Simple Data Modeling

Now that we have discussed the concepts behind Synon Data Modeling, let's take a few minutes and put it into
practice. We will be defining three files, the Company Master file, the Department Master file, and the Job Master file.

>>> Enter the following relations:

"Company Master" in the Object field.


"Known By" in the Relation field.
"Company ID" in the Referenced object field.

When this step is completed, you have entered your first Synon Data Relation. Congratulations. We have
defined the key to the Company Master file. Let's add another field to this file.

>>> Go to the next line and enter the following:

"Company Master" in the Object field.


"Has" in the Relation field.
"Company Name" in the Referenced object field.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:22


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ ________________________ Rel lvl:___ ___ ________________________
? Typ Object Relation Seq Typ Referenced object
_ Company Master__________ Known by____ Company ID______________
_ Company Master__________ Has_________ Company Name____________
_ ________________________ ____________ ________________________
_ ________________________ ____________ ________________________
_ ________________________ ____________ ________________________
Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

Pretty simple isn't it? Specifying a file or entity in Synon is simply identifying the English-like File Name (in
the object field), the Data Relation (Owned by, Has, Refers To, or Known By), and the field or appropriate file name in
the Referenced object field. Remember, all Synon files (compiled OS/400 or S/38 objects) must have, at least, one key
field included in the definition, otherwise it will not generate.

Let's create a few more files, the Department Master and Job Master files.

1-6
Synon Made Simple Data Modeling

>>> Enter the following data relations on the next available lines of the screen:

(Object) (Relation) (Referenced object)

Department Master Known By Department ID


Department Master Has Department Name
Job Master Known By Job ID
Job Master Has Job Description
Job Master Has Salary/Hourly Code
Job Master Has Pay Rate-Low
Job Master Has Pay Rate-Mid
Job Master Has Pay Rate-High

When you are finished, it should look something like this....

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:22


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ ________________________ Rel lvl:___ ___ __________________________
? Typ Object Relation Seq Typ Referenced object
__ Company Master__________ Known by___ Company ID________________
__ Company Master__________ Has________ Company Name______________
__ Department Master_______ Known by___ Department ID_____________
__ Department Master_______ Has________ Department name___________
__ Job Master______________ Known by___ Job ID____________________
__ Job Master______________ Has________ Job Description___________
__ Job Master______________ Has________ Salary/Hourly Code________
__ Job Master______________ Has________ Pay Rate-Low______________
__ Job Master______________ Has________ Pay Rate-Mid______________
__ Job Master______________ Has________ Pay Rate-High_____________
__ ________________________ ___________ __________________________
__ ________________________ ___________ __________________________
__ ________________________ ___________ __________________________
Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

>>> Now Press ENTER.

1-7
Synon Made Simple Data Modeling

Your screen will have the entries under Object and Referenced Object highlighted in reverse image. Notice the
message at the bottom of the following screen, " 'Company Master' type FIL not found." Synon is indicating you have
referred to or defined new objects (files and fields) and it now requires more information.

>>> Press F10 To Define these objects to Synon.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:25


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ _________________________ Rel lvl:___ ___ _________________________
? Typ Object Relation Seq Typ Referenced object
__ FIL Company Master Known by___ FLD Company ID
__ FIL Company Master Has________ FLD Company Name
__ FIL Department Master Known by___ FLD Department ID
__ FIL Department Master Has________ FLD Department name
__ FIL Job Master Known by___ FLD Job ID
__ FIL Job Master Has________ FLD Job Description
__ FIL Job Master Has________ FLD Salary/Hourly Code
__ FIL Job Master Has________ FLD Pay Rate-Low
__ FIL Job Master Has________ FLD Pay Rate-Mid
__ FIL Job Master Has________ FLD Pay Rate-High
__ _________________________ ___________ _____________________________
__ _________________________ ___________ _____________________________
__ _________________________ ___________ _____________________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys
'Company Master' type FIL not found.

Defining Files and Fields In Synon

This is the Define Objects Screen. It displays the names of all the files and fields needing to be defined to
Synon. These objects were specified on the Edit Database Relations Screen. Here, you tell Synon very specific
information about the entities and attributes being defined. You will notice the English-like names defined on the
previous screen have been brought forward AUTOMATICALLY.

Op: GWS TRN3PCS1 2/07/96 19:25


DEFINE OBJECTS Synon Made Simple-R5.1 GWS

Object Object Object Referenced Field Edit


type name attr field usage field
FIL Company Master___________ ___ ________________________ _
FLD Company ID_______________ ___ ________________________ CDE _
FLD Company Name_____________ ___ ________________________ ATR _
FIL Department Master________ ___ _______________________ _
FLD Department ID____________ ___ ________________________ CDE _
FLD Department name__________ ___ ________________________ ATR _
FIL Job Master_______________ ___ ________________________ _
FLD Job ID___________________ ___ ________________________ CDE _
FLD Job Description__________ ___ ________________________ ATR _
FLD Salary/Hourly Code_______ ___ ________________________ ATR _
FLD Pay Rate-Low_____________ ___ ________________________ ATR _
FLD Pay Rate-Mid_____________ ___ ________________________ ATR _
FLD Pay Rate-High____________ ___ ________________________ ATR _
___ _________________________ ___ ________________________ ___ _
___ _________________________ ___ ________________________ ___ _

F3=Exit

1-8
Synon Made Simple Data Modeling

Types of Synon Files

The first file we will define is the Company Master. We must specify the type of file in the Object Attribute
field.

There are two types of files used in Synon. The CAPTURE file and the REFERENCE file.

The CAPTURE file can be thought of as a transaction file, containing data that changes on a regular basis.
Three functions are created whenever a Capture file is defined.

The REFERENCE file is another name for a Master file. It contains data that is permanent or less likely to
change on a regular basis. Company Master is an example of a Master file.

Please NOTE the only real difference between a Capture and Reference file is the number of functions
automatically created. They are physically implemented the same way. I have attended meetings where great debates
have emerged on whether to make a file a Capture file or a Reference file. The secret is...it really does not matter!

>>> Enter 'REF' in the object attribute field next to Company Master.

Fields are specified in much the same way files are. In the Object type field, FLD indicates the object being
defined is a field. Object Name is the name of the object described on the Edit Database Relations screen. Object
attribute describes the field type or category a field may belong to. Keep in mind there are really only two types of
fields, alpha and numeric. Field types contain predefined attributes such as field length, type (alpha or numeric), default
edit codes, and even number of decimal places.

>>> Position the cursor on the Object Attribute field (next to Company ID). Press F4 or enter a '?' to see a
selection list of the available predefined Synon field types. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:25


DEFINE OBJECTS Synon Made Simple-R5.1 GWS

Object Object Object Referenced Field Edit


type name attr field usage field
FIL Company Master___________ REF __
FLD Company ID_______________ ?__ _________________________ CDE __
FLD Company Name_____________ ___ _________________________ ATR __
FIL Department Master________ ___ _________________________ __
FLD Department ID____________ ___ _________________________ CDE __
FLD Department name__________ ___ _________________________ ATR __
FIL Job Master_______________ ___ _________________________ __
FLD Job ID___________________ ___ _________________________ CDE __
FLD Job Description__________ ___ _________________________ ATR __
FLD Salary/Hourly Code_______ ___ _________________________ ATR __
FLD Pay Rate-Low_____________ ___ _________________________ ATR __
FLD Pay Rate-Mid_____________ ___ _________________________ ATR __
FLD Pay Rate-High____________ ___ _________________________ ATR __
___ _________________________ ___ _________________________ ___ __
___ _________________________ ___ _________________________ ___ __

F3=Exit

1-9
Synon Made Simple Data Modeling

Synon Field Types

The Display Object Attributes Screen lists the various groupings or categories a field may be assigned.
Some groupings or field types are alpha, others are numeric. These predefined field lengths may be as small as 1 or as
large as 30. Some numeric fields allow decimals, others do not.

Op: GWS TRN3PCS1 2/07/96 19:26


DISPLAY FIELD TYPES Synon Made Simple-R5.1 GWS
Object type. . . : FLD Company ID

___ <== Position display


? Type Description
N CDE Alphameric code value
_ DT# Date in *ISO format (YYYY-MM-DD internally)
_ DTE Date in system date format - (YYMMDD internally)
_ IGC Ideographic text
_ NAR Narrative text
_ NBR Pure numeric value (eg line number).
_ PCT Percentage or market index.
_ PRC Price or tarrif
_ QTY Quantity
_ REF Field is based on another field.
_ SGT Surrogate (number representing an object)
_ STS Status.
_ TM# Time in *ISO format (HH.MM.SS internally)
_ TME Time in HHMMSS format.
_ TS# Timestamp (YYYY-MM-DD-HH.MM.SS.NNNNNN)
SEL: X-Select value, N-Narrative.
F3=Exit F9=Add

It's important to NOTE Synon field types are created with default characteristics, and may be changed
(globally or on a field by field basis) as needed.

Synon has extensive Narrative documentation on each field type. Today, we will review three of the field
types listed. Let's start by looking at the CDE or CODE field type.

>>> Page down to see additional field types.

Op: GWS TRN3PCS1 2/07/96 19:26


DISPLAY FIELD TYPES Synon Made Simple-R5.1 GWS
Object type. . . : FLD Company ID

<== Position display


? Type Description
_ TXT Object text.
_ VAL Monetary value
_ VNM Valid System name

SEL: X-Select value, N-Narrative.


F3=Exit F9=Add

>>> Page up to return to the first page of field types. Place an 'N' in the selection field to the left of the CDE
field. Press ENTER.

1 - 10
Synon Made Simple Data Modeling

The narrative for each field type is usually displayed on several screens. We have taken the contents of those
screens and have assembled the information on one page.

NOTE: If you were viewing these screens in Synon, you would use the Page Up and Page Down keys to move from
one screen to another. At the end of the display, you would select F3 to return to the previous screen.

Help Text Document . . : ATRFLD_CDE


"CDE" (CODE) Field type - description

1.1.1.1. The "CDE" (CODE) Field type


(C) COPYRIGHT 1986 SYNON Ltd. ATRFLD_CDE/Y2HLPTXT 02/07/96

Description

The Synon/2E CDE field type is used for Synon/2E fields that represent
codes.

Fields of type CDE will be alphanumeric or character - type NBR can


be used for numeric fields, but NOTE that you cannot provide an enquiry
function for NBR fields, as a '?' cannot be entered for numeric fields.

Some examples of 'Code' fields

- Product code.
- Currency code.
- Warehouse location code.
- Customer code.
- Region code.
- Cost centre code.
- Country code.

Default characteristics of 'Code' fields

.________________________________________________________________.
| | | Model | Model | Device |
| Data attribute | Default | Default | Field | Field |
| | | Override | Override | Override |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| DDS name | xxCD | - | Y | N |
| System data type | Alpha | N | N | N |
| External length | 6 | Y | Y | N |
| Internal length |as external| - | - | - |
| Decimal places | - | - | - | - |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| Headings |Field name | N | Y | Y |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| Keyboard shift | N | N | Y | N |
| Allow lowercase | N | Y | Y | N |
| Mandatory fill | N | Y | Y | N |
| Valid System name | N | Y | Y | N |
| Mod 10/11 check | - | - | - | - |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| Check condition | *NONE | N | Y | Y |
| Translate values | - | - | - | - |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| Field Edit option | Y | Y | N | Y |
| Edit codes: Input | - | - | - | - |
| Output| - | - | - | - |
| Report| - | - | - | - |
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'

>>> Press F3 to return to the Display Object Attributes panel.

1 - 11
Synon Made Simple Data Modeling

Now let's look at the Narrative for the Narrative (NAR) text field.

>>> Enter 'N' next to the NAR field type and Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:28


DISPLAY FIELD TYPES Synon Made Simple-R5.1 GWS
Object type. . . : FLD Company ID

___ <== Position display


? Type Description
_ CDE Alphameric code value
_ DT# Date in *ISO format (YYYY-MM-DD internally)
_ DTE Date in system date format - (YYMMDD internally)
_ IGC Ideographic text
N NAR Narrative text
_ NBR Pure numeric value (eg line number).
_ PCT Percentage or market index.
_ PRC Price or tarrif
_ QTY Quantity
_ REF Field is based on another field.
_ SGT Surrogate (number representing an object)
_ STS Status.
_ TM# Time in *ISO format (HH.MM.SS internally)
_ TME Time in HHMMSS format.
_ TS# Timestamp (YYYY-MM-DD-HH.MM.SS.NNNNNN)
SEL: X-Select value, N-Narrative.
F3=Exit F9=Add

1 - 12
Synon Made Simple Data Modeling

Help Text Document . . : ATRFLD_NAR


"NAR" (NARRATIVE TEXT) Field type - description

1.1.1.1. The "NAR" (NARRATIVE TEXT) Field type


(C) COPYRIGHT 1986 SYNON Ltd. ATRFLD_NAR/Y2HLPTXT 02/07/96

Description

The Synon/2E NAR field type is used for Synon/2E fields that represent
narrative text.

Some examples of 'Narrative Text' fields

- Order comments.
- Address lines.
- Full product description.
- Customer's job title.

Default characteristics of 'Narrative Text' fields

.________________________________________________________________.
| | | Model | Model | Device |
| Data attribute | Default | Default | Field | Field |
| | | Override | Override | Override |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| DDS name | xxNA | - | Y | N |
| System data type | Alpha | N | N | N |
| External length | 30 | Y | Y | N |
| Internal length |as external| - | - | - |
| Decimal places | - | - | - | - |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| Headings |Field name | N | Y | Y |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| Keyboard shift | N | N | Y | N |
| Allow lowercase | Y | Y | Y | N |
| Mandatory fill | N | Y | Y | N |
| Valid System name | N | Y | Y | N |
| Mod 10/11 check | - | - | - | - |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| Check condition | *NONE | N | Y | Y |
| Translate values | - | - | - | - |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| Field Edit option | N | Y | N | Y |
| Edit codes: Input | - | - | - | - |
| Output| - | - | - | - |
| Report| - | - | - | - |
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'

Discussion

The use of the NAR field type should be contrasted in particular


with the 'Descriptive text' (TXT) field type, which is used to specify
a basic descriptive name for an entity, e.g. 'Company name', 'Product
name'. There is usually only one of these per entity, whereas there
may well be several narrative fields.

The NAR field attribute can be regarded as a 'catch-all' to be used


to define data fields not covered by any other field attribute.

>>> Press F3 to exit.

The last field type we will review is the Number field (NBR).

1 - 13
Synon Made Simple Data Modeling

>>>Place an 'N' next to NBR. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:28


DISPLAY FIELD TYPES Synon Made Simple-R5.1 GWS
Object type. . . : FLD Company ID

___ <== Position display


? Type Description
_ CDE Alphameric code value
_ DT# Date in *ISO format (YYYY-MM-DD internally)
_ DTE Date in system date format - (YYMMDD internally)
_ IGC Ideographic text
_ NAR Narrative text
N NBR Pure numeric value (eg line number).
_ PCT Percentage or market index.
_ PRC Price or tarrif
_ QTY Quantity
_ REF Field is based on another field.
_ SGT Surrogate (number representing an object)
_ STS Status.
_ TM# Time in *ISO format (HH.MM.SS internally)
_ TME Time in HHMMSS format.
_ TS# Timestamp (YYYY-MM-DD-HH.MM.SS.NNNNNN)
SEL: X-Select value, N-Narrative.
F3=Exit F9=Add

1 - 14
Synon Made Simple Data Modeling

Help Text Document . . : ATRFLD_NBR


"NBR" (NUMBER) Field type - description

1.1.1.1. The "NBR" (NUMBER) Field type


(C) COPYRIGHT 1986 SYNON Ltd. ATRFLD_NBR/Y2HLPTXT 02/07/96

Description

The NBR field attribute is used for fields that contain purely
numeric data values, i.e. fields which are numeric, but do not possess
a standard dimension that is covered by an existing standard type (e.g.
price, quantity, value).

By default, NBR fields are for integers.

Some examples of 'Number' fields


- Number of customers.
- Maximum number of orders allowed.
- Number of records in file.

Default characteristics of 'Number' fields

.________________________________________________________________.
| | | Model | Model | Device |
| Data attribute | Default | Default | Field | Field |
| | | Override | Override | Override |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| DDS name | xxNB | - | Y | N |
| System data type | Packed | N | N | N |
| External length | 5.0 | Y | Y | N |
| Internal length |as external| - | - | - |
| Decimal places | N | Y | Y | N |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| Headings |Field name | N | Y | Y |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| Keyboard shift | N | N | Y | N |
| Allow lowercase | - | - | - | - |
| Mandatory fill | N | Y | Y | N |
| Valid System name | - | - | - | - |
| Mod 10/11 check | N | Y | Y | N |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| Check condition | *NONE | N | Y | Y |
| Translate values | - | - | - | - |
|~~~~~~~~~~~~~~~~~~~|~~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|~~~~~~~~~~|
| Field Edit option | Z | Y | N | Y |
| Edit codes: Input | 4 | Y | Y | Y |
| Output| 3 | Y | Y | Y |
| Report| 3 | Y | Y | - |
'~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~'

Discussion

'Numeric fields with dimension' (VAL, QTY, PCT, PRC) should be used
for numeric data fields that have a standard dimension (e.g. currency,
stock units, percentage) since they provide a more precise specifica-
tion.

The NBR type can be regarded as a 'Catch-all' for numeric data


fields that are not covered by other types.

NOTE that if you use a field of type NBR as an identifier, i.e. as a


key field, you cannot provide an enquiry function for such a field,
since DDS does not allow a '?' to be entered for numeric fields.

>>> Press F3 to exit.

1 - 15
Synon Made Simple Data Modeling

This chart summarizes the field types available in Synon/2E.

Synon Object Field Type Summary

Attr Description Mneu- Type Default Example


Name monic Length

CDE Alphameric Code CD A 6 Company ID


(usually key fld)
DT# ISO 9000 Date A 10 MM-DD-YYYY
DTE Date in System Fmt DT P 7.0 Expiration Date
(NOTE stored internally as CYYMMDD)
IGC IG A 20
NAR Narrative Text NA A 25 Field Name
NBR Numeric value NB P 5.0 Qty, Line Numbers
PCT Percentage PC P 5.2 Percent of Sale
PRC Price PR P 7.2 Discount Price
QTY Quantity QT P 5.0 Order Qty, Shipped Qty
REF Referenced N/A Fields definition based
upon another field.
SGT Surrogate SG P 7.0 Currently not used
STS Status ST A 1 Order Status
TM# ISO 9000 Time TZ A 8 ISO Time Changed
TME Time TM P 6.0 Time Created
TS# Time stamp TS A 26 Date/Time Stamp
TXT Text Description TX A 30 Customer Name
VAL Monetary value VA P 11.2 Credit Limit
VNM Names of objects VN A 10 File Name, User ID

Now we have reviewed some of the attributes of the field types, it's time to select the field type to be associated
with Company ID.

>>> Place an 'X' next to CDE and Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:29


DISPLAY FIELD TYPES Synon Made Simple-R5.1 GWS
Object type. . . : FLD Company ID

___ <== Position display


? Type Description
X CDE Alphameric code value
_ DT# Date in *ISO format (YYYY-MM-DD internally)
_ DTE Date in system date format - (YYMMDD internally)
_ IGC Ideographic text
_ NAR Narrative text
_ NBR Pure numeric value (eg line number).
_ PCT Percentage or market index.
_ PRC Price or tarrif
_ QTY Quantity
_ REF Field is based on another field.
_ SGT Surrogate (number representing an object)
_ STS Status.
_ TM# Time in *ISO format (HH.MM.SS internally)
_ TME Time in HHMMSS format.
_ TS# Timestamp (YYYY-MM-DD-HH.MM.SS.NNNNNN)
SEL: X-Select value, N-Narrative.
F3=Exit F9=Add

1 - 16
Synon Made Simple Data Modeling

The field type selected on the Display Object Attributes screen has been returned to the Defined Objects
screen.

Op: GWS TRN3PCS1 2/07/96 19:30


DEFINE OBJECTS Synon Made Simple-R5.1 GWS

Object Object Object Referenced Field Edit


type name attr field usage field
FIL Company Master___________ REF
FLD Company ID CDE CDE
FLD Company Name_____________ ___ ________________________ ATR _
FIL Department Master________ ___
FLD Department ID____________ ___ ________________________ CDE _
FLD Department name__________ ___ ________________________ ATR _
FIL Job Master_______________ ___
FLD Job ID___________________ ___ ________________________ CDE _
FLD Job Description__________ ___ ________________________ ATR _
FLD Salary/Hourly Code_______ ___ ________________________ ATR _
FLD Pay Rate-Low_____________ ___ ________________________ ATR _
FLD Pay Rate-Mid_____________ ___ ________________________ ATR _
FLD Pay Rate-High____________ ___ ________________________ ATR _
___ _________________________ ___ ________________________ ___ _
___ _________________________ ___ ________________________ ___ _

F3=Exit

You will notice the Object Attribute field for the remaining fields has been highlighted. This indicates these
fields must also be defined.

Op: GWS TRN3PCS1 2/07/96 19:30


DEFINE OBJECTS Synon Made Simple-R5.1 GWS

Object Object Object Referenced Field Edit


type name attr field usage field
FIL Company Master___________ REF
FLD Company ID CDE CDE
FLD Company Name_____________ TXT ________________________ ATR __
FIL Department Master________ REF
FLD Department ID____________ CDE ________________________ CDE __
FLD Department name__________ TXT ________________________ ATR __
FIL Job Master_______________ REF
FLD Job ID___________________ CDE ________________________ CDE __
FLD Job Description__________ TXT ________________________ ATR __
FLD Salary/Hourly Code_______ STS ________________________ ATR Y_
FLD Pay Rate-Low_____________ ___ ________________________ ATR __
FLD Pay Rate-Mid_____________ ___ ________________________ ATR __
FLD Pay Rate-High____________ ___ ________________________ ATR __
___ _________________________ ___ ________________________ ___ __
___ _________________________ ___ ________________________ ___ __

F3=Exit

1 - 17
Synon Made Simple Data Modeling

>>> To define the remaining fields, enter the following in the Object Attribute field:

Company Name TXT


Department Master REF
Department ID CDE
Department Name TXT
Job Master REF
Job ID CDE
Job Description TXT

The next field we will define is the Salary/Hourly Code. It is a special type of field called a STATUS FIELD.
A status field is unique in that it contains discrete values.

>>> Enter 'STS' in the Object Attribute field and 'Y' in the Edit field column. Press ENTER to define the
Salary/Hourly Code as a Status field.

Field Details

The next screen displayed is the Edit Field Details screen. It contains detailed information about the field we
are evaluating. It's attribute, size (internal length) and data type (alpha, packed, or signed), as well as the Synon
generated field name.

This screen also shows if Lowercase letters are allowed in alpha fields.

The English-like field name is the basis for default headings for Text, Left hand side text, and Column
headings. Each heading may be changed or overridden as needed. Any change made on this screen will be reflected
throughout the model.

Op: GWS TRN3PCS1 2/07/96 19:31


EDIT FIELD DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Salary/Hourly Code Document'n seq. . :
Type . . . . . . . : STS Field usage: A
Internal length. . : 1 Data type : A GEN name: ABST_____
K'bd shift: _ Lowercase : _
Headings. . . . . . :- Old DDS name: _________
Text . . . . . . . . : Salary/Hourly Code_______________________________
Left hand side text. : Salary/Hourly Code_______________________
Right hand side text : Value____________________________________
Column headings. . . : Salary/Hourly
Code______________
__________________
Control . . . . . . :-
Default condition : *NONE________________

Check condition . : *NONE________________


Valid system name. . : _ Mandatory fill . . . : _ Translate cnd values: _

F3=Exit no update F8=Change name/type F9=Conditions F10=Appearance F20=Narrative

1 - 18
Synon Made Simple Data Modeling

If you had specified the field name or field type (Attribute) incorrectly on the Edit Database Relations Screen,
you can change either entry by Pressing F8. The protection for those fields is removed and you can modify as needed.

Field Conditions

A Status field type is unlike any other Synon field types in that specific values or multiple values may be
assigned to it. These values are called CONDITIONS. Multiple values grouped together is known as a LIST OF
CONDITIONS. Conditions or Lists may be assigned to a status field type to expedite processing or used as select/omit
criteria in access path selection.

>>> Press F9 to go to the Edit Field Conditions Screen. This screen will allow us to assign conditions to this field.

The Edit Field Conditions Screen allows you to enter English-like names for conditions and specify their
discrete single values or multiple values.

In this example, we are creating a condition called Hourly Position, the type of condition is a VAL or Value.

>>> Enter the following:

'Hourly Position' in the ENTER CONDITION field, and 'VAL' in the TYPE field. Press
ENTER.

Op: GWS TRN3PCS1 2/07/96 19:32


EDIT FIELD CONDITIONS Synon Made Simple-R5.1 GWS
Field name. . . . . : Salary/Hourly Code Attr. : STS
Enter condition . . : Hourly Position _________ and type to add new condit
type . : VAL (Type: LST, VAL)

? Condition Type Op File/From value Display/To value

SEL: Z-Details, D-Delete, U-Where used, N-Narrative.


F3=Exit

1 - 19
Synon Made Simple Data Modeling

When the condition and type values have been entered, it's time to define the Status or File value used to
represent the English-like condition name. The Status or File value is the actual character found in the database
file. In this example, we will use 'H' as the status value.

>>> Enter 'H' in the status value field. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:33


EDIT FIELD CONDITION DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Salary/Hourly Code Attr. : STS Mode : *ADD
Length on file . . : 1

Condition. . . . . : Hourly Position__________


Type . . . . . . . : VAL

File value Mnemonic


Status value . . . : H_____________________

F3=Exit

You will notice a message "Condition 'Hourly Position' added." appears.

Op: GWS TRN3PCS1 2/07/96 19:33


EDIT FIELD CONDITION DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Salary/Hourly Code Attr. : STS Mode : *ADD
Length on file . . : 1

Condition. . . . . : Hourly Position__________


Type . . . . . . . : VAL

File value Mnemonic


Status value . . . : H_____________________

F3=Exit
Condition 'Hourly Position' added.

1 - 20
Synon Made Simple Data Modeling

>>> Enter the next condition name, 'Salary Position' by keying over 'Hourly Position'. The field value used will
be 'S'. Press ENTER to continue.

Op: GWS TRN3PCS1 2/07/96 19:33


EDIT FIELD CONDITION DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Salary/Hourly Code Attr. : STS Mode : *ADD
Length on file . . : 1

Condition. . . . . : Salalry Position_________


Type . . . . . . . : VAL

File value Mnemonic


Status value . . . : S_____________________

F3=Exit
Condition 'Hourly Position' added.

A message is displayed indicating Salary Position has been added.

Op: GWS TRN3PCS1 2/07/96 19:33


EDIT FIELD CONDITION DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Salary/Hourly Code Attr. : STS Mode : *ADD
Length on file . . : 1

Condition. . . . . : Salary Position_________


Type . . . . . . . : VAL

File value Mnemonic


Status value . . . : S_____________________

F3=Exit
Condition 'Salalry Position' added.

>>> Press F3 to return to the Edit Field Conditions Screen.

1 - 21
Synon Made Simple Data Modeling

The Condition List

You will notice the Hourly Position and Salary Position conditions have been added plus another condition
called `*All values'. *All values is a list (LST). A list is a grouping of one or more predefined VAL conditions.
As you may have guessed, the *All Values condition list contains ALL condition values specified for the Salary/Hourly
code field.

Op: GWS TRN3PCS1 2/07/96 19:33


EDIT FIELD CONDITIONS Synon Made Simple-R5.1 GWS
Field name. . . . . : Salary/Hourly Code Attr. : STS
Enter condition . . : _________________________ and type to add new condit
type . : ___ (Type: LST, VAL)

? Condition Type Op File/From value Display/To value


_ *ALL values LST **
_ Hourly Position VAL H H
_ Salary Position VAL S S

SEL: Z-Details, D-Delete, U-Where used, N-Narrative.


F3=Exit

>>> Press F3 to exit.

Op: GWS TRN3PCS1 2/07/96 19:33


EDIT FIELD DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Salary/Hourly Code Document'n seq. . :
Type . . . . . . . : STS Field usage: A
Internal length. . : 1 Data type : A GEN name: ABST_____
K'bd shift: _ Lowercase : _
Headings. . . . . . :- Old DDS name: _________
Text . . . . . . . . : Salary/Hourly Code_________________________________
Left hand side text. : Salary/Hourly Code____________________________
Right hand side text : Value_________________________________________
Column headings. . . : Salary/Hourly_______
Code________________
____________________
Control . . . . . . :-
Default condition : *NONE_________________

Check condition . : ? ____________________


Valid system name. . : _ Mandatory fill . . . : _ Translate cnd values: _ _

F3=Exit no update F8=Change name/type F9=Conditions F10=Appearance F20=Narrative

1 - 22
Synon Made Simple Data Modeling

It is important that only the condition values assigned to this field are entered. As this field is currently defined,
any value entered would be accepted. To assure only the condition values specified are permitted to be entered in this
field, specify the name of a condition (single value or list) in the Check Condition field. Synon will automatically
validate whatever is entered in this field against the predefined condition or list of conditions specified in the Check
condition field.

>>> Enter a '?' in the Check condition field to display a selection list of the conditions available for this field.
Press ENTER.

All of the conditions associated with this field will be used as validation criteria.

>>> Select the condition list *ALL values by placing an 'X' in the subfile selection field.
Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:34


EDIT FIELD CONDITIONS Synon Made Simple-R5.1 GWS
Field name. . . . . : Salary/Hourly Code Attr. : STS
Enter condition . . : _________________________ and type to add new condit
type . : ___ (Type: LST, VAL)

? Condition Type Op File/From value Display/To value


X *ALL values LST **
_ Hourly Position VAL H H
_ Salary Position VAL S S

SEL: Z-Details, D-Delete, X-Select, U-Where used, N-Narrative.


F3=Exit

1 - 23
Synon Made Simple Data Modeling

The condition, *ALL Values, has been returned to the Check condition field. By specifying this "business
rule" at the field or data model level, every Synon function or program containing this field will AUTOMATICALLY
execute the same validation routine. The Synon developer does not have to remember to insert this routine into each
data entry or file maintenance function containing this field.

Op: GWS TRN3PCS1 2/07/96 19:34


EDIT FIELD DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Salary/Hourly Code Document'n seq. . :
Type . . . . . . . : STS Field usage: A
Internal length. . : 1 Data type : A GEN name: ABST_____
K'bd shift: _ Lowercase : _
Headings. . . . . . :- Old DDS name: _________
Text . . . . . . . . : Salary/Hourly Code________________________________
Left hand side text. : Salary/Hourly Code________________________________
Right hand side text : Value_________________________________________
Column headings. . . : Salary/Hourly__________________
Code___________________________
_______________________________
Control . . . . . . :-
Default condition : *NONE____________________
Prompt function . : Condition Value Displayer (*CVD, *DDL)
Check condition . : *ALL values______________
Valid system name. . : _ Mandatory fill . . . : _ Translate cnd values: _ _

F3=Exit no update F8=Change name/type F9=Conditions F10=Appearance F20=Narrative

>>> Press ENTER to Continue.

1 - 24
Synon Made Simple Data Modeling

Op: GWS TRN3PCS1 2/07/96 19:35


DEFINE OBJECTS Synon Made Simple-R5.1 GWS

Object Object Object Referenced Field Edit


type name attr field usage field
FIL Company Master___________ REF
FLD Company ID CDE _________________________ CDE _
FLD Company Name TXT _________________________ ATR _
FIL Department Master________ REF
FLD Department ID CDE _________________________ CDE _
FLD Department name TXT _________________________ ATR _
FIL Job Master_______________ REF
FLD Job ID CDE _________________________ CDE _
FLD Job Description TXT _________________________ ATR _
FLD Salary/Hourly Code STS _________________________ ATR _
FLD Pay Rate-Low_____________ PRC _________________________ ATR _
FLD Pay Rate-Mid_____________ REF Pay Rate-Low_____________ ATR _
FLD Pay Rate-High____________ REF Pay Rate-Low_____________ ATR _

F3=Exit

We will define the remaining Pay Rate-Low field as a Price (PRC) field type.

>>> Enter 'PRC' as the object attribute for Pay Rate-Low.

The remaining fields, Pay Rate-Mid and Pay Rate-High have the same physical attributes as Pay Rate-
Low. Synon allows us to specify or base the physical attributes of one field on another by using a special object
attribute, REF or Reference. Whenever one field references another, the physical attributes (field type, length, decimals,
allow lower case, as well as conditions and lists) carry over to this newly defined field. Fields that are based upon
common fields are said to share the same DOMAIN.
>>> To allow Pay Rate-Mid and Pay Rate-High to reference or share the same domain as the field Pay Rate-
Low, Enter REF on the object attribute of these fields, and specify the field (Pay Rate-Low) to be REFerenced in
the Referenced field for each of these fields.

The last item we will discuss is the Field Usage field. There are only two values for this field, CDE and
ATR. CDE indicates the field is the primary key of a defined file and ATR indicates the field is a non-key field. A field
can only have a field usage of ATR or CDE, but not both. Do not confuse the field type CDE with the Field usage CDE.
In this example, Company ID, Department ID, and Job ID are CDE type fields, and also have a field usage of CDE.

When the definitions of all fields and files are complete, Synon takes you back to the Edit Database Relations
Screen.

>>> Press ENTER to continue.

1 - 25
Synon Made Simple Data Modeling

A Closer Look At Synon Entities

We have completed the definitions of the entities and attributes specified in the Synon Data model. We can
take a closer look at the physical layout and characteristics of the file by placing an 'E' in the subfile selection field next
to any data relation.

>>> Let's review the physical record layout of the Company Master file by placing an 'E' in the subfile selection
field to see the ENTRIES for that file. Press ENTER to continue.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:36


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ _________________________ Rel lvl: ___ ___ ________________________
? Typ Object Relation Seq Typ Referenced object
E FIL Company Master___________ Known by____ FLD Company ID______________
_ FIL Company Master___________ Has_________ FLD Company Name____________
_ FIL Department Master________ Known by____ FLD Department ID___________
_ FIL Department Master________ Has_________ FLD Department name_________
_ FIL Job Master_______________ Known by____ FLD Job ID__________________
_ FIL Job Master_______________ Has_________ FLD Job Description_________
_ FIL Job Master_______________ Has_________ FLD Salary/Hourly Code______
_ FIL Job Master_______________ Has_________ FLD Pay Rate-Low____________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-Mid____________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-High___________
_ _____________________________ ____________ ________________________
_ _____________________________ ____________ ________________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

Key Structures

The Edit File Entries screen displays the physical layout of the entity being examined.

This screen shows the English-like field names of the fields, the field type or attribute. It also shows if the field
is used as a key field (K) or a non-key field (A).

The Edit File Entries Screen displays the Key structure (KSQ). A key field is designated by a 'K' in the 'Et'
field. A key field with a '1' would be the first or major key field for that file, a '2' would be the second, and so on. In this
example, a single key exists.

Op: GWS TRN3PCS1 2/07/96 19:36


EDIT FILE ENTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Company Master

? Field Type Ocr Et Ksq GEN name Length Rename

_ Company ID CDE K 1 ABCD 6


_ Company Name TXT A ABTX 25

SEL: Z-Details, R-Replace field, U-Usage, M-Mapped field parameters, L-Lock


F3=Exit

1 - 26
Synon Made Simple Data Modeling

Field Naming Algorithm

The Synon data model is usually configured to automatically generate the names of files, fields, and record
formats.

Many IBM midrange shops have very strict standards when it comes to the naming of files, fields, programs,
and the like. Often when an IBM midrange programmer is introduced to Synon generated field names (shown below),
the generated field names may be confusing and contrary to the generally accepted standards used in the naming of
fields, programs, files, etc.

Op: GWS TRN3PCS1 2/07/96 19:36


EDIT FILE ENTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Company Master

? Field Type Ocr Et Ksq GEN name Length Rename

_ Company ID CDE K 1 ABCD 6


_ Company Name TXT A ABTX 25

SEL: Z-Details, R-Replace field, U-Usage, M-Mapped field parameters, L-Lock


F3=Exit

The Synon field naming algorithm is based upon the field type or attribute, and when the field is defined in
the Synon data model.

Synon field types or attributes are generic groups or categories of fields having similar characteristics. We
looked at the NAR, NBR, CDE and STS fields.

Each of these field types has an associated mnemonic code. The mnemonic codes, like the field types, are
predefined in Synon. Here are samples of the field types and mnemonics:

Field Type Abbreviation Mnemonic

Status STS ST
Code CDE CD
Number NBR NB
Quantity QTY QT

1 - 27
Synon Made Simple Data Modeling

Synon determines the type of field and uses the corresponding mnemonic as the last two characters of the
generated field name.

To determine the first two characters of the field name, Synon uses an internal file containing the field types as
the key, and a field containing the next two characters to be used in the naming algorithm.

Let's take a look at the Company ID field, listed above.

Synon initializes each field type with a prefix of AA. The first field defined for each field type will begin with
AA.

The Mnemonic code for the CDE field type is CD. The Company ID field is made up of the field prefix AB
and the mnemonic CD, the field ABCD is generated. Synon, then, increments the file containing the next available
prefix to AC. When the next CDE field is defined, the prefix is incremented to AD, until it reaches all 1296 possible
combinations within a single field type.

You can change the Synon generated algorithm to allow more than 10,000 names per field type. We will
discuss how to do this in the Synon Made Simple - Power Tools book.

Field Length

The last item we will point out on this screen is the length of each field displayed. Here we see the Company
ID and Company name fields have respective lengths of 6 and 25. These field lengths are default lengths for the CDE
and TXT field types.

Op: GWS TRN3PCS1 2/07/96 19:36


EDIT FILE ENTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Company Master

? Field Type Ocr Et Ksq GEN name Length Rename

_ Company ID CDE K 1 ABCD 6


Z Company Name TXT A ABTX 25

SEL: Z-Details, R-Replace field, U-Usage, M-Mapped field parameters, L-Lock


F3=Exit

The Synon Data Modeling facility is very dynamic. Whenever an attribute of a field is changed, that change is
reflected right away. Let's demonstrate this.

>>> Zoom into the Company Name field. Place a 'Z' in the subfile selection field. Press ENTER.

1 - 28
Synon Made Simple Data Modeling

>>> Change the length of the internal field length from 25 to 15. Press ENTER, then Press ENTER, again.

Op: GWS TRN3PCS1 2/07/96 19:37


EDIT FIELD DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Company Name Document'n seq. . :
Type . . . . . . . : TXT Field usage: A
Internal length. . : 25 Data type : A GEN name: ABTX____
K'bd shift: _ Lowercase : Y
Headings. . . . . . :- Old DDS name: ________
Text . . . . . . . . : Company Name___________________________________
Left hand side text. : Company Name___________________________________
Right hand side text : Text______________________________________
Column headings. . . : Company Name______________
__________________________
__________________________
Control . . . . . . :-
Default condition : *NONE____________________

Check condition . : *NONE____________________


Valid system name. . : _ Mandatory fill . . . : _

F3=Exit no update F8=Change name/type F9=Conditions F10=Appearance F20=Narrative

The new field length is dynamically reflected on the Edit File Entries screen (and every place else it is found).

Op: GWS TRN3PCS1 2/07/96 19:37


EDIT FILE ENTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Company Master

? Field Type Ocr Et Ksq GEN name Length Rename

_ Company ID CDE K 1 ABCD 6


Z Company Name TXT A ABTX 15

SEL: Z-Details, R-Replace field, U-Usage, M-Mapped field parameters, L-Lock


F3=Exit

While we are here, let's also change the name of the field from Company Name to New Company Name.

>>> Place a 'Z' in the subfile selection field next to Company Name. Press ENTER.

1 - 29
Synon Made Simple Data Modeling

The field name is protected.

>>> Press F8 to change the field name to New Company Name.

Op: GWS TRN3PCS1 2/07/96 19:38


EDIT FIELD DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : New Company Name_________ Document'n seq. . :
Type . . . . . . . : TXT Ref: TXT___________________________ Field usage: A
Internal length. . : 15 Data type : A GEN name: ABTX
K'bd shift: Lowercase : Y
Headings. . . . . . :- Old DDS name:
Text . . . . . . . . : Company Name
Left hand side text. : Company Name
Right hand side text : Text
Column headings. . . : Company Name

Control . . . . . . :-
Default condition : *NONE

Check condition . : *NONE


Valid system name. . : _ Mandatory fill . . . : _

F3=Exit no update F8=Change name/type F9=Conditions F10=Appearance F20=Narrative

>>> Press ENTER to record the changes. Notice the Text and Left hand side text fields have also changed.

Op: GWS TRN3PCS1 2/07/96 19:38


EDIT FIELD DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : New Company Name Document'n seq. . :
Type . . . . . . . : TXT Field usage: A
Internal length. . : 15 Data type : A GEN name: ABTX____
K'bd shift: _ Lowercase : Y
Headings. . . . . . :- Old DDS name: ________
Text . . . . . . . . : New Company Name________________________________
Left hand side text. : New Company Name______________________________
Right hand side text : Text__________________________________________
Column headings. . . : New Company______________
Name_____________________
_________________________
Control . . . . . . :-
Default condition : *NONE_____________________

Check condition . : *NONE_____________________


Valid system name. . : _ Mandatory fill . . . : _

F3=Exit no update F8=Change name/type F9=Conditions F10=Appearance F20=Narrative

1 - 30
Synon Made Simple Data Modeling

>>> Press F3 twice to return to the Edit Database Relations Screen.

Whoops!!! We forgot to change the field back to the original name and size. We can make the change from
here.

>>> Place a 'Z2' in the subfile selection field on the 'Company Master Has New Company Name' relation.
Press ENTER.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:38


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ _________________________ Rel lvl: ___ ___ _________________________
? Typ Object Relation Seq Typ Referenced object
_ FIL Company Master___________ Known by____ FLD Company ID_______________
Z2 FIL Company Master___________ Has_________ FLD New Company Name_________
_ FIL Department Master________ Known by____ FLD Department ID____________
_ FIL Department Master________ Has_________ FLD Department name__________
_ FIL Job Master_______________ Known by____ FLD Job ID___________________
_ FIL Job Master_______________ Has_________ FLD Job Description__________
_ FIL Job Master_______________ Has_________ FLD Salary/Hourly Code_______
_ FIL Job Master_______________ Has_________ FLD Pay Rate-Low_____________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-Mid_____________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-High____________
_ _________________________ ____________ _________________________
_ _________________________ ____________ _________________________
_ _________________________ ____________ _________________________
_ _________________________ ____________ _________________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options

F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

>>> Change the field length from 15 back to 25. Press ENTER. Now Press F8, change the field name from New
Company Name to Company Name. Press ENTER to record the change. Press ENTER, again, to return to the
Edit Database Relations screen.

Op: GWS TRN3PCS1 2/07/96 19:39


EDIT FIELD DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Company Name Document'n seq. . :
Type . . . . . . . : TXT Field usage: A
Internal length. . : 25 Data type : A GEN name: ABTX____
K'bd shift: _ Lowercase : Y
Headings. . . . . . :- Old DDS name:_________
Text . . . . . . . . : Company Name ___________________________________
Left hand side text. : Company Name ___________________________________
Right hand side text : Text________________________________________
Column headings. . . : Company Name______________________
__________________________________
__________________________________
Control . . . . . . :-
Default condition : *NONE_____________________

Check condition . : *NONE_____________________


Valid system name. . : _ Mandatory fill . . . : _

F3=Exit no update F8=Change name/type F9=Conditions F10=Appearance F20=Narrative

1 - 31
Synon Made Simple Data Modeling

Let's look at the details of the Job Master file.

>>> Place an 'E' in the subfile select field for any data relation for the Job Master file. Press ENTER.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:39


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ _________________________ Rel lvl:___ ___ ________________________
? Typ Object Relation Seq Typ Referenced object
__ FIL Company Master___________ Known by___ FLD Company ID______________
__ FIL Company Master___________ Has________ FLD New Company Name________
__ FIL Department Master________ Known by___ FLD Department ID___________
__ FIL Department Master________ Has________ FLD Department name_________
E_ FIL Job Master_______________ Known by___ FLD Job ID__________________
__ FIL Job Master_______________ Has________ FLD Job Description_________
__ FIL Job Master_______________ Has________ FLD Salary/Hourly Code______
__ FIL Job Master_______________ Has________ FLD Pay Rate-Low____________
__ FIL Job Master_______________ Has________ FLD Pay Rate-Mid____________
__ FIL Job Master_______________ Has________ FLD Pay Rate-High___________
__ _________________________ ___________ ________________________
__ _________________________ ___________ ________________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

Notice the same information is being displayed as before. However, Pay Rate-Mid and Pay Rate-High have
the REFerence attribute. To see the field these fields are referencing, place a 'Z' in the subfile selection field and ZOOM
into the details.

Op: GWS TRN3PCS1 2/07/96 19:39


EDIT FILE ENTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Job Master

? Field Type Ocr Et Ksq GEN name Length Rename

_ Job ID CDE K 1 ADCD 6


_ Job Description TXT A ADTX 25
_ Salary/Hourly Code STS A ABST 1
_ Pay Rate-Low PRC A AAPR 7.2
_ Pay Rate-High PRC REF A ABPR 7.2
_ Pay Rate-Mid PRC REF A ACPR 7.2

SEL: Z-Details, R-Replace field, U-Usage, M-Mapped field parameters, L-Lock


F3=Exit

>>> Press F3 to return to Edit database relations screen.

1 - 32
Synon Made Simple Data Modeling

Selecting A Specific File

The Edit Database relations screen may have several files displayed at a single time.

>>> To select a specific file, place an 'S' next to the file. Press ENTER.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:39


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ _________________________ Rel lvl: ___ ___ _______________________
? Typ Object Relation Seq Typ Referenced object
_ FIL Company Master___________ Known by____ FLD Company ID_____________
_ FIL Company Master___________ Has_________ FLD Company Name ________
_ FIL Department Master________ Known by____ FLD Department ID__________
_ FIL Department Master________ Has_________ FLD Department name________
S FIL Job Master_______________ Known by____ FLD Job ID_________________
_ FIL Job Master_______________ Has_________ FLD Job Description________
_ FIL Job Master_______________ Has_________ FLD Salary/Hourly Code_____
_ FIL Job Master_______________ Has_________ FLD Pay Rate-Low___________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-Mid___________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-High__________
_ ________________________ ____________ _______________________
_ ________________________ ____________ _______________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

The name of the file selected will appear in the Object (file) positioning field.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:40


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ Job Master * Rel lvl: ___ ___ ________________________
? Typ Object Relation Seq Typ Referenced object
_ FIL Job Master_______________ Known by____ FLD Job ID__________________
_ FIL Job Master_______________ Has_________ FLD Job Description_________
_ FIL Job Master_______________ Has_________ FLD Salary/Hourly Code______
_ FIL Job Master_______________ Has_________ FLD Pay Rate-Low____________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-High___________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-Mid____________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

>>> To redisplay all of the files once again, blank out 'Job Master *' from the positioner field. Press ENTER.
The files will be redisplayed in alphabetical order.

1 - 33
Synon Made Simple Data Modeling

Synon Access Paths

We have described the Company, Department, and Job Master files. Let's look at the various files supporting
the Company Master entity.

>>> Place a 'Z' in the subfile selection field next to Company Master to ZOOM into the details of the file. Press
ENTER.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:40


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ _________________________ Rel lvl: ___ ___ ________________________
? Typ Object Relation Seq Typ Referenced object_______
Z FIL Company Master___________ Known by____ FLD Company ID______________
_ FIL Company Master___________ Has_________ FLD Company Name____________
_ FIL Department Master________ Known by____ FLD Department ID___________
_ FIL Department Master________ Has_________ FLD Department name_________
_ FIL Job Master_______________ Known by____ FLD Job ID__________________
_ FIL Job Master_______________ Has_________ FLD Job Description_________
_ FIL Job Master_______________ Has_________ FLD Salary/Hourly Code______
_ FIL Job Master_______________ Has_________ FLD Pay Rate-Low____________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-High___________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-Mid____________
_ _____________________________________ ________________________
_ _____________________________________ ________________________
Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

The Edit File Details screen contains several valuable pieces of information. It shows the Name of the file, the
attribute (or type) of file (Reference or Capture).

Op: GWS TRN3PCS1 2/07/96 19:40


EDIT FILE DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Company Master
Attribute . . . . . . . . : REF Field reference file. : *NONE
Documentation sequence. . : Source library. . . . : SYN50GEN
GEN format prefix . . . . : AB Distributed . . . . . : N (Y,N)
Assimilated physical. . . :
Record not found message. : Company Master NF Msgid. : USR0001
Record exists message . . : Company Master EX Msgid. : USR0002

? Typ Access path Source mbr Key Index options Auto add
_ PHY Physical file UUABREP NONE ATR ONLY
_ UPD Update index UUABREL0 UNIQUE IMMED ATR ONLY
_ RTV Retrieval index UUABREL1 UNIQUE IMMED ATR ONLY
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________

SEL: Z-Details, G/J-Generate, E-STRSEU, D-Delete, L-Locks, O-Overrides


H-Hold/Release, T-Trim, V-Virtualize, U-Usage, F-Func refs., N-Narrative
F3=Exit F5=Reload F7=Functions F8=Change name F17=Services F20=Narrative

This screen shows the name of the Source library containing the Data description specifications for this file.
This screen contains the two character RPG format prefix characters which are concatenated with the four letter field
name. For example, if the field we're working with is ACTX, if it is joined with this file, the Company Master file,
whose prefix is AB, the name of the field associated with this file would be ABACTX.

1 - 34
Synon Made Simple Data Modeling

Messages

Whenever a file is created in Synon, two error messages are automatically created. These messages are used if
a requested record is not found, or if a record, attempting to be added, already exists. Synon also determines the
associated Message IDs.

Access Paths Types

Three access paths (the Physical, the Update and the Retrieval) are automatically created whenever a file is
specified in Synon. An access path defines a view of the data which specifies 1) the order in which the records are read
2) the criteria used for selecting and/or omitting records and 3) which fields from the file are included in the specified
view.

Access Path Characteristics

Physical Access Path

The Physical (PHY) access path is the access path that contains the physical records and fields in a file. Only
one Physical access path exists per file. Records in the Physical access path are Non-keyed and are arranged in Arrival
Sequence. Records from the Physical Access Path are read or updated with one of the associated logical files (such as
the Retrieval or Update access paths).

Update Access Path

The Update (UPD) access path is one of the default access paths created by Synon. The update access path is a
keyed access path. The keys of the Update access path are unique and will always be the same as the Primary key(s)
defined in the Data Model. This access path, by default, contains all of the data fields specified in the data model. It
contains no virtual fields (more on virtual fields, later). However, multiple Update access paths may be specified
containing only a selected subset of fields. It is one of two access paths used in a Synon maintenance program. The
update access path is used to lock a record when it is being updated or changed in a file.

Retrieval Access Path

The Retrieval Access path (RTV) is one of the default access paths created by Synon. The Retrieval access
path is a keyed access path. The key(s) of the Retrieval access path are unique and will always be the same of the
Primary key(s) specified on the file (over which the Retrieval access path) is based in the Data Model. Unlike the
Update access path, the retrieval access path contains both virtual and data fields. This access path, by default, contains
all of the fields (both virtual and data) specified for this file in the data model. However, multiple Retrieval access paths
may be specified containing only a specified subset of fields. The Retrieval access path may contain one or more sets of
selection criteria.

1 - 35
Synon Made Simple Data Modeling

Let's take a look at each of the Access Path types we have defined in a bit more detail.

>>> Place a 'Z' next to the Physical (PHY) Access Path and Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:40


EDIT FILE DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Company Master
Attribute . . . . . . . . : REF Field reference file. : *NONE
Documentation sequence. . : Source library. . . . : SYN50GEN
GEN format prefix . . . . : AB Distributed . . . . . : N (Y,N)
Assimilated physical. . . :
Record not found message. : Company Master NF Msgid. : USR0001
Record exists message . . : Company Master EX Msgid. : USR0002

? Typ Access path Source mbr Key Index options Auto add
Z PHY Physical file UUABREP NONE ATR ONLY
_ UPD Update index UUABREL0 UNIQUE IMMED ATR ONLY
_ RTV Retrieval index UUABREL1 UNIQUE IMMED ATR ONLY
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________
SEL: Z-Details, G/J-Generate, E-STRSEU, D-Delete, L-Locks, O-Overrides
H-Hold/Release, T-Trim, V-Virtualize, U-Usage, F-Func refs., N-Narrative
F3=Exit F5=Reload F7=Functions F8=Change name F17=Services F20=Narrative

The Edit Access Path Details Screen appears. It contains information related to the Record format. Let's Zoom
into the details of the format and see more detailed information about the Access path format entries.

>>> Place a 'Z' in the subfile selection field. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:41


EDIT ACCESS PATH DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Company Master Attribute . : REF
Access path name. . . . . : Physical file Type. . . . : PHY

Generation mode . . . : M (M-MDLVAL, D-DDS, S-SQL, X-UNX)


Source member name . . : UUABREP___
Source member text . . : Company Master Physical file________

Format GEN Format text


? Seq name pfx (Based on file)
Z 1 FABREAB___ AB Company Master__________

SEL: Z-Access path format entries.


F3=Exit F8=Change name F20=Narrative.

1 - 36
Synon Made Simple Data Modeling

The Edit Access Path Format Entries screen is displayed. It contains all of the fields associated with this
file. You will notice it contains much of the same information displayed on the Edit File Entries screen. Let's take a
closer look at the details for the field Company ID. Since the PHY access path does not contain any keys, Company ID
(the primary key in the data model) is specified as an attribute (non-keyed) field.

>>> Place a 'Z' in the subfile selection field next to Company ID. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:44


EDIT ACCESS PATH FORMAT ENTRIES Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Company Master Attribute . : REF
Access path name. . . . . : Physical file Type. . . . : PHY
Format text . . . . . . . : Company Master
Based on. . . . . . . . . : Company Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
Z Company ID CDE ABCD A 1
_ Company Name TXT ABTX A 1

SEL: Z-Field details, L-Locks.


F3=Exit

1 - 37
Synon Made Simple Data Modeling

The Edit Field Details screen, once again, is displayed. This screen shows the detailed information and
defaults associated with a data field. Changes made on this screen will be reflected throughout the entire data model.

>>> Press F3 until you return to the Edit File Details panel.

Op: GWS TRN3PCS1 2/07/96 19:45


EDIT FIELD DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Company ID Document'n seq. . :
Type . . . . . . . : CDE Field usage: C
Internal length. . : 6 Data type : A GEN name: ABCD________
K'bd shift: _ Lowercase : -
Headings. . . . . . :- Old DDS name: ____________
Text . . . . . . . . : Company ID__________________________________________
Left hand side text. : Company ID______________________________________
Right hand side text : Code____________________________________________
Column headings. . . : Company_______________________________
ID____________________________________
______________________________________
Control . . . . . . :-
Default condition : *NONE____________________________

Check condition . : *NONE____________________________


Valid system name. . : _ Mandatory fill . . . : _

F3=Exit no update F8=Change name/type F9=Conditions F10=Appearance F20=Narrative

Now let's look at the details of the Update access path.

>>> Place a 'Z' in to the subfile selection field next to Update access path (UPD).
Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:45


EDIT FILE DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Company Master
Attribute . . . . . . . . : REF Field reference file. : *NONE
Documentation sequence. . : Source library. . . . : SYN50GEN
GEN format prefix . . . . : AB Distributed . . . . . : N (Y,N)
Assimilated physical. . . :
Record not found message. : Company Master NF Msgid. : USR0001
Record exists message . . : Company Master EX Msgid. : USR0002

? Typ Access path Source mbr Key Index options Auto add
_ PHY Physical file UUABREP NONE ATR ONLY
Z UPD Update index UUABREL0 UNIQUE IMMED ATR ONLY
_ RTV Retrieval index UUABREL1 UNIQUE IMMED ATR ONLY
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________

SEL: Z-Details, G/J-Generate, E-STRSEU, D-Delete, L-Locks, O-Overrides


H-Hold/Release, T-Trim, V-Virtualize, U-Usage, F-Func refs., N-Narrative
F3=Exit F5=Reload F7=Functions F8=Change name F17=Services F20=Narrative

1 - 38
Synon Made Simple Data Modeling

The Edit Access Path Details screen appears with more information than presented for the PHY access path.
This panel will display information about the file. It will show if the Key structure is unique, how the file is maintained
(Immediate, Delay, or Rebuild) the record format name, etc.

>>> Place a 'Z' in the subfile selection field next to the format name. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:41


EDIT ACCESS PATH DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Company Master Attribute . : REF
Access path name. . . . . : Update index Type. . . . : UPD

Generation mode . . . : M (M-MDLVAL, D-DDS, S-SQL, X-UNX)


Source member name . . : UUABREL0___
Source member text . . : Company Master Update index_________

Format GEN Format text


? Seq name pfx (Based on file)
Z 1 FABREAB___ AB Company Master__________

SEL: Z-Access path format entries.


F3=Exit F8=Change name F20=Narrative.

The fields found on the Update Access path are displayed on the Edit Access Path Format Entries screen.
Notice, the Company ID field is designated as a Key field.

>>> Press F3 until you return to the Edit File Details panel.

Op: GWS TRN3PCS1 2/07/96 19:46


EDIT ACCESS PATH FORMAT ENTRIES Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Company Master Attribute . : REF
Access path name. . . . . : Update index Type. . . . : UPD
Format text . . . . . . . : Company Master
Based on. . . . . . . . . : Company Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
_ Company ID CDE ABCD K 1 1
_ Company Name TXT ABTX A 1

SEL: Z-Field details, L-Locks.


F3=Exit F7=Relations

1 - 39
Synon Made Simple Data Modeling

>>> Place a 'Z' in the subfile selection field for the RTV Retrieval index. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:46


EDIT FILE DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Company Master
Attribute . . . . . . . . : REF Field reference file. : *NONE
Documentation sequence. . : Source library. . . . : SYN50GEN
GEN format prefix . . . . : AB Distributed . . . . . : N (Y,N)
Assimilated physical. . . :
Record not found message. : Company Master NF Msgid. : USR0001
Record exists message . . : Company Master EX Msgid. : USR0002

? Typ Access path Source mbr Key Index options Auto add
_ PHY Physical file UUABREP NONE ATR ONLY
_ UPD Update index UUABREL0 UNIQUE IMMED ATR ONLY
Z RTV Retrieval index UUABREL1 UNIQUE IMMED ATR ONLY
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________

SEL: Z-Details, G/J-Generate, E-STRSEU, D-Delete, L-Locks, O-Overrides


H-Hold/Release, T-Trim, V-Virtualize, U-Usage, F-Func refs., N-Narrative
F3=Exit F5=Reload F7=Functions F8=Change name F17=Services F20=Narrative

Many of the same options exist for the Retrieval Access Path and Update Access Path.

>>> Place a 'Z' in the subfile selection field next to the record format name. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:46


EDIT ACCESS PATH DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Company Master Attribute . : REF
Access path name. . . . . : Retrieval index Type. . . . : RTV
Unique or duplicate order : U (U-Unique,F-FIFO,L-LIFO,C-FCFO,' '-Undefined)
Index maintenance option : I (I-IMMED, D-DLY, R-REBLD)
Alternate collating table :
Allow select/omit . . . . : _(S-Static, D-Dynamic, ' '-None)
Generation mode . . . : M (M-MDLVAL, D-DDS, S-SQL, X-UNX)
Source member name . . : UUABREL1__
Source member text . . : Company Master Retrieval index________

Format GEN Format text Associated


? Seq name pfx (Based on file) Update access path
Z 1 FABREAD ___ AB Company Master____________ Update index

SEL: Z-Entries, R-Relations, S-Select/omit, A-Assoc.acps, T-Trim, V-Virtual


F3=Exit F8=Rename F20=Narrative

1 - 40
Synon Made Simple Data Modeling

All fields associated with this access path are displayed. Keyed and non-keyed fields are identified.

Op: GWS TRN3PCS1 2/07/96 19:46


EDIT ACCESS PATH FORMAT ENTRIES Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Company Master Attribute . : REF
Access path name. . . . . : Retrieval index Type. . . . : RTV
Format text . . . . . . . : Company Master
Based on. . . . . . . . . : Company Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
_ Company ID CDE ABCD K 1 1
_ Company Name TXT ABTX A 1

SEL: Z-Field details, L-Locks.


F3=Exit F7=Relations

>>> Press F3 until you return to the Edit Database Relations panel.

We are going to define another file, the Employee Master file. There is not enough room left on this screen to
completely define all of the relations.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:47


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ _________________________ Rel lvl: ___ ___ __________________________
? Typ Object Relation Seq Typ Referenced object_________
_ FIL Company Master___________ Known by____ FLD Company ID________________
_ FIL Company Master___________ Has_________ FLD Company Name______________
_ FIL Department Master________ Known by____ FLD Department ID_____________
_ FIL Department Master________ Has_________ FLD Department name___________
_ FIL Job Master_______________ Known by____ FLD Job ID____________________
_ FIL Job Master_______________ Has_________ FLD Job Description___________
_ FIL Job Master_______________ Has_________ FLD Salary/Hourly Code________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-Low______________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-High_____________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-Mid______________
_ _________________________ ____________ __________________________
_ _________________________ ____________ __________________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

1 - 41
Synon Made Simple Data Modeling

>>> Let's Roll up or Page Down (depending upon your keyboard) to get a blank screen.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:47


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ _________________________ Rel lvl:____ ___ ________________________
? Typ Object Relation Seq Typ Referenced object
__ _________________________ ____________ ________________________
__ _________________________ ____________ ________________________
__ _________________________ ____________ ________________________
__ _________________________ ____________ ________________________
__ _________________________ ____________ ________________________
__ _________________________ ____________ ________________________
__ _________________________ ____________ ________________________
__ _________________________ ____________ ________________________
__ _________________________ ____________ ________________________
__ _________________________ ____________ ________________________
__ _________________________ ____________ ________________________
__ _________________________ ____________ ________________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

1 - 42
Synon Made Simple Data Modeling

The first relation we will define will be the Owned By relation. The Owned by relation will bring the key(s) of
the owning file down to become the primary or superordinate key of the file being defined.

In our Example, the Employee Master file will be Owned by the Company file. If you did not know or had
forgotten the exact name of the Company file, you could place a '?' in the Referenced Object field and all of the files or
entities defined will be displayed.

>>> Key in 'Employee Master', ' Owned By' and '?' on the first relation line. Do not Press ENTER until all of
the remaining relations have been entered.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:48


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ _________________________ Rel lvl: ___ ___ __________________________
? Typ Object Relation Seq Typ Referenced object
_ Employee Master__________ Owned by ___ ?_________________________
_ Employee Master__________ k___________ Employee ID_______________
_ Employee Master__________ h___________ Employee Name_____________
_ Employee Master__________ h___________ Employee Address__________
_ Employee Master__________ h___________ Employee City_____________
_ Employee Master__________ h___________ Employee State____________
_ Employee Master__________ h___________ Employee Status___________
_ Employee Master__________ h___________ Employee Zip Code_________
_ Employee Master__________ h___________ Rate of Pay_______________
_ Employee Master__________ r___________ 99 Job master________________
_ Employee Master__________ r___________ 100 Department Master_________
_ Employee Master__________ h___________ Manager Status Code_______
_ _________________________ ____________ __________________________
_ _________________________ ____________ __________________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

>>> When you have completed the first relation, enter the relations displayed above.

You will notice we have taken a short cut when describing the relation. Simply enter the first character of the
relation (K for Known By, R for Refers To, H for Has and O for Owned by) and Synon does the rest. On the
Employee Master Refers to Job Master and Department Master a sequence number will be used. This sequence number
will position the fields at the end of the record.

>>> Press ENTER when you have completed this task.

1 - 43
Synon Made Simple Data Modeling

The '?' entered on the previous screen will prompt the Display Objects Screen to be displayed showing all of
the entities defined in the data model.

>>> Place an 'X' next to Company Master. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:51


DISPLAY OBJECTS Synon Made Simple-R5.1 GWS

? Type Description Attr


__________________________ ___ <== Position display
X FIL Company Master REF
_ FIL Department Master REF
_ FIL Job Master REF

SEL: X-Select value, N-Narrative.


F3=Exit, no selection

>>> Press F10 to Define the Employee Master file and its' associated fields.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:51


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ _________________________ Rel lvl: ___ ___ _________________________
? Typ Object Relation Seq Typ Referenced object
_ FIL Employee Master__________ Owned by____ FIL Company Master___________
_ FIL Employee Master__________ Known by____ FLD Employee ID______________
_ FIL Employee Master__________ Has_________ FLD Employee Name____________
_ FIL Employee Master__________ Has_________ FLD Employee Address_________
_ FIL Employee Master__________ Has_________ FLD Employee City____________
_ FIL Employee Master__________ Has_________ FLD Employee State___________
_ FIL Employee Master__________ Has_________ FLD Employee Status__________
_ FIL Employee Master__________ Has_________ FLD Employee Zip Code________
_ FIL Employee Master__________ Has_________ FLD Rate of Pay______________
_ FIL Employee Master__________ Refers to___ 99 FIL Job master_______________
_ FIL Employee Master__________ Refers to___ 100 FIL Department Master________
_ FIL Employee Master__________ Has_________ FLD Manager Status Code______

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys
'Employee Master' type FIL not found.

1 - 44
Synon Made Simple Data Modeling

>>> Enter the values as shown on the panel below. Notice that selected fields will be edited. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:51


DEFINE OBJECTS Synon Made Simple-R5.1 GWS

Object Object Object Referenced Field Edit


type name attr field usage field
FIL Employee Master__________ REF _
FLD Employee ID______________ CDE ________________________ CDE _
FLD Employee Name____________ TXT ________________________ ATR _
FLD Employee Address_________ TXT ________________________ ATR _
FLD Employee City____________ TXT ________________________ ATR _
FLD Employee State___________ CDE ________________________ ATR Y
FLD Employee Status__________ STS ________________________ ATR Y
FLD Employee Zip Code________ NBR ________________________ ATR Y
FLD Rate of Pay______________ PRC ________________________ ATR _
FLD Manager Status Code______ STS ________________________ ATR Y
___ _________________________ ___ ________________________ ___ _
___ _________________________ ___ ________________________ ___ _

F3=Exit

Employee State has been defined with a field type of CDE. The length of this field type is 6. However, the
correct size for this field is 2.

>>> Position the cursor on the Internal length field and change it from 6 to 2. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:53


EDIT FIELD DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Employee State Document'n seq. . :
Type . . . . . . . : CDE Field usage: A
Internal length. . : 6 Data type : A GEN name: AFCD_____
K'bd shift: _ Lowercase : _
Headings. . . . . . :- Old DDS name: _________
Text . . . . . . . . : Employee State_____________________________________
Left hand side text. : Employee State___________________________________
Right hand side text : Code_____________________________________________
Column headings. . . : Employee___________________
State______________________
___________________________
Control . . . . . . :-
Default condition : *NONE________________________

Check condition . : *NONE________________________


Valid system name. . : _ Mandatory fill . . . : _

F3=Exit no update F8=Change name/type F9=Conditions F10=Appearance F20=Narrative

>>> Press F3 to Exit.

1 - 45
Synon Made Simple Data Modeling

The Edit Field Details screen showing the Employee Status field will be displayed. We will add two conditions to this
field.

>>> Press F9 to add conditions.

Op: GWS TRN3PCS1 2/07/96 19:54


EDIT FIELD DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Employee Status Document'n seq. . :
Type . . . . . . . : STS Field usage: A
Internal length. . : 1 Data type : A GEN name: ACST____
K'bd shift: _ Lowercase : _
Headings. . . . . . :- Old DDS name: ________
Text . . . . . . . . : Employee Status___________________________________
Left hand side text. : Employee Status___________________________________
Right hand side text : Value_____________________________________
Column headings. . . : Employee____________________
Status______________________

Control . . . . . . :-
Default condition : *NONE_________________________

Check condition . : *NONE_________________________


Valid system name. . : _ Mandatory fill . . . : _ Translate cnd values: _

F3=Exit no update F8=Change name/type F9=Conditions F10=Appearance F20=Narrative

The first condition we will enter will be the Active Condition with a file value of 'A'.

>>> Enter 'Active' in the 'Enter condition' field, 'VAL' in the 'type' field. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:54


EDIT FIELD CONDITIONS Synon Made Simple-R5.1 GWS
Field name. . . . . : Employee Status Attr. : STS
Enter condition . . : Active ___________________ and type to add new condit
type . : VAL (Type: LST, VAL)

? Condition Type Op File/From value Display/To value

SEL: Z-Details, D-Delete, U-Where used, N-Narrative.


F3=Exit

1 - 46
Synon Made Simple Data Modeling

>>> Now enter 'A' in the Status value field. This value ('A') will be the actual value found in the data file.

Op: GWS TRN3PCS1 2/07/96 19:54


EDIT FIELD CONDITION DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Employee Status Attr. : STS Mode : *ADD
Length on file . . : 1

Condition. . . . . : Active___________________
Type . . . . . . . : VAL

File value Mnemonic


Status value . . . : A_____________________

F3=Exit

To enter the second condition, simply key over the condition just entered.

>>> Enter 'Terminated" in the Condition field, VAL in the Type field, 'T' in the Status value field. Press
ENTER. There are no more conditions to enter. Press F3 to Exit.

EDIT FIELD CONDITION DETAILS Synon Made Simple-R5.1 GWS


Field name . . . . : Employee Status Attr. : STS Mode : *ADD
Length on file . . : 1

Condition. . . . . : Terminated_______________
Type . . . . . . . : VAL

File value Mnemonic


Status value . . . : T_____________________

F3=Exit
Condition 'Active' added.

1 - 47
Synon Made Simple Data Modeling

>>> Press F3 To Exit.

Op: GWS TRN3PCS1 2/07/96 19:55


EDIT FIELD CONDITIONS Synon Made Simple-R5.1 GWS
Field name. . . . . : Employee Status Attr. : STS
Enter condition . . : _________________________ and type to add new condition
type . : ___ (Type: LST, VAL)

? Condition Type Op File/From value Display/To value


*ALL values LST **
Active VAL A A
Terminated VAL T T

SEL: Z-Details, D-Delete, U-Where used, N-Narrative.


F3=Exit

The last thing we need to do, is to specify the business rule that only the values for the conditions specified will
be allowed to be entered in this field.

>>> Enter '*ALL values' in the Check condition field. Press ENTER. Press F3.

Op: GWS TRN3PCS1 2/07/96 19:55


EDIT FIELD DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Employee Status Document'n seq. . :
Type . . . . . . . : STS Field usage: A
Internal length. . : 1 Data type : A GEN name: ACST____
K'bd shift: _ Lowercase : _
Headings. . . . . . :- Old DDS name: ________
Text . . . . . . . . : Employee Status__________________________________
Left hand side text. : Employee Status_________________________
Right hand side text : Value___________________________________
Column headings. . . : Employee_______________
Status_________________
_______________________
Control . . . . . . :-
Default condition : *NONE____________________

Check condition . : *all values______________


Valid system name. . : _ Mandatory fill . . . : _ Translate cnd values: _

F3=Exit no update F8=Change name/type F9=Conditions F10=Appearance F20=Narrative

1 - 48
Synon Made Simple Data Modeling

The next screen displayed will allow us to enter conditions for the field, Manager Status Code. We will want
to enter three conditions, Executive, Middle Management and Supervisor. When these conditions have been entered, we
will create a group to contain all three conditions called a List.

>>> Press F9 to Add Conditions

Op: GWS TRN3PCS1 2/07/96 19:56


EDIT FIELD DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Manager Status Code Document'n seq. . :
Type . . . . . . . : STS Field usage: A
Internal length. . : 1 Data type : A GEN name: ADST_______
K'bd shift: _ Lowercase : _
Headings. . . . . . :- Old DDS name: ___________
Text . . . . . . . . : Manager Status Code_____________________
Left hand side text. : Manager Status Code_____________________
Right hand side text : Value__________________________
Column headings. . . : Manager________________________
Status Code____________________
_______________________________
Control . . . . . . :-
Default condition : *NONE_____________________________

Check condition . : *NONE_____________________________


Valid system name. . : _ Mandatory fill . . . : _ Translate cnd values: _

F3=Exit no update F8=Change name/type F9=Conditions F10=Appearance F20=Narrative

1 - 49
Synon Made Simple Data Modeling

The first condition we will enter is Executive. The condition type is VALue.

>>> Enter 'Executive' in the Enter condition field and 'VAL' in the type field.
Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:56


EDIT FIELD CONDITIONS Synon Made Simple-R5.1 GWS
Field name. . . . . : Manager Status Code Attr. : STS
Enter condition . . : Executive ________________ and type to add new condit
type . : VAL (Type: LST, VAL)

? Condition Type Op File/From value Display/To value

SEL: Z-Details, D-Delete, U-Where used, N-Narrative.


F3=Exit

The condition will have a file or status value of E.

>>> Enter 'E' in the status value field. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:56


EDIT FIELD CONDITION DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Manager Status Code Attr. : STS Mode : *ADD
Length on file . . : 1

Condition. . . . . : Executive________________
Type . . . . . . . : VAL

File value Mnemonic


Status value . . . : E_____________________

F3=Exit

1 - 50
Synon Made Simple Data Modeling

The screen will display a message indicating the condition Executive has been added.

The next condition we will be adding is "Middle Management".

>>> Change the condition name from 'Executive' to 'Middle Management' and the status value from 'E' to 'M'.
Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:56


EDIT FIELD CONDITION DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Manager Status Code Attr. : STS Mode : *ADD
Length on file . . : 1

Condition. . . . . : Middle Management________


Type . . . . . . . : VAL

File value Mnemonic


Status value . . . : M_____________________

F3=Exit
Condition 'Executive' added.

Again, you will get a message indicating the condition "Middle Management" has been added.

The last condition we will enter is Supervisor.

>>> Change the condition name from 'Middle Management' to 'Supervisor'. Change the value of the status
value field from 'M' to 'S'. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:57


EDIT FIELD CONDITION DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Manager Status Code Attr. : STS Mode : *ADD
Length on file . . : 1

Condition. . . . . : Supervisor_______________
Type . . . . . . . : VAL

File value Mnemonic


Status value . . . : S_____________________

F3=Exit
Condition 'Middle Management' added.

1 - 51
Synon Made Simple Data Modeling

The message "Condition Supervisor added" appears.

>>> Press F3 to return to the Edit Field Conditions Screen.

Op: GWS TRN3PCS1 2/07/96 19:57


EDIT FIELD CONDITION DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Manager Status Code Attr. : STS Mode : *ADD
Length on file . . : 1

Condition. . . . . : Supervisor_______________
Type . . . . . . . : VAL

File value Mnemonic


Status value . . . : S_____________________

F3=Exit
Condition 'Supervisor' added.

We want to create a group or list of values called Managers.

>>> Enter 'Managers' in the Enter conditions field and 'LST' in the type field. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:57


EDIT FIELD CONDITIONS Synon Made Simple-R5.1 GWS
Field name. . . . . : Manager Status Code Attr. : STS
Enter condition . . : Managers ________________ and type to add new condit
type . : LST (Type: LST, VAL)

? Condition Type Op File/From value Display/To value


_ *ALL values LST **
_ Executive VAL E E
_ Middle Management VAL M M
_ Supervisor VAL S S

SEL: Z-Details, D-Delete, U-Where used, N-Narrative.


F3=Exit

1 - 52
Synon Made Simple Data Modeling

The Edit List Condition screen is displayed. This screen shows all of the Value Conditions for the Manager
Status Code field.

>>> Place a '+' next to each condition to be included in the Managers List. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 19:58


EDIT LIST CONDITION Synon Made Simple-R5.1 GWS
Field name . . . . : Manager Status Code Attr. : STS
Condition name . . : Managers _________________ Condition No . :
Condition type . . : LST
Prompt function: (*CVD, *DDL)

File
? Condition value
+ Executive E
+ Middle Management M
+ Supervisor S

SEL: '+'-Add value, '-'-Remove value.


F3=Exit F8=Change name F20=Narrative

You will notice each condition selected will be highlighted and marked with an '*'.

>>> Press F3.

Op: GWS TRN3PCS1 2/07/96 19:58


EDIT LIST CONDITION Synon Made Simple-R5.1 GWS
Field name . . . . : Manager Status Code Attr. : STS
Condition name . . : Managers__________________ Condition No . :
Condition type . . : LST
Prompt function: Condition Value Displayer (*CVD, *DDL)

File
? Condition value
_ * Executive E
_ * Middle Management M
_ * Supervisor S

SEL: '+'-Add value, '-'-Remove value.


F3=Exit F8=Change name F20=Narrative

1 - 53
Synon Made Simple Data Modeling

The list 'Managers' has been added to the list of conditions and lists.

Op: GWS TRN3PCS1 2/07/96 19:59


EDIT FIELD CONDITIONS Synon Made Simple-R5.1 GWS
Field name. . . . . : Manager Status Code Attr. : STS
Enter condition . . : __________________________ and type to add new condit
type . : ___ (Type: LST, VAL)

? Condition Type Op File/From value Display/To value


_ *ALL values LST **
_ Managers LST
_ Executive VAL E E
_ Middle Management VAL M M
_ Supervisor VAL S S

SEL: Z-Details, D-Delete, U-Where used, N-Narrative.


F3=Exit

>>> Press F3. On the Edit Field Details panel, change the Check condition value from '*NONE' to 'Managers'.

This will ensure that whenever a value is entered into the Manager Status Code field, the value entered must be
one of the conditions found in the Managers list.

Op: GWS TRN3PCS1 2/07/96 19:59


EDIT FIELD DETAILS Synon Made Simple-R5.1 GWS
Field name . . . . : Manager Status Code Document'n seq. . :
Type . . . . . . . : STS Field usage: A
Internal length. . : 1 Data type : A GEN name: ADST______
K'bd shift: _ Lowercase : _
Headings. . . . . . :- Old DDS name: __________
Text . . . . . . . . : Manager Status Code_______________________________
Left hand side text. : Manager Status Code___________________________
Right hand side text : Value_________________________________________
Column headings. . . : Manager________________________
Status Code____________________
_______________________________
Control . . . . . . :-
Default condition : *NONE___________________________

Check condition . : Managers________________________


Valid system name. . : _ Mandatory fill . . . : _ Translate cnd values: _

F3=Exit no update F8=Change name/type F9=Conditions F10=Appearance F20=Narrative

>>> Press ENTER twice to confirm.

1 - 54
Synon Made Simple Data Modeling

Involution

The next data relation example we will look at is somewhat complex. There is a lot of basic employee
information found in the Employee Master file. A new requirement for data just arrived. The Employee ID and Name
of each supervisor must appear in each employees' record.

Synon does not allow duplicate relations within an entity. How do you specify such an unusual relation?
Occasionally, there is the need for a file to refer to itself. This type of relation is called INVOLUTION.

Before we begin this topic, we need to select the Employee Master file.

>>> Place an 'S' next to any relation on the Employee Master File. Press ENTER.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 19:59


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ _________________________ Rel lvl: ___ ___ ___________________________
? Typ Object Relation Seq Typ Referenced object__________
S FIL Employee Master__________ Owned by____ FIL Company Master_____________
_ FIL Employee Master__________ Known by____ FLD Employee ID________________
_ FIL Employee Master__________ Has_________ FLD Employee Name______________
_ FIL Employee Master__________ Has_________ FLD Employee Address___________
_ FIL Employee Master__________ Has_________ FLD Employee City______________
_ FIL Employee Master__________ Has_________ FLD Employee State_____________
_ FIL Employee Master__________ Has_________ FLD Employee Status____________
_ FIL Employee Master__________ Has_________ FLD Employee Zip Code__________
_ FIL Employee Master__________ Has_________ FLD Rate of Pay________________
_ FIL Employee Master__________ Refers to___ 99 FIL Job master_________________
_ FIL Employee Master__________ Refers to___ 100 FIL Department Master__________
_ FIL Employee Master__________ Has_________ FLD Manager Status Code________
_ _____________________________________ ___________________________
_ _____________________________________ ___________________________
Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

1 - 55
Synon Made Simple Data Modeling

>>> Enter the following relation:

Employee Master R 999 Employee Master

Place a '+' in the subfile selection field and Press F6.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 20:10


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ Employee Master * Rel lvl: ___ ___ ________________________
? Typ Object Relation Seq Typ Referenced object
_ FIL Employee Master_________ Owned by____ FIL Company Master__________
_ FIL Employee Master_________ Known by____ FLD Employee ID_____________
_ FIL Employee Master_________ Has_________ FLD Employee Name___________
_ FIL Employee Master_________ Has_________ FLD Employee Address________
_ FIL Employee Master_________ Has_________ FLD Employee City___________
_ FIL Employee Master_________ Has_________ FLD Employee State__________
_ FIL Employee Master_________ Has_________ FLD Employee Status_________
_ FIL Employee Master_________ Has_________ FLD Employee Zip Code_______
_ FIL Employee Master_________ Has_________ FLD Rate of Pay_____________
_ FIL Employee Master_________ Has_________ FLD Manager Status Code_____
_ FIL Employee Master_________ Refers to___ 99 FIL Job Master______________
_ FIL Employee Master_________ Refers to___ 100 FIL Department Master_______
_ FIL Employee Master_________ Refers to___ 999 FIL Employee Master_________
_ For: Manager _________________ Sharing: *ALL______________________
_ ________________________ ____________ ___________________________
_
Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

An additional line , called Extended Text, is displayed. To make this field unique, a prefix must be entered.

>>> Enter 'Manager' in the For (text) field. Press ENTER.

1 - 56
Synon Made Simple Data Modeling

>>> Now, blank out the positioning field containing Employee Master and Press ENTER. The following screen
appears.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 20:11


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ _________________________ Rel lvl: ___ ___ ________________________
? Typ Object Relation Seq Typ Referenced object_______
_ FIL Company Master___________ Known by ___ FLD Company ID______________
_ FIL Company Master___________ Has_________ FLD Company Name____________
_ FIL Department Master________ Known by____ FLD Department ID___________
_ FIL Department Master________ Has_________ FLD Department name_________
_ FIL Employee Master__________ Owned by____ FIL Company Master__________
_ FIL Employee Master__________ Known by____ FLD Employee ID_____________
_ FIL Employee Master__________ Has_________ FLD Employee Name___________
_ FIL Employee Master__________ Has_________ FLD Employee Address________
_ FIL Employee Master__________ Has_________ FLD Employee City___________
_ FIL Employee Master__________ Has_________ FLD Employee State__________
_ FIL Employee Master__________ Has_________ FLD Employee Status_________
_ FIL Employee Master__________ Has_________ FLD Employee Zip Code_______
_ FIL Employee Master__________ Has_________ FLD Rate of Pay_____________
_ FIL Employee Master__________ Has_________ FLD Manager Status Code_____
_ FIL Employee Master__________ Refers to___ 99 FIL Job Master______________

More
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

>>> Page Down or Roll Up.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 20:11


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ ________________________ Rel lvl: ___ ___ ________________________
? Typ Object Relation Seq Typ Referenced object_______
_ FIL Employee Master_________ Refers to___ 100 FIL Department Master_______
_ FIL Employee Master_________ Refers to___ 999 FIL Employee Master_________
_ For: Manager__________________ Sharing: *ALL______________________
_ FIL Job Master______________ Known by____ FLD Job ID__________________
_ FIL Job Master______________ Has_________ FLD Job Description_________
_ FIL Job Master______________ Has_________ FLD Salary/Hourly Code______
_ FIL Job Master______________ Has_________ FLD Pay Rate-Low____________

_ FIL Job Master______________ Has_________ FLD Pay Rate-High___________


_ FIL Job Master______________ Has_________ FLD Pay Rate-Mid____________
_ ________________________ ____________ ________________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

1 - 57
Synon Made Simple Data Modeling

Now let's select the Employee Master file.

>>> Place an 'S' next to any data relationship for Employee Master and Press ENTER.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 20:11


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ _________________________ Rel lvl: ___ ___ ________________________
? Typ Object Relation Seq Typ Referenced object_______
S FIL Employee Master__________ Refers to___ 100 FIL Department Master_______
_ FIL Employee Master__________ Refers to___ 999 FIL Employee Master_________
For: Manager _________________ Sharing: *ALL______________________
_ FIL Job Master_______________ Known by____ FLD Job ID__________________
_ FIL Job Master_______________ Has_________ FLD Job Description_________
_ FIL Job Master_______________ Has_________ FLD Salary/Hourly Code______
_ FIL Job Master_______________ Has_________ FLD Pay Rate-Low____________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-High___________
_ FIL Job Master_______________ Has_________ FLD Pay Rate-Mid____________
_ _________________________ ____________ ________________________
_ _________________________ ____________ ________________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

Let's look at the file entries to see how Synon resolved the Involution.

>>> Place an 'E' in the subfile selection field next to Employee Master and Press ENTER.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 20:12


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ Employee Master * Rel lvl: ___ ___ _________________________
? Typ Object Relation Seq Typ Referenced object
E_ FIL Employee Master__________ Owned by____ FIL Company Master___________
__ FIL Employee Master__________ Known by____ FLD Employee ID______________
__ FIL Employee Master__________ Has_________ FLD Employee Name____________
__ FIL Employee Master__________ Has_________ FLD Employee Address_________
__ FIL Employee Master__________ Has_________ FLD Employee City____________
__ FIL Employee Master__________ Has_________ FLD Employee State___________
__ FIL Employee Master__________ Has_________ FLD Employee Status__________
__ FIL Employee Master__________ Has_________ FLD Employee Zip Code________
__ FIL Employee Master__________ Has_________ FLD Rate of Pay______________
__ FIL Employee Master__________ Has_________ FLD Manager Status Code______
__ FIL Employee Master__________ Refers to___ 99 FIL Job Master_______________
__ FIL Employee Master__________ Refers to___ 100 FIL Department Master________
__ FIL Employee Master__________ Refers to___ 999 FIL Employee Master__________
For: Manager__________________ Sharing: *ALL_______________________
__ ________________________ ____________ _________________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

1 - 58
Synon Made Simple Data Modeling

Notice, Synon resolved the Employee Refers To Employee relation by using the information supplied on the
extended relation field, "For:" Manager. Manager was the prefix specified to make the field unique.

Op: GWS TRN3PCS1 2/07/96 20:12


EDIT FILE ENTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Employee Master

? Field Type Ocr Et Ksq GEN name Length Rename

_ Company ID CDE K 1 ABCD 6


_ Employee ID CDE K 2 AECD 6
_ Employee Name TXT A AETX 25
_ Employee Address TXT A AFTX 25
_ Employee City TXT A AGTX 25
_ Employee State CDE A AFCD 2
_ Employee Status STS A ACST 1
_ Employee Zip Code NBR A ABNB 5.0
_ Rate of Pay PRC A ADPR 7.2
_ Manager Status Code STS A ADST 1
_ Job ID CDE A ADCD 6
_ Department ID CDE A ACCD 6
_ Manager Employee ID CDE REF A AKCD 6

SEL: Z-Details, R-Replace field, U-Usage, M-Mapped field parameters, L-Lock


F3=Exit

If the extended relation had not been used, Synon would have resolved the relation by creating a new field
"Employee ID 93950". The field is a combination of the field name and a unique 5 digit surrogate number. (Ugly, isn't
it ??)

>>> Press F3 to Exit

1 - 59
Synon Made Simple Data Modeling

Virtual Fields

Whenever a file to file relationship (Refers to or Owned by) exists between File A and File B, Synon allows
you to specify data from File B to logically appear on File A. These fields are known as a Virtual Fields. The concept
of a virtual field is that a Field is physically present in only one place, but can be logically present in many places.
Virtual fields are "read only" fields, and cannot be updated.

The Advantages of a virtual field are they are always up-to-date or current because the field is maintained in a
single place, it takes up less disk storage.

However, the disadvantages of virtual fields may outweigh its advantages. A virtual field is implemented as a
Join Logical file. A join logical file may, depending upon the size of the file, cause performance degradation. If a field
is added to a file containing a virtual field, all associated Joined files and all associated programs (from each of the
joined files) must be recompiled. The amount of work involved in maintaining virtual fields can be tremendous. Unless
a shop is very well managed and disciplined and has a full time database administrator constantly monitoring the Synon
model, I discourage the use of virtual fields. If used correctly, virtual fields are very powerful and can save much time
as you develop application functions. Let's take a closer look at this controversial topic.

Implementing Virtual Fields

A virtual field may only appear on a File to File relation, such as an Owned By or Refers To relation.

Suppose we would like to have information from the Department Master, Job Master, and Employee Master
(supervisor information) appear on the Employee Master Record.

>>> Place a 'V' in the subfile selection field on the Employee Master Refers To Job Master data relation. Press
ENTER.

Op: GWS TRN3PCS1 2/07/96 20:12


EDIT FILE ENTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Employee Master

? Field Type Ocr Et Ksq GEN name Length Rename

_ Company ID CDE K 1 ABCD 6


_ Employee ID CDE K 2 AECD 6
_ Employee Name TXT A AETX 25
_ Employee Address TXT A AFTX 25
_ Employee City TXT A AGTX 25
_ Employee State CDE A AFCD 2
_ Employee Status STS A ACST 1
_ Employee Zip Code NBR A ABNB 5.0
_ Rate of Pay PRC A ADPR 7.2
_ Manager Status Code STS A ADST 1
_ Job ID CDE A ADCD 6
_ Department ID CDE A ACCD 6
_ Manager Employee ID CDE REF A AKCD 6

SEL: Z-Details, R-Replace field, U-Usage, M-Mapped field parameters, L-Lock


F3=Exit

The Edit Virtual Fields Entries screen is displayed showing all of the fields existing on the file specified on
the file to file relation. In our case, the Job Master file.

1 - 60
Synon Made Simple Data Modeling

>>> Place a '+' next to each field that is to appear on the Referring file (Employee Master) and Press ENTER. In
our case, we will select the job description field to appear on the Employee Master file.

Op: GWS TRN3PCS1 2/07/96 20:12


EDIT VIRTUAL FIELD EDITNTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Job Master

? V Field Type Ocr Etp Ksq GEN name Length Rename

Job ID CDE K 1 ADCD 6


+ Job Description TXT A ADTX 25
_ Salary/Hourly Code STS A ABST 1
_ Pay Rate-Low PRC A AAPR 7.2
_ Pay Rate-High REF A ABPR 7.2
_ Pay Rate-Mid REF A ACPR 7.2

SEL: '+' Add virtual field, '-' Remove virtual field.


F3=Exit

The fields selected to be virtualized will be highlighted and marked with a '*'. To remove a virtual field, place
a '-' next to the field and Press ENTER.

>>> Press F3 to return to the Edit Data Model Relations screen.

Op: GWS TRN3PCS1 2/07/96 20:12


EDIT VIRTUAL FIELD EDITNTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Job Master

? V Field Type Ocr Etp Ksq GEN name Length Rename

Job ID CDE K 1 ADCD 6


* Job Description TXT A ADTX 25
_ Salary/Hourly Code STS A ABST 1
_ Pay Rate-Low PRC A AAPR 7.2
_ Pay Rate-High REF A ABPR 7.2
_ Pay Rate-Mid REF A ACPR 7.2

SEL: '+' Add virtual field, '-' Remove virtual field.


F3=Exit

1 - 61
Synon Made Simple Data Modeling

We will virtualize the Department Name and Employee Name fields.

>>> Place a 'V' next to the File to File relation as shown below.
Press ENTER.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 20:13


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ Employee Master * Rel lvl: ___ ___ ________________________
? Typ Object Relation Seq Typ Referenced object_______
_ FIL Employee Master__________ Owned by____ FIL Company Master__________
_ FIL Employee Master__________ Known by____ FLD Employee ID_____________
_ FIL Employee Master__________ Has_________ FLD Employee Name___________
_ FIL Employee Master__________ Has_________ FLD Employee Address________
_ FIL Employee Master__________ Has_________ FLD Employee City___________
_ FIL Employee Master__________ Has_________ FLD Employee State__________
_ FIL Employee Master__________ Has_________ FLD Employee Status_________
_ FIL Employee Master__________ Has_________ FLD Employee Zip Code_______
_ FIL Employee Master__________ Has_________ FLD Rate of Pay_____________
_ FIL Employee Master__________ Has_________ FLD Manager Status Code_____
_ FIL Employee Master__________ Refers to___ 99 FIL Job Master______________
V FIL Employee Master__________ Refers to___ 100 FIL Department Master_______
_ FIL Employee Master__________ Refers to___ 999 FIL Employee Master_________
For: Manager__________________ Sharing: *ALL______________________
_ _________________________ ____________ ________________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

>>> Select the field(s) to be virtualized by putting a '+' in the subfile selection field. In our case, select the
Department name field. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 20:13


EDIT VIRTUAL FIELD EDITNTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Department Master

? V Field Type Ocr Etp Ksq GEN name Length Rename

Department ID CDE K 1 ACCD 6


+ Department name TXT A ACTX 25

SEL: '+' Add virtual field, '-' Remove virtual field.


F3=Exit

1 - 62
Synon Made Simple Data Modeling

The field(s) selected will be highlighted. An asterisk (*) will appear next to the field indicating it has been
selected for virtualization.

>>> Press F3 to exit.

Op: GWS TRN3PCS1 2/07/96 20:13


EDIT VIRTUAL FIELD EDITNTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Department Master

? V Field Type Ocr Etp Ksq GEN name Length Rename

Department ID CDE K 1 ACCD 6


_ * Department name TXT A ACTX 25

SEL: '+' Add virtual field, '-' Remove virtual field.


F3=Exit

Whenever a file refers to itself, the relation should be the last relation specified for that file. That is done by
placing a sequence number in the data relation.

>>> Place a 'V' next to the Employee Master Refers To Employee Master relation. Press ENTER.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 20:13


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ Employee Master * Rel lvl: ___ ___ ________________________
? Typ Object Relation Seq Typ Referenced object
_ FIL Employee Master__________ Owned by____ FIL Company Master__________
_ FIL Employee Master__________ Known by____ FLD Employee ID_____________
_ FIL Employee Master__________ Has_________ FLD Employee Name___________
_ FIL Employee Master__________ Has_________ FLD Employee Address________
_ FIL Employee Master__________ Has_________ FLD Employee City___________
_ FIL Employee Master__________ Has_________ FLD Employee State__________
_ FIL Employee Master__________ Has_________ FLD Employee Status_________
_ FIL Employee Master__________ Has_________ FLD Employee Zip Code_______
_ FIL Employee Master__________ Has_________ FLD Rate of Pay_____________
_ FIL Employee Master__________ Has_________ FLD Manager Status Code_____
_ FIL Employee Master__________ Refers to___ 99 FIL Job Master______________
_ FIL Employee Master__________ Refers to___ 100 FIL Department Master_______
V FIL Employee Master__________ Refers to___ 999 FIL Employee Master_________
For: Manager _________________ Sharing: *ALL______________________
_ _________________________ ____________ _______________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

1 - 63
Synon Made Simple Data Modeling

Now, select the field(s) to be virtualized.

>>> For our example, select Employee Name. Place a '+' next to the Employee Name field. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 20:14


EDIT VIRTUAL FIELD EDITNTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Employee Master

? V Field Type Ocr Etp Ksq GEN name Length Rename

Company ID CDE K 1 ABCD 6


Employee ID CDE K 2 AECD 6
+ Employee Name TXT A AETX 25
_ Employee Address TXT A AFTX 25
_ Employee City TXT A AGTX 25
_ Employee State CDE A AFCD 2
_ Employee Status STS A ACST 1
_ Employee Zip Code NBR A ABNB 5.0
_ Rate of Pay PRC A ADPR 7.2
_ Manager Status Code STS A ADST 1
_ Job ID CDE A ADCD 6
_ Job Description TXT V ADTX 25
_ Department ID CDE A ACCD 6

SEL: '+' Add virtual field, '-' Remove virtual field.


F3=Exit

The field(s) selected will be highlighted. An asterisk (*) will appear next to the field indicating it has been
selected for virtualization.

>>> Press F3 to exit.

Op: GWS TRN3PCS1 2/07/96 20:14


EDIT VIRTUAL FIELD EDITNTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Employee Master

? V Field Type Ocr Etp Ksq GEN name Length Rename

Company ID CDE K 1 ABCD 6


Employee ID CDE K 2 AECD 6
_ * Employee Name TXT A AETX 25
_ Employee Address TXT A AFTX 25
_ Employee City TXT A AGTX 25
_ Employee State CDE A AFCD 2
_ Employee Status STS A ACST 1
_ Employee Zip Code NBR A ABNB 5.0
_ Rate of Pay PRC A ADPR 7.2
_ Manager Status Code STS A ADST 1
_ Job ID CDE A ADCD 6
_ Job Description TXT V ADTX 25
_ Department ID CDE A ACCD 6

SEL: '+' Add virtual field, '-' Remove virtual field.


F3=Exit

1 - 64
Synon Made Simple Data Modeling

Now, let's see how Synon handles Virtualized fields for Refers to relations.

>>> Place an 'E' next to the Employee Master file to look at the entries or layout of the file.
Press ENTER.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 20:14


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ Employee Master * Rel lvl: ___ ___ ________________________
? Typ Object Relation Seq Typ Referenced object_______
E FIL Employee Master__________ Owned by ___ FIL Company Master__________
_ FIL Employee Master__________ Known by ___ FLD Employee ID_____________
_ FIL Employee Master__________ Has_________ FLD Employee Name___________
_ FIL Employee Master__________ Has_________ FLD Employee Address________
_ FIL Employee Master__________ Has_________ FLD Employee City___________
_ FIL Employee Master__________ Has_________ FLD Employee State__________
_ FIL Employee Master__________ Has_________ FLD Employee Status_________
_ FIL Employee Master__________ Has_________ FLD Employee Zip Code_______
_ FIL Employee Master__________ Has_________ FLD Rate of Pay_____________
_ FIL Employee Master__________ Has_________ FLD Manager Status Code_____
_ FIL Employee Master__________ Refers to___ 99 FIL Job Master______________
_ FIL Employee Master__________ Refers to___ 100 FIL Department Master_______
_ FIL Employee Master__________ Refers to___ 999 FIL Employee Master_________
For: Manager _________________ Sharing: *ALL______________________
_ _________________________ ____________ ________________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

Notice, there is another type of field in this file, the Virtual field. Department Name, Job Description, and
Manager Employee Name are all virtual fields. Virtual fields are indicated with a 'V'.

>>> Page Down or Roll Up.

Op: GWS TRN3PCS1 2/07/96 20:14


EDIT FILE ENTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Employee Master

? Field Type Ocr Et Ksq GEN name Length Rename

_ Company ID CDE K 1 ABCD 6


_ Employee ID CDE K 2 AECD 6
_ Employee Name TXT A AETX 25
_ Employee Address TXT A AFTX 25
_ Employee City TXT A AGTX 25
_ Employee State CDE A AFCD 2
_ Employee Status STS A ACST 1
_ Employee Zip Code NBR A ABNB 5.0
_ Rate of Pay PRC A ADPR 7.2
_ Manager Status Code STS A ADST 1
_ Job ID CDE A ADCD 6
_ Job Description TXT V ADTX 25
_ Department ID CDE A ACCD 6
_ Department name TXT V ACTX 25
SEL: Z-Details, R-Replace field, U-Usage, M-Mapped field parameters, L-Lock
F3=Exit

1 - 65
Synon Made Simple Data Modeling

Notice, the Employee Name field we virtualized, has assumed the prefix of 'Manager' (specified on the
Involution relation).

Op: GWS TRN3PCS1 2/07/96 20:14


EDIT FILE ENTRIES Synon Made Simple-R5.1 GWS

File . . . . . . : Employee Master

? Field Type Ocr Et Ksq GEN name Length Rename

_ Manager Employee ID CDE REF A AKCD 6


_ Manager Employee Name TXT REF V AHTX 25 Y

SEL: Z-Details, R-Replace field, U-Usage, M-Mapped field parameters, L-Lock


F3=Exit

>>> Press F3 to exit.

Now let's see what happens to the Update and Retrieval access paths when field(s) are virtualized.

>>> Place a 'Z' in the subfile selection field next to any of the Employee Master Data relations. Press ENTER.

*DSNR SYN51MDL Op: GWS TRN3PCS1 2/07/96 20:15


EDIT DATABASE RELATIONS Synon Made Simple-R5.1 GWS
=> ___ Employee Master * Rel lvl: ___ ___ ________________________
? Typ Object Relation Seq Typ Referenced object
Z FIL Employee Master__________ Owned by ___ FIL Company Master__________
_ FIL Employee Master__________ Known by____ FLD Employee ID_____________
_ FIL Employee Master__________ Has_________ FLD Employee Name___________
_ FIL Employee Master__________ Has_________ FLD Employee Address________
_ FIL Employee Master__________ Has_________ FLD Employee City___________
_ FIL Employee Master__________ Has_________ FLD Employee State__________
_ FIL Employee Master__________ Has_________ FLD Employee Status_________
_ FIL Employee Master__________ Has_________ FLD Employee Zip Code_______
_ FIL Employee Master__________ Has_________ FLD Rate of Pay_____________
_ FIL Employee Master__________ Has_________ FLD Manager Status Code_____
_ FIL Employee Master__________ Refers to___ 99 FIL Job Master______________
_ FIL Employee Master__________ Refers to___ 100 FIL Department Master_______
_ FIL Employee Master__________ Refers to___ 999 FIL Employee Master_________
For: Manager__________________ Sharing: *ALL______________________
_ _________________________ ____________ ________________________

Bottom
Z(n)=Details F=Functions E(n)=Entries S(n)=Select F23=More options
F3=Exit F5=Reload F6=Hide/Show F7=Fields F9=Add/Change F24=More keys

1 - 66
Synon Made Simple Data Modeling

We will Zoom into the Update and Retrieval access paths and see the effect of specifying virtual fields in the
Data Model.

>>> Place a 'Z' in the subfile selection field for the Update and Retrieval access paths. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 20:18


EDIT FILE DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master
Attribute . . . . . . . . : REF Field reference file. : *NONE
Documentation sequence. . : Source library. . . . : SYN50GEN
GEN format prefix . . . . : AE Distributed . . . . . : N (Y,N)
Assimilated physical. . . :
Record not found message. : Employee Master NF Msgid. : USR0007
Record exists message . . : Employee Master EX Msgid. : USR0008

? Typ Access path Source mbr Key Index options Auto add
PHY Physical file UUAEREP NONE ATR ONLY
Z UPD Update index UUAEREL0 UNIQUE IMMED ATR ONLY
Z RTV Retrieval index UUAEREL1 UNIQUE IMMED ATR ONLY
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________

SEL: Z-Details, G/J-Generate, E-STRSEU, D-Delete, L-Locks, O-Overrides


H-Hold/Release, T-Trim, V-Virtualize, U-Usage, F-Func refs., N-Narrative
F3=Exit F5=Reload F7=Functions F8=Change name F17=Services F20=Narrative

>>> Zoom into the format on the Edit Access Path Details Screen. Enter 'Z' in the subfile selection field. Press
ENTER.

Op: GWS TRN3PCS1 2/07/96 20:18


EDIT ACCESS PATH DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Update index Type. . . . : UPD
Unique or duplicate order : U (U-Unique,F-FIFO,L-LIFO,C-FCFO,' '-Undefined)
Index maintenance option : I (I-IMMED, D-DLY, R-REBLD)
Alternate collating table :

Generation mode . . . : M (M-MDLVAL, D-DDS, S-SQL, X-UNX)


Source member name . . : UUAEREL0___
Source member text . . : Employee Master Update index_________

Format GEN Format text


? Seq name pfx (Based on file)
Z 1 FAEREAF___ AE Employee Master________

SEL: Z-Entries, R-Relations, S-Select/omit, A-Assoc.acps, T-Trim, V-Virtual


F3=Exit F8=Rename F20=Narrative

1 - 67
Synon Made Simple Data Modeling

You will notice only the data fields, that is, the fields physically on the access appear on the Update Access
Path. There are no virtual fields on this access path.

Op: GWS TRN3PCS1 2/07/96 20:18


EDIT ACCESS PATH FORMAT ENTRIES Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Update index Type. . . . : UPD
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
_ Company ID CDE ABCD K 1 2
_ Employee ID CDE AECD K 2 1
_ Employee Name TXT AETX A 1
_ Employee Address TXT AFTX A 1
_ Employee City TXT AGTX A 1
_ Employee State CDE AFCD A 1
_ Employee Status STS ACST A 1
_ Employee Zip Code NBR ABNB A 1
_ Rate of Pay PRC ADPR A 1
_ Manager Status Code STS ADST A 1
_ Job ID CDE ADCD A 1

SEL: Z-Field details, L-Locks.


F3=Exit F7=Relations

>>> Roll Up.

Op: GWS TRN3PCS1 2/07/96 20:18


EDIT ACCESS PATH FORMAT ENTRIES Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Update index Type. . . . : UPD
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
_ Department ID CDE ACCD A 1
_ Manager Employee ID CDE REF AKCD A 1

SEL: Z-Field details, L-Locks.


F3=Exit F7=Relations

>>> Press F3 until you return to the Edit Access Path Details panel for the Retrieval index.

1 - 68
Synon Made Simple Data Modeling

Now let's look at how virtual fields affect the Retrieval access path.

>>> Zoom into the format by placing a 'Z' in the subfile selection field. Press ENTER.

Op: GWS TRN3PCS1 2/07/96 20:19


EDIT ACCESS PATH DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Retrieval index Type. . . . : RTV
Unique or duplicate order : U (U-Unique,F-FIFO,L-LIFO,C-FCFO,' '-Undefined)
Index maintenance option : I (I-IMMED, D-DLY, R-REBLD)
Alternate collating table :
Allow select/omit . . . . : _ (S-Static, D-Dynamic, ' '-None)
Generation mode . . . : M (M-MDLVAL, D-DDS, S-SQL, X-UNX)
Source member name . . : UUAEREL1__
Source member text . . : Employee Master Retrieval index________

Format GEN Format text Associated


? Seq name pfx (Based on file) Update access path
Z 1 FAEREAM ___ AE Employee Master __________ Update index

SEL: Z-Entries, R-Relations, S-Select/omit, A-Assoc.acps, T-Trim, V-Virtual


F3=Exit F8=Rename F20=Narrative

So far, it looks just like the Update access path.

>>> Roll up.

Op: GWS TRN3PCS1 2/07/96 20:19


EDIT ACCESS PATH FORMAT ENTRIES Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Retrieval index Type. . . . : RTV
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
_ Company ID CDE ABCD K 1 2
_ Employee ID CDE AECD K 2 1
_ Employee Name TXT AETX A 1
_ Employee Address TXT AFTX A 1
_ Employee City TXT AGTX A 1
_ Employee State CDE AFCD A 1
_ Employee Status STS ACST A 1
_ Employee Zip Code NBR ABNB A 1
_ Rate of Pay PRC ADPR A 1
_ Manager Status Code STS ADST A 1
_ Job ID CDE ADCD A 1

SEL: Z-Field details, L-Locks.


F3=Exit F7=Relations

1 - 69
Synon Made Simple Data Modeling

Now, you can see all the virtual fields, selected earlier appear on the Retrieval Access path.
Remember, virtual fields are physically present in only one place, but can be logically present in several places. Since
the Update access path contains only fields physically present on that record, the virtual fields do not appear.

Op: GWS TRN3PCS1 1/01/96 19:17:44


EDIT ACCESS PATH FORMAT ENTRIES Synon Release 4.1 Model
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Retrieval index Type. . . . : RTV
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
_ Job Description TXT ACTX V 1
_ Department Id CDE ABCD A 1
_ Department Name TXT ABTX V 1
_ Manager Employee ID CDE REF AFCD A 1
_ Manager Employee Name TXT REF AGTX V 1

SEL: Z-Field details.


F3=Exit F7=Relations

>>> Press F7 to review the data relations for this file. The relations are very similar to the relations found on the
Edit Database Relations display.

EDIT ACCESS PATH RELATIONS Synon Release 4.1 Model


File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Retrieval index Type. . . . : RTV
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
? D Verb File/for Access path/Function
_ * Owned by Company Master Retrieval index

_ * Known by Employee ID

_ * Has Employee Name

_ * Has Employee Address

_ * Has Employee City

_ * Has Employee State

_ * Has Employee Zip Code


+
A-Ref Accpths, S-Select F4, T-Default F4, '+'/'-'-Add/Rmv relation, V-Virtual
F3=Exit F7=Entries

1 - 70
Synon Made Simple Data Modeling

>>> Press Roll Up or Page Down.

Op: GWS TRN3PCS1 2/07/96 20:22


EDIT ACCESS PATH RELATIONS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Retrieval index Type. . . . : RTV
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
? D Verb File/for Access path/Function
* Has Employee Zip Code

* Has Rate of Pay

* Has Manager Status Code

* Refers to Job Master Retrieval index

* Refers to Department Master Retrieval index

* Refers to Employee Master Retrieval index


Manager

A-Ref Accpths, S-Select F4, T-Default F4, '+'/'-'-Add/Rmv relation, V-Virtu


F3=Exit F7=Entries

>>> Press F3 until you return to the Edit File Details screen.

1 - 71
Synon Made Simple Data Modeling

Resequence Access Paths

A Resequence Access Path allows you to order or sequence data differently than specified in the Data Model.
We will create a Resequence Access Path to display the Employee Master File by Employee Name. The type of access
path will be RSQ, the access path name is Employee Master By Name.

>>> Position the cursor on the next blank line and enter the information as displayed below. Press ENTER to
confirm your choice.

Op: GWS TRN3PCS1 2/11/96 10:39:49


EDIT FILE DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master
Attribute . . . . . . . . : REF Field reference file. : *NONE
Documentation sequence. . : Source library. . . . : SYN50GEN
GEN format prefix . . . . : AE Distributed . . . . . : N (Y,N)
Assimilated physical. . . :
Record not found message. : Employee Master NF Msgid. : USR0007
Record exists message . . : Employee Master EX Msgid. : USR0008

? Typ Access path Source mbr Key Index options Auto add
_ PHY Physical file UUAEREP NONE ATR ONLY
_ UPD Update index UUAEREL0 UNIQUE IMMED ATR ONLY
_ RTV Retrieval index UUAEREL1 UNIQUE IMMED ATR ONLY
_ RSQ Employee Master by Name__
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________

SEL: Z-Details, G/J-Generate, E-STRSEU, D-Delete, L-Locks, O-Overrides


H-Hold/Release, T-Trim, V-Virtualize, U-Usage, F-Func refs., N-Narrative
F3=Exit F5=Reload F7=Functions F8=Change name F17=Services F20=Narrative

As before, Synon determines the name of the source member for the new access path.

1 - 72
Synon Made Simple Data Modeling

>>> Let's Zoom into the details of the access path. Here we will change the key structure of the access path.
Place a 'Z' in the subfile selection field. Press ENTER.

Op: GWS TRN3PCS1 2/11/96 10:40:25


EDIT FILE DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master
Attribute . . . . . . . . : REF Field reference file. : *NONE
Documentation sequence. . : Source library. . . . : SYN50GEN
GEN format prefix . . . . : AE Distributed . . . . . : N (Y,N)
Assimilated physical. . . :
Record not found message. : Employee Master NF Msgid. : USR0007
Record exists message . . : Employee Master EX Msgid. : USR0008

? Typ Access path Source mbr Key Index options Auto add
_ PHY Physical file UUAEREP NONE ATR ONLY
_ UPD Update index UUAEREL0 UNIQUE IMMED ATR ONLY
_ RTV Retrieval index UUAEREL1 UNIQUE IMMED ATR ONLY
Z RSQ Employee Master by Name UUAEREL2 FIFO IMMED ATR ONLY
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________

SEL: Z-Details, G/J-Generate, E-STRSEU, D-Delete, L-Locks, O-Overrides


H-Hold/Release, T-Trim, V-Virtualize, U-Usage, F-Func refs., N-Narrative
F3=Exit F5=Reload F7=Functions F8=Change name F17=Services F20=Narrative

Once again, let's zoom into the format.

>>> Place a 'Z' in the subfile selection field (as shown in the panel below). Press ENTER.

Op: GWS TRN3PCS1 2/11/96 10:40:38


EDIT ACCESS PATH DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Employee Master by Name Type. . . . : RSQ
Unique or duplicate order : F (U-Unique,F-FIFO,L-LIFO,C-FCFO,' '-Undefined)
Index maintenance option : I (I-IMMED, D-DLY, R-REBLD)
Alternate collating table : __________
Allow select/omit . . . . : (S-Static, D-Dynamic, ' '-None)
Generation mode . . . : M (M-MDLVAL, D-DDS, S-SQL, X-UNX)
Source member name . . : UUAEREL2__
Source member text . . : Employee Master Employee Master by Name_

Format GEN Format text Associated


? Seq name pfx (Based on file) Retrieval access path
Z 1 FAEREAN___ AE Employee Master___________ Retrieval index

SEL: Z-Entries, R-Relations, S-Select/omit, A-Assoc.acps, T-Trim, V-Virtualize


F3=Exit F8=Rename F20=Narrative

1 - 73
Synon Made Simple Data Modeling

We see the key structure for this file is the same as the Employee Master file in the data model. Now we want
to change it.

>>> Blank out of keys (shown below as 1 and 2 under the Key no. Heading).

Op: GWS TRN3PCS1 2/11/96 10:40:45


EDIT ACCESS PATH FORMAT ENTRIES Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Employee Master by Name Type. . . . : RSQ
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
_ Company ID CDE ABCD K 1 _ 2
_ Employee ID CDE AECD K 2 _ 1
_ Employee Name TXT AETX A _ 1
_ Employee Address TXT AFTX A _ 1
_ Employee City TXT AGTX A _ 1
_ Employee State CDE AFCD A _ 1
_ Employee Status STS ACST A _ 1
_ Employee Zip Code NBR ABNB A _ 1
_ Rate of Pay PRC ADPR A _ 1
_ Manager Status Code STS ADST A _ 1
_ Job ID CDE ADCD A _ 1 +

SEL: Z-Field details, L-Locks.


F3=Exit F7=Relations

>>> Now place a '1' in the Key no. field for the Employee Name field. Press ENTER.

Op: GWS TRN3PCS1 2/11/96 10:40:45


EDIT ACCESS PATH FORMAT ENTRIES Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Employee Master by Name Type. . . . : RSQ
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
_ Company ID CDE ABCD K __ _ 2
_ Employee ID CDE AECD K __ _ 1
_ Employee Name TXT AETX A 1_ _ 1
_ Employee Address TXT AFTX A _ 1
_ Employee City TXT AGTX A _ 1
_ Employee State CDE AFCD A _ 1
_ Employee Status STS ACST A _ 1
_ Employee Zip Code NBR ABNB A _ 1
_ Rate of Pay PRC ADPR A _ 1
_ Manager Status Code STS ADST A _ 1
_ Job ID CDE ADCD A _ 1 +

SEL: Z-Field details, L-Locks.


F3=Exit F7=Relations

1 - 74
Synon Made Simple Data Modeling

The Employee Name has been selected as the primary key for this file. This is done by the designation of a '1'
under the Key no heading.

Op: GWS TRN3PCS1 2/11/96 10:53: 01


EDIT ACCESS PATH FORMAT ENTRIES Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Employee Master by Name Type. . . . : RSQ
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
_ Company ID CDE ABCD A _ 2
_ Employee ID CDE AECD A _ 1
_ Employee Name TXT AETX K 1 _ 1
_ Employee Address TXT AFTX A _ 1
_ Employee City TXT AGTX A _ 1
_ Employee State CDE AFCD A _ 1
_ Employee Status STS ACST A _ 1
_ Employee Zip Code NBR ABNB A _ 1
_ Rate of Pay PRC ADPR A _ 1
_ Manager Status Code STS ADST A _ 1
_ Job ID CDE ADCD A _ 1 +

SEL: Z-Field details, L-Locks.


F3=Exit F7=Relations

>>> Press F3 until you return to the Edit File Details Panel.

1 - 75
Synon Made Simple Data Modeling

Query Access Paths

The last access path type we will discuss in this section is the Query Access Path. It is implemented as an
OPNQRY (Open Query) file.

The QRY access path is unlike the other access paths we have discussed in that the Query Access Path is the
only one that allows virtual fields to be key fields. The Query access path is, according to Synon documentation, is
only allowed with Print Object and Print File functions.

Let's create a QRY access path. The access path type is QRY. The name of the Access path is Open Qry by
Job Descption. The QRY ACP we will create will have a key by Job Description. You will recall the Job Description
field is a field that has been virtualized. Let's see what is involved.

>>> Enter the fields to create the QRY access path as listed below. Press ENTER.

Op: GWS TRN3PCS1 2/11/96 10:53:30


EDIT FILE DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master
Attribute . . . . . . . . : REF Field reference file. : *NONE
Documentation sequence. . : Source library. . . . : SYN50GEN
GEN format prefix . . . . : AE Distributed . . . . . : N (Y,N)
Assimilated physical. . . :
Record not found message. : Employee Master NF Msgid. : USR0007
Record exists message . . : Employee Master EX Msgid. : USR0008

? Typ Access path Source mbr Key Index options Auto add
_ PHY Physical file UUAEREP NONE ATR ONLY
_ UPD Update index UUAEREL0 UNIQUE IMMED ATR ONLY
_ RTV Retrieval index UUAEREL1 UNIQUE IMMED ATR ONLY
_ RSQ Employee Master by Name UUAEREL2 FIFO IMMED ATR ONLY
_ QRY Open Qry by Job Descption
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________

SEL: Z-Details, G/J-Generate, E-STRSEU, D-Delete, L-Locks, O-Overrides


H-Hold/Release, T-Trim, V-Virtualize, U-Usage, F-Func refs., N-Narrative
F3=Exit F5=Reload F7=Functions F8=Change name F17=Services F20=Narrative

1 - 76
Synon Made Simple Data Modeling

>>> Place a 'Z' next to the QRY access path to Zoom into the details. Press ENTER.

Op: GWS TRN3PCS1 2/11/96 10:53:30


EDIT FILE DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master
Attribute . . . . . . . . : REF Field reference file. : *NONE
Documentation sequence. . : Source library. . . . : SYN50GEN
GEN format prefix . . . . : AE Distributed . . . . . : N (Y,N)
Assimilated physical. . . :
Record not found message. : Employee Master NF Msgid. : USR0007
Record exists message . . : Employee Master EX Msgid. : USR0008

? Typ Access path Source mbr Key Index options Auto add
_ PHY Physical file UUAEREP NONE ATR ONLY
_ UPD Update index UUAEREL0 UNIQUE IMMED ATR ONLY
_ RTV Retrieval index UUAEREL1 UNIQUE IMMED ATR ONLY
_ RSQ Employee Master by Name UUAEREL2 FIFO IMMED ATR ONLY
Z QRY Open Qry by Job Descption
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________

SEL: Z-Details, G/J-Generate, E-STRSEU, D-Delete, L-Locks, O-Overrides


H-Hold/Release, T-Trim, V-Virtualize, U-Usage, F-Func refs., N-Narrative
F3=Exit F5=Reload F7=Functions F8=Change name F17=Services F20=Narrative

>>> Now let's zoom into the format. Place a 'Z' in the subfile selection field (as shown below). Press ENTER.

EDIT ACCESS PATH DETAILS Synon Made Simple-R5.1 GWS


File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Open Qry by Job Descption Type. . . . : QRY
Unique or duplicate order : F (U-Unique,F-FIFO,L-LIFO,C-FCFO,' '-Undefined)
Index maintenance option : (I-IMMED, D-DLY, R-REBLD)
Alternate collating table :
Allow select/omit . . . . : _ (S-Static, D-Dynamic, ' '-None)
Generation mode . . . : M (M-MDLVAL, D-DDS, S-SQL, X-UNX)
Source member name . . : UUAEREL3_
Source member text . . : Employee Master Open Qry by Job Descptio

Format GEN Format text


? Seq name pfx (Based on file)
Z 1 FAEREAO___ AE Employee Master__________ Retrieval index

SEL: Z-Entries, R-Relations, S-Select/omit, A-Assoc.acps, T-Trim, V-Virtualize


F3=Exit F7=Auxiliaries F8=Change name F20=Narrative.

1 - 77
Synon Made Simple Data Modeling

Synon has defaulted the key structure to that as defined in the Data Model. We want to change it use the Job
Description field as the key. Before we can use the job description as the new key field, we first much remove Company
ID and Employee ID as the key fields. Next, we must add the Job Description field to the access path. Finally, we will
change the access path to reflect the Job Description field as the new key.

>>> Blank out the '1' & '2' under the Key no. fields. Press ENTER. Press F7 to look at the Relations panel.

Op: GWS TRN3PCS1 2/11/96 10:54: 01


EDIT ACCESS PATH FORMAT ENTRIES Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Open Qry by Job Descption Type. . . . : QRY
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
_ Company ID CDE ABCD K 1 _ 2
_ Employee ID CDE AECD K 2 _ 1
_ Employee Name TXT AETX A _ 1
_ Employee Address TXT AFTX A _ 1
_ Employee City TXT AGTX A _ 1
_ Employee State CDE AFCD A _ 1
_ Employee Status STS ACST A _ 1
_ Employee Zip Code NBR ABNB A _ 1
_ Rate of Pay PRC ADPR A _ 1
_ Manager Status Code STS ADST A _ 1
_ Job ID CDE ADCD A _ 1 +

SEL: Z-Field details, L-Locks.


F3=Exit F7=Relations

The Edit Access Path Relations panel appears. The first panel displays the fields we’ve defined so far
(Employee ID, Employee name, etc). Roll up to see the next panel. We want to look at the Refers to Relations for
the Job Master, Department Master, and Employee Master files.

Op: GWS TRN3PCS1 2/11/96 10:55:25


EDIT ACCESS PATH RELATIONS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Open Qry by Job Descption Type. . . . : QRY
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
? D Verb File/for Access path/Function
* Owned by Company Master Retrieval index

* Known by Employee ID

* Has Employee Name

* Has Employee Address

* Has Employee City

* Has Employee State

* Has Employee Status


+
A-Ref Accpths, S-Select F4, T-Default F4, '+'/'-'-Add/Rmv relation, V-Virtual
F3=Exit F7=Entries

1 - 78
Synon Made Simple Data Modeling

Release 5.0 of Synon, virtual fields do not automatically appear on the access path, we must explicity add
them.

To add these fields, we’ll place a 'V' next to each of the Refers To relations.

>>> Place a 'V' next to each Refers to relation, as shown below. Press ENTER.

Op: GWS TRN3PCS1 2/11/96 10:55:25


EDIT ACCESS PATH RELATIONS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Open Qry by Job Descption Type. . . . : QRY
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
? D Verb File/for Access path/Function
* Has Employee Zip Code

* Has Rate of Pay

* Has Manager Status Code

V * Refers to Job Master Retrieval index

V * Refers to Department Master Retrieval index

V * Refers to Employee Master Retrieval index


Manager

A-Ref Accpths, S-Select F4, T-Default F4, '+'/'-'-Add/Rmv relation, V-Virtual


F3=Exit F7=Entries

>>> Place a '+' next to the Job Description field. Press ENTER.

This action indicates to Synon this virtual field should be added to the Access path.

Op: GWS TRN3PCS1 2/11/96 10:55:53


EDIT ACCPTH RELATION VIRTUAL FIELDS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Open Qry by Job Descption Type. . . . : QRY
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
Relation. . . . . . . . . : Refers to Job Master
for. . . . . . . :
GEN Ref
? D Field Name cnt
+ Job Description ADTX

SEL: Z-Field details, '+'/'-Add/Remove virtual field, L-Locks.


F3=Exit

1 - 79
Synon Made Simple Data Modeling

An asterisk (*) now appears indicating this virtual field has been added.

>>> Press F3. The same panel appears for the Department Master.

Op: GWS TRN3PCS1 2/11/96 10:56: 01


EDIT ACCPTH RELATION VIRTUAL FIELDS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Open Qry by Job Descption Type. . . . : QRY
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
Relation. . . . . . . . . : Refers to Job Master
for. . . . . . . :
GEN Ref
? D Field Name cnt
* Job Description ADTX

SEL: Z-Field details, '+'/'-Add/Remove virtual field, L-Locks.


F3=Exit

1 - 80
Synon Made Simple Data Modeling

We'll do the same process against the Department Master file.

>>> Place a '+' next to the Department name field. Press ENTER.

Op: GWS TRN3PCS1 2/11/96 10:55:53


EDIT ACCPTH RELATION VIRTUAL FIELDS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Open Qry by Job Descption Type. . . . : QRY
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
Relation. . . . . . . . . : Refers to Department Master
for. . . . . . . :
GEN Ref
? D Field Name cnt
+ Department name ACTX

SEL: Z-Field details, '+'/'-Add/Remove virtual field, L-Locks.


F3=Exit

An Asterisk (*) appears indicating this field has been added to the access path.

>>>Press F3 to exit.

Op: GWS TRN3PCS1 2/11/96 10:56: 01


EDIT ACCPTH RELATION VIRTUAL FIELDS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Open Qry by Job Descption Type. . . . : QRY
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
Relation. . . . . . . . . : Refers to Department Master
for. . . . . . . :
GEN Ref
? D Field Name cnt
* Department name ACTX

SEL: Z-Field details, '+'/'-Add/Remove virtual field, L-Locks.


F3=Exit

1 - 81
Synon Made Simple Data Modeling

The panel for the Employee Master appears.

>>>Once again, we'll place a '+' next to the Manager Employee name field. Press ENTER.

Op: GWS TRN3PCS1 2/11/96 10:56: 01


EDIT ACCPTH RELATION VIRTUAL FIELDS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Open Qry by Job Descption Type. . . . : QRY
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
Relation. . . . . . . . . : Refers to Employee Master
for. . . . . . . :
GEN Ref
? D Field Name cnt
+ Manager Employee Name ACTX

SEL: Z-Field details, '+'/'-Add/Remove virtual field, L-Locks.


F3=Exit

An asterisk (*) appears, indicating this virtual field will be included on the access path.

>>> Press F3.

Op: GWS TRN3PCS1 2/11/96 10:56: 01


EDIT ACCPTH RELATION VIRTUAL FIELDS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Open Qry by Job Descption Type. . . . : QRY
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
Relation. . . . . . . . . : Refers to Employee Master
for. . . . . . . : Manager
GEN Ref
? D Field Name cnt
* Manager Employee Name ACTX 1

SEL: Z-Field details, '+'/'-Add/Remove virtual field, L-Locks.


F3=Exit

1 - 82
Synon Made Simple Data Modeling

As we return to the Edit Access Path Format Entries panel, we can see the virtual fields have been added to this
panel as all as the access path.

Op: GWS TRN3PCS1 2/11/96 10:58: 01


EDIT ACCESS PATH FORMAT ENTRIES Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Open Qry by Job Descption Type. . . . : QRY
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
_ Company ID CDE ABCD A 2
_ Employee ID CDE AECD A 1
_ Employee Name TXT AETX A 1
_ Employee Address TXT AFTX A 1
_ Employee City TXT AGTX A 1
_ Employee State CDE AFCD A 1
_ Employee Status STS ACST A 1
_ Employee Zip Code NBR ABNB A 1
_ Rate of Pay PRC ADPR A 1
_ Manager Status Code STS ADST A 1
_ Job ID CDE ADCD A 1 +

SEL: Z-Field details, L-Locks.


F3=Exit F7=Relations

>>>Roll up or Page Down.

Op: GWS TRN3PCS1 2/11/96 10:58: 01


EDIT ACCESS PATH FORMAT ENTRIES Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Open Qry by Job Descption Type. . . . : QRY
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
_ Job Description TXT ADTX V _ 1
_ Department ID CDE ACCD A _ 1
_ Department name TXT ACTX V _ _ 1
_ Manager Employee ID CDE REF AKCD A _ 1
_ Manager Employee Name TXT AHTX V _ _ 1

SEL: Z-Field details, L-Locks.


F3=Exit F7=Relations

1 - 83
Synon Made Simple Data Modeling

>>> Place a '1' in the key no. field next to Job Description. Press ENTER.

Notice the Job Description field has been designated as type 'V' for virtual field.

Op: GWS TRN3PCS1 1/01/96 19:21:31


EDIT ACCESS PATH FORMAT ENTRIES Synon Release 4.1 Model
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Open Qry by Job Descption Type. . . . : QRY
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
_ Job Description TXT ACTX V 1
_ Department Id CDE ABCD A _ 1
_ Department Name TXT ABTX V 1 _ 1
_ Manager Employee ID CDE REF AFCD A _ 1
_ Manager Employee Name TXT REF AGTX V _ 1

SEL: Z-Field details.


F3=Exit F7=Relations

Notice, when a virtual field is specified as a key field, the type changes from 'V' to 'W' (not to a 'K' as with
the other access paths). The Job Description field is now designated as a key field with a '1' under the Key no. field.

Op: GWS TRN3PCS1 1/01/96 19:21:31


EDIT ACCESS PATH FORMAT ENTRIES Synon Release 4.1 Model
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Open Qry by Job Descption Type. . . . : QRY
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1

GEN Key Altcol Ref


? Field Name Type no. Dsc seq cnt
_ Job Description TXT ACTX V 1
_ Department Id CDE ABCD A _ 1
_ Department Name TXT ABTX W 1 _ 1
_ Manager Employee ID CDE REF AFCD A _ 1
_ Manager Employee Name TXT REF AGTX V _ 1

SEL: Z-Field details.


F3=Exit F7=Relations

>>> Press F3 until you return to the Edit File Details panel.

1 - 84
Synon Made Simple Data Modeling

Creating A Second Retrieval Access Path

We are now going to create another access path, Managers Only. This access path will be a retrieval access
path containing only records of Employees with the condition of Executive, Middle management, or Supervisor in their
Manager Status code.

>>> On the next available line, key in 'RTV' (retrieval) and 'Mangers Only' for the name of the access path.
Press ENTER.

Op: GWS TRN3PCS1 2/11/96 10:59: 01


EDIT FILE DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master
Attribute . . . . . . . . : REF Field reference file. : *NONE
Documentation sequence. . : Source library. . . . : SYN50GEN
GEN format prefix . . . . : AE Distributed . . . . . : N (Y,N)
Assimilated physical. . . :
Record not found message. : Employee Master NF Msgid. : USR0007
Record exists message . . : Employee Master EX Msgid. : USR0008

? Typ Access path Source mbr Key Index options Auto add
_ PHY Physical file UUAEREP NONE ATR ONLY
_ UPD Update index UUAEREL0 UNIQUE IMMED ATR ONLY
_ RTV Retrieval index UUAEREL1 UNIQUE IMMED ATR ONLY
_ RSQ Employee Master by Name UUAEREL2 FIFO IMMED ATR ONLY
_ QRY Open Qry by Job Descption UUAEREL3 FIFO ATR ONLY
_ RTV Managers Only
_ ___ _________________________
_ ___ _________________________
_ ___ _________________________
SEL: Z-Details, G/J-Generate, E-STRSEU, D-Delete, L-Locks, O-Overrides
H-Hold/Release, T-Trim, V-Virtualize, U-Usage, F-Func refs., N-Narrative
F3=Exit F5=Reload F7=Functions F8=Change name F17=Services F20=Narrative

1 - 85
Synon Made Simple Data Modeling

Synon automatically assigns the name of the source member to the Managers Only access path. Remember,
the key structure for a retrieval access path is fixed. That is, it is a reflection of the primary key structure specified in the
Data model.

>>> Let's Zoom into our newly created access path. Place a 'Z' in the subfile selection field next to the Managers
Only access path. Press ENTER.

Op: GWS TRN3PCS1 2/11/96 10:59: 01


EDIT FILE DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master
Attribute . . . . . . . . : REF Field reference file. : *NONE
Documentation sequence. . : Source library. . . . : SYN50GEN
GEN format prefix . . . . : AE Distributed . . . . . : N (Y,N)
Assimilated physical. . . :
Record not found message. : Employee Master NF Msgid. : USR0007
Record exists message . . : Employee Master EX Msgid. : USR0008

? Typ Access path Source mbr Key Index options Auto add
_ PHY Physical file UUAEREP NONE ATR ONLY
_ UPD Update index UUAEREL0 UNIQUE IMMED ATR ONLY
_ RTV Retrieval index UUAEREL1 UNIQUE IMMED ATR ONLY
_ RSQ Employee Master by Name UUAEREL2 FIFO IMMED ATR ONLY
_ QRY Open Qry by Job Descption UUAEREL3 FIFO ATR ONLY
Z RTV Managers Only UUAEREL4 UNIQUE IMMED ATR ONLY
_ ___ _________________________
_ ___ _________________________

SEL: Z-Details, G/J-Generate, E-STRSEU, D-Delete, L-Locks, O-Overrides


H-Hold/Release, T-Trim, V-Virtualize, U-Usage, F-Func refs., N-Narrative
F3=Exit F5=Reload F7=Functions F8=Change name F17=Services F20=Narrative

We will be selecting only records with the conditions of Executive, Middle Management, or Supervisor in the
Manager Status Code field. When specifying the criteria to select a set of records, you must indicate the method by
which the selection should occur. This is specified in the Allow select/omit field. To do so, determine if the selection
criteria is Static or Dynamic.

Static - The access path will have its own separate index. It will only include records that satisfy the
select/omit criteria. Whenever there is an update, the system will determine whether or not the access path should reflect
the change.

Dynamic - The access path includes all records, regardless of whether or not they meet the select/omit criteria.
The selection of records when the program reads the data from the access paths. Anytime virtual fields (join logical
files) have been selected, you MUST specify Dynamic selection.

1 - 86
Synon Made Simple Data Modeling

>>> Place a 'D' in Allow select/omit for Dynamic selection. Place an 'S' in the subfile selection field next to the
record format to indicate record selection is being defined. Press ENTER.

Op: GWS TRN3PCS1 2/11/96 11:00: 01


EDIT ACCESS PATH DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Managers Only Type. . . . : RTV
Unique or duplicate order : U (U-Unique,F-FIFO,L-LIFO,C-FCFO,' '-Undefined)
Index maintenance option : I (I-IMMED, D-DLY, R-REBLD)
Alternate collating table :
Allow select/omit . . . . : D (S-Static, D-Dynamic, ' '-None)
Generation mode . . . : M (M-MDLVAL, D-DDS, S-SQL, X-UNX)
Source member name . . : UUAEREL4__
Source member text . . : Employee Master Managers Only____________

Format GEN Format text Associated


? Seq name pfx (Based on file) Update access path
S 1 FAEREAP___ AE Employee Master__________ Update index

SEL: Z-Entries, R-Relations, S-Select/omit, A-Assoc.acps, T-Trim, V-Virtualize


F3=Exit F8=Rename F20=Narrative
Selection only allowed if 'S' or 'D' specified for Access path select/omit t

The Edit Access Path Select/Omit screen is displayed. This screen allows you to specify multiple selection
groups within the access path. For our purpose, we will set up only one.

>>> Place a 'Z' in the subfile selection field, an 'S' in the Select/Omit (S/O) field, and write a description of the
selection group you are entering. This Text description is free format. When this is complete, Press ENTER.

Op: GWS TRN3PCS1 2/11/96 11:00:35


EDIT ACCESS PATH SELECT/OMIT Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Managers Only Type. . . . : RTV
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1

? S/O Seq Text description


Z S Select Managers Only______________________________
_ _ __________________________________________________
_ _ __________________________________________________
_ _ __________________________________________________
_ _ __________________________________________________
_ _ __________________________________________________
_ _ __________________________________________________
_ _ __________________________________________________
_ _ __________________________________________________
_ _ __________________________________________________
SEL: Z-Conditions.
F3=Exit F5=Reload F9=Entries
Selection only allowed if 'S' or 'D' specified for Access path select/omit t

1 - 87
Synon Made Simple Data Modeling

The Edit Access Path Conditions screen allows you to select field(s) and associated conditions that will be used
as the selection criteria for the selection group defined on the previous screen.

>>> If you do not remember the exact name of the field, or the exact condition or list, place a '?' in each field and
Press ENTER.

Op: GWS TRN3PCS1 2/11/96 11:01: 01


EDIT ACCESS PATH CONDITIONS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Managers Only Type. . . . : RTV
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
Sel/Omit set. . . . . . . : S Select Managers Only

Seq Field Condition


?________________________ ?____________________
_________________________ _________________________
_________________________ _________________________
_________________________ _________________________
_________________________ _________________________
_________________________ _________________________
_________________________ _________________________
_________________________ _________________________
_________________________ _________________________
_________________________ _________________________
F3=Exit F5=Reload

>>> Place an 'X' next to the Manager Status Code. Press ENTER.

Op: GWS TRN3PCS1 2/11/96 11:01: 01


DISPLAY ACCESS PATH FORMAT ENTRIES Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : RTV
Access path name. . . . . : Managers Only Type. . . . : 030
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1

GEN
? Field Name Type
_ Company ID CDE ABCD K
_ Employee ID CDE AECD K
_ Employee Name TXT AETX A
_ Employee Address TXT AFTX A
_ Employee City TXT AGTX A
_ Employee State CDE AFCD A
_ Employee Status STS ACST A
_ Employee Zip Code NBR ABNB A
_ Rate of Pay PRC ADPR A
X Manager Status Code STS ADST A
_ Job ID CDE ADCD A +

SEL: X-Select field.


F3=Exit

1 - 88
Synon Made Simple Data Modeling

All of the conditions or lists of conditions for that field are displayed.

>>> Select the list Managers. Place an 'X' next to Managers. Press ENTER.

Op: GWS TRN3PCS1 2/11/96 11:01:48


EDIT FIELD CONDITIONS Synon Made Simple-R5.1 GWS
Field name. . . . . : Manager Status Code Attr. : STS
Enter condition . . : _________________________ and type to add new condition.
type . : ___ (Type: LST, VAL)

? Condition Type Op File/From value Display/To value MN


_ *ALL values LST **
X Managers LST
_ Executive VAL E E
_ Middle Management VAL M M
_ Supervisor VAL S S

SEL: Z-Details, D-Delete, X-Select, U-Where used, N-Narrative.


F3=Exit

The fields and conditions selected on the previous screens are returned to the Edit Access Path Conditions
Screen. It's important to recognize that with Select/Omit criteria as well as any other aspect of Synon, whenever you
condition or select specific values for a field, the selection or condition must be made on the English-like name of the
field, NOT THE ACTUAL VALUE(S).

In our example, a list of values, called 'MANAGERS' was selected, not the actual values (E,M, or S) found in
the file.

Op: GWS TRN3PCS1 2/11/96 11:02: 01


EDIT ACCESS PATH CONDITIONS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Managers Only Type. . . . : RTV
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
Sel/Omit set. . . . . . . : S Select Managers Only

Seq Field Condition


Manager Status Code______ Managers__________________
_________________________ __________________________
_________________________ __________________________
_________________________ __________________________
_________________________ __________________________
_________________________ __________________________
_________________________ __________________________
_________________________ __________________________
_________________________ __________________________
+
F3=Exit F5=Reload

>>> Press ENTER to confirm. Then press F3 until you return to the Edit File Details screen.

1 - 89
Synon Made Simple Data Modeling

Specifying Business Rules in Access Paths

You will recall we set a file to file relation (Employee Master Refers To Employee Master) so the Employees
manager ID is contained and validated within that record. But there is a problem. The standard Synon Retrieval access
path contains records for all employees (management and non-management). So when the Employee Master Refers To
Employee Master relation was set up, nothing was done to insure the automatic referential integrity checking is checking
against managers only. The traditional way of performing this validation, is to create a subroutine and copy it from
program to program. With Synon, this validation or BUSINESS RULE can be specified directly in the access path.

Op: GWS TRN3PCS1 2/11/96 11:02: 01


EDIT FILE DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master
Attribute . . . . . . . . : REF Field reference file. : *NONE
Documentation sequence. . : Source library. . . . : SYN50GEN
GEN format prefix . . . . : AE Distributed . . . . . : N (Y,N)
Assimilated physical. . . :
Record not found message. : Employee Master NF Msgid. : USR0007
Record exists message . . : Employee Master EX Msgid. : USR0008

? Typ Access path Source mbr Key Index options Auto add
_ PHY Physical file UUAEREP NONE ATR ONLY
_ UPD Update index UUAEREL0 UNIQUE IMMED ATR ONLY
Z RTV Retrieval index UUAEREL1 UNIQUE IMMED ATR ONLY
_ RSQ Employee Master by Name UUAEREL2 FIFO IMMED ATR ONLY
_ QRY Open Qry by Job Descption UUAEREL3 FIFO ATR ONLY
_ RTV Managers Only UUAEREL4 UNIQUE IMMED DYNSLT ATR ONLY
_ ___ _________________________
_ ___ _________________________

SEL: Z-Details, G/J-Generate, E-STRSEU, D-Delete, L-Locks, O-Overrides


H-Hold/Release, T-Trim, V-Virtualize, U-Usage, F-Func refs., N-Narrative
F3=Exit F5=Reload F7=Functions F8=Change name F17=Services F20=Narrative

>>> Zoom into the Retrieval index access path. Press ENTER.

1 - 90
Synon Made Simple Data Modeling

Now let's look at the access paths used or associated with the Retrieval access path.

>>> Place an 'R' in the subfile selection field, next to the format name. Press ENTER.

Op: GWS TRN3PCS1 2/11/96 11:02:31


EDIT ACCESS PATH DETAILS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Retrieval index Type. . . . : RTV JOIN
Unique or duplicate order : U (U-Unique,F-FIFO,L-LIFO,C-FCFO,' '-Undefined)
Index maintenance option : I (I-IMMED, D-DLY, R-REBLD)
Alternate collating table :
Allow select/omit . . . . : _ (S-Static, D-Dynamic, ' '-None)
Generation mode . . . : M (M-MDLVAL, D-DDS, S-SQL, X-UNX)
Source member name . . : UUAEREL1
Source member text . . : Employee Master Retrieval index__________

Format GEN Format text Associated


? Seq name pfx (Based on file) Update access path
R 1 FAEREAM___ AE Employee Master___________ Update index

SEL: Z-Entries, R-Relations, S-Select/omit, A-Assoc.acps, T-Trim, V-Virtualize


F3=Exit F8=Rename F20=Narrative

The Edit Access Path Relations screen displays the actual Data relations specified in the data model.

>>> Roll up or page down.

Op: GWS TRN3PCS1 2/11/96 11:02:46


EDIT ACCESS PATH RELATIONS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Retrieval index Type. . . . : RTV
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
? D Verb File/for Access path/Function
* Owned by Company Master Retrieval index

_ * Known by Employee ID

_ * Has Employee Name

_ * Has Employee Address

_ * Has Employee City

_ * Has Employee State

_ * Has Employee Status


+
A-Ref Accpths, S-Select F4, T-Default F4, '+'/'-'-Add/Rmv relation, V-Virtual
F3=Exit F7=Entries

1 - 91
Synon Made Simple Data Modeling

Now you will see the Refers To relations. You will notice the Employee Master (from the Employee Master
Refers To Employee Master) uses the default retrieval access path for validation. This access path contains all employee
records (management and non-management), therefore, any valid Employee ID could be entered in the Manager
Employee ID field and validated. To insure the validation is performed against an access path containing only
managers, the default Retrieval access path must be changed.

>>> Place an 'A' in the subfile selection field next to the 'Refers To Employee Master'. Press ENTER.

Op: GWS TRN3PCS1 2/11/96 11:02:46


EDIT ACCESS PATH RELATIONS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Retrieval index Type. . . . : RTV
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
? D Verb File/for Access path/Function
* Has Employee Zip Code

_ * Has Rate of Pay

_ * Has Manager Status Code

_ * Refers to Job Master Retrieval index

_ * Refers to Department Master Retrieval index

A * Refers to Employee Master Retrieval index


Manager

A-Ref Accpths, S-Select F4, T-Default F4, '+'/'-'-Add/Rmv relation, V-Virtual


F3=Exit F7=Entries

The Display File Access Paths screen shows all of the Retrieval access paths defined for the file being referred
to.

>>> Place an 'X' in the subfile selection field for Managers Only. Press ENTER.

Op: GWS TRN3PCS1 2/11/96 11:03: 01


DISPLAY FILE ACCESS PATHS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF

Access path
_________________________ <== Position display
? Typ Access path Source mbr
X RTV Managers Only UUAEREL4
_ RTV Retrieval index UUAEREL1

SEL: X-Select access path, N-Narrative.


F3=Exit

1 - 92
Synon Made Simple Data Modeling

The Edit Access Path Relations screen, now shows the access path used for the Refers To Employee
validation is the Managers Only access path.

>>> Press F3 until you return to the Edit Database Relations panel.

Op: GWS TRN3PCS1 2/11/96 11:03:38


EDIT ACCESS PATH RELATIONS Synon Made Simple-R5.1 GWS
File name . . . . . . . . : Employee Master Attribute . : REF
Access path name. . . . . : Retrieval index Type. . . . : RTV
Format text . . . . . . . : Employee Master
Based on. . . . . . . . . : Employee Master Format No . : 1
? D Verb File/for Access path/Function
_ * Has Employee Zip Code

_ * Has Rate of Pay

_ * Has Manager Status Code

_ * Refers to Job Master Retrieval index

_ * Refers to Department Master Retrieval index

_ * Refers to Employee Master Managers Only


Manager

A-Ref Accpths, S-Select F4, T-Default F4, '+'/'-'-Add/Rmv relation, V-Virtual


F3=Exit F7=Entries

1 - 93

You might also like