Monday, October 20, 2008

Relations

Database Relations can be entered using Edit Database Relations panel, These relations expresses assoication between two files or between a file and a field. There are 8 relations types available, which are as follows.

  1. Defined as,
  2. Extended by,
  3. Has,
  4. Includes,
  5. Known by,
  6. Owned by,
  7. Qualified by and
  8. Refers to

There are 3 differenet relations groups available, they are

Definition relations - declare files to exist
Key relations - define the keys in files
Attribute relations - declare non-key fields in files


Usage Type ------------- Relation ---------------------Used for
Definition ------------> Defined as ------------> File-to-file relationship
Key-------------------> Owned by ------------> File-to-file relationship
'' -------------------> Known by ------------> File-to-field relationship
" -------------------> Qualified by------------> File-to-field relationship
Attribute -------------> Refers to -------------> File-to-file relationship
'' --------------------->Includes --------------> File-to-field relationship
" ---------------------->Has -------------------> File-to-field relationship
Other-----------------> Extended by ----------> File-to-file relationship

1. Defined as :

File-to-file relationship.

Defined as relation is automatically created for a file if a reference is made to a non-existing file.

e.g. Employee Defined as Employee.

2. Owned by:

File-to-file relationship

Key fields of owing file become key fields of owned file. Attributes of owning file will become virtual fields of owned file.

e.g. Orderdetail OWNED BY Order

3. Known by:

Specifes the key field(s) for a file

e.g. Order KNOWN BY Order No

4. Qualified by:

To qualify a file indentifier by one or more variable factors like date, time, sequence number etc.

Appropriate fields of referring file can be redirected (RDR) to the effective field in referred file with a possibility of specifying *PREVIOUS or *NEXT field in the relation must be ATR and not CDE.

e.g.
Product Price Owned by Product Code
Product Price Qualified by Effective date
Product Price Has Product price

5. Has Relation

Declares a field to be present in afile as an attribute.

e.g. Order HAS Quantity

6.Includes Relation

File includes all the fields of a strucutre (STR) file.

e.g. Product INCLUDES Auditstamp -----------> (STR) File

7. Refers to Relation

File refers to another file.

Allows access to any of the fields on the referred file from a referring file.

Primary Key ----> Key field

Virtual Key -----> Non Key field

e.g. OrderDetail Refers to Product.

8. Extended By

Declares a file to be extension of another file

It is recommended to use Extended by a relation along with Owned by relation. If used with OWNED BY realtion, the fields of the extended fiel are available as virtual fields in the file being extended.

e.g. Customer Extended by CustomerDetails.

NOTE:

Seqeuence order should be as follows

  • OWNED BY,
  • KNOWN BY,
  • REFERS TO,
  • HAS.

INVOLUTION: A file refers to itself. e.g. Manager Code is got from EMPLOYEE table, with refering to key field of Employee code, where manager code(employee code) can be taken for MANAGER CODE field.

e.g EMPLOYEE REFERS TO EMPLOYEE

FOR MANAGER CODE.

FOR Text: For text clause can be added to a relation to further clarify the description of a relationship. If a file refers to more than one file once,FOR text clause can be used for further clarification.

e.g. Order Refers to Customer

For : Ordering Sharing : *ALL

Order REFERS to Customer

For: Invocing Sharing:* ALL

Cardinality: It is way of mapping

One to One : Order---> Order Detail

One to many: Product --> Product Cxt

Many to many: Order ---> Product

Virtual Fields: Fields which would seem to be present in the file when specific relations are made, such that which will not be present in the related file as physically. Hence it is coined term Virtual field.

Have to take 'V' against the Owneb by and referes to relation.

Take 'Z2' to navigate to corresponding fields in the edit database relation panel.

Take 'Z' to enter in to the corresponding file.

Friday, October 17, 2008

Fields

Advantage:2E fields

Each Advantage:2E Field has a Name and a Field Type
Advantage:2E Field Naming rules
•unique within the model
•up to 25 characters including embedded blanks
•e.g. Customer Code is a valid

Advantage:2E Field Name
•implementation name is different

Advantage:2E Field Types
•depends on the type of values
•broadly classified as alphanumeric, numeric & special field types

FieldType Name Description Type Length Example
CDE Code A 6 Stock Code
DTE Date P 7,0 Date of birth
IGC Idegraphic text A 20 Kanji name
NAR Narrative text A 30 Comments
NBR Number P 5.0 # of employees
PCT Percentage P 5.2 Profit margin
PRC Price or tariff P 7.2 Unit Price
QTY Quantity P 5.0 Stock quantity
REF Reference - - Field based on another
SGT Surrogate P 7.0 System Key
STS Status A 1 Yes/No
TME Time P 6.0 Change Time
TXT Descriptive name A 25 Product name
VAL Monetary value P 11.2 Stock value
VNM Valid system nameA 10 File name

*******************************************************************************

Field Usage:
Two types are Database fields and Function Fields
Database fields:
Code fields (CDE) :- used for key fields e.g. Employee Code.
Data attribute (ATR):- Used for non-key fields e.g. Employee Name.

Function Fields:
Fields used only in functions but do not reside in database, fields can be added to data dictionary and accessed in device designs and action diagrams. There are 6 function field usage types: They are as follows.
CNT (Count)
MAX(maximum)
MIN(minimum)
DRV(Derived)
SUM(sum)
USR(User-defined)

Creating/Defining Fields in Synon In the Object type column of Define Objects panel, enter FLD
Type Field Name in Object Name column
Type Advantage:2E field type in the Object attr column
Type Referenced field if the field refers to another field for domainIn the Field Usage column, type CDE (Code) or ATR (attribute) or a function field usage

Advantage:2E conditions
Specifies the values or set of values a field may takeCondition has a Name, a type and an associated value
1. Value (VAL) Condition
Used to specify single values that status field can taketwo related values: internal value - value in the implemented database external value - value displayed/entered on the screene.g. Premium paid condition has file value “Y”
2. List (LST) Condition
used to specify list of values that status field can takescreen functions implement prompt key (F4)e.g. Invoice Flag can have valid values U, D, P, H, C and the condition Invoice not due has file value “U”.
3. Compare (CMP) Condition
defined in terms of a fixed value and an operatorvalid operators: *EQ, *NE, *GT, *LT, *GE, *LEe.g. Order Quantity field can have an associated condition by name greater than 10 with operator *GT and value 10.
4. Range (RNG) Condition
defines range of values that field can takedefined in terms of From and To valuese.g. Stock Quantity field can have an associated condition by name between 10 and 100 with From value as 10 and To value as 100

Synon 2E Files and its types

Synon Files: 2E file has a name and a file type.

  • Must be valid name.
  • Unique within Model.
  • Upto 25 characters including embedded blanks.
e.g. Product Name.

File Types in Synon:

File Types Attribute Description Example
Database CPT Capture File Order Entry
REF Reference File Company File
Non- database STR Structure File Audit date & Timestamp

Reference Files:- (REF)
Master File that contain non volatile information.
e.g. Product, Employee, Customer.

Capture File :- (CPT)
Contain transactional data that is recorded regualrly.
e.g. Order, Sales.

Strucuture Files:- (STR)
Contain group of fields that can be included in other files using "INCLUDES" relation.
e.g. Audit Stamp File.

Default functions:

  • standard functions are automatically defined for files.
  • default functions depend on file types.

*************************************************************************

Default functions for REF files:

Function Access Path
CRTOBJ - Create Object UPD
DLTOBJ - Delete Object UPD
CHGOBJ - Change Object UPD
SELRCD - Select Record RTV
EDTFIL - Edit File RTV

*************************************************************************
Default functions for CPT files
Function Access Path
CRTOBJ - Create Object UPD
DLTOBJ - Delete Object UPD
CHGOBJ - Change Object UPD

*************************************************************************

Creating/Defining Files

At the Edit Database Relations panel, press F10 to show Define Objects panel

  • In the Object type column, enter FIL.
  • Type File Name in Object Name column.
  • Type CPT or REF or STR in Object attr column depending on the file type.
  • Defined as relation for the file is automatically created.

Thursday, October 16, 2008

The Introduction

Synon is also called as Advantage:2E as for the current version. Synon is a
i) An Application development tool.
ii) Knowledge of programming is not required.
iii) Platform independent application design tool.
iv) Allows efficient design, development, implementation & maintenanec of application software.

To start with Synon applications, add libary and model libraries needed for Synon. (Mostly Y1SY and Y2SY) for Synon and Model libraries in which you have to work, add that too.

Well, Beginning with Menu's in Synon. Synon has three types of users. They are
1) *DGNR
  • Can be said to be Super User of Synon.
  • Files/Access Paths – Read/Write/Change.
  • Functions – Read/Write/Change.

2) *PGMR

  • Files-Read Only
  • Access Paths – Read/Write/Change
  • Functions – Read/Write/Change

3) *USER

  • Files/Access Paths – Read Only
  • Functions – Read Only