Beruflich Dokumente
Kultur Dokumente
Agenda
1. Introduction to SYNON
2. File Types
3. File Relation
4. Relation Entries
5. Creating and compiling files
6. Hands on - Logon and File creation
What is SYNON
An application development tool
Abstract patterns present as building blocks
Automatically generate the components of an
application
Generates sophisticated high-level language
code in RPG or COBOL without any developer
intervention
Also generates the SQL or DDS code to define
the necessary database tables and views.
Features
File Type
Database Files
Reference (REF)
Master files
Relatively static / Non-volatile data
e.g. Product, Employee,Customer
Capture (CPT)
Transaction files
Large volume of data
Frequently updated
e.g. Order
Non-Database Files
Structure (STR)
Has field definitions
Never compiled
Included in other files
Re-use
e.g. Audit Stamp file
File Relation
Defined as
File-to-file relation
Defines a file as existing in the data
model.
2E automatically creates a Defined
as relation when other relations
entered by the user imply a new file
has been defined.
e.g. Employee
Defined as
Employee
Owned by
File-to-file relation
Denotes a parent-child relationship
Primary key(s) of owning file become
part of primary key of the owned by
file
e.g.
Order Detail
Owned by
Order
Known by
File-to-field relation
Declares the field to be present as a
key field on the file.
This relation defines a primary key of
a file.
e.g.
FIL Order
Qualified by
File-to-field relation
Declares a field to be present on a file
as a key field; is used with continuous
variables.
Similar to Known by.
Used to retrieve nearest value
(*Previous/*Next).
e.g. Product Price Owned by Product Code
Product Price Qualified by
Effective date
Refers to
File-to-file relation
Primary key of the referred file becomes
foreign key in the referring file
Allows access to any of the fields on the
referred to file from a referring file
Virtual field is created in the referring file
and cannot be updated from the referring file
e.g. Order
Refers to Customer
For: Ordering Sharing: *ALL
Order
Refers to Customer
For: Invoicing Sharing: *ALL
Refers To - Involution
Self Referencing relation
Eg: Every Employee is assigned to a Manager. A
manager is also an Employee to the Organization
Fil Employee Known by FLD Emp No.
Fil Employee refers to Employee
For Manager
Sharing *None
For field
The For field lets you specify the reason for each
relation.
Refers To - Sharing
The entry in the Sharing field indicates
whether the common keys of the two
relations are to be shared.
*ALL is the default. This field applies only
when the referenced file has more than one
key field entry
Eg: Every Employee has a manager and belongs to a
department
The Manager is also an Employee
The Manager and the Employee should belong to the
same department
Includes
File-to-file relation
File includes all the fields of a
structure (STR) file
e.g.
Product
Includes
Audit Stamp
Has
File-to-field relation
Declares the field as a data field on
the file.
Defines a non-key field, or attribute.
e.g.
FIL Order
Has
FLD Quantity
Extended by
File-to-file relation
Declares a file to be extension of another
file
If used with Owned by relation, the fields
of the extended file are available as
Virtual Fields in the file being extended
New file would be an extension of the
main file.
e.g.
Customer
Extended by
Customer Detail
Part 2 Hands on
Login as Designer
Use Menu Option1 Edit Database Relations to
make changes in the model
Create files for the below mentioned
specification
RACE is Owned by COURSE.
COURSE is uniquely identified by a Course code.
Since RACE is Owned by COURSE, each RACE is
uniquely identified by a combination of the COURSE
at which it is run, a date, and a time.
As a result, the primary key for RACE consists of
Course code, Race Date, and Race Time.
Thank You