Storing data in individual files of databases on local machines that are not integrated in any network is a rather limited approach when designing large and complex applications. To gain flexibility and safety, data can be distributed across several Adabas databases which may reside on different machines. Such distributed data structures can be realized with the Software AG product Adabas Vista.
Distributed data structures for use with Adabas Vista and can be defined in Predict, and the objects necessary to implement the structures physically can be generated from these definitions.
It is important to understand that storing data in the good old-fashioned way (simple files residing in isolated databases on local machines) also establishes a data distribution structure, albeit a very simple one. The description given below therefore also applies to the definition of simple files.
Note:
This section applies exclusively to Adabas files. See the Adabas
Vista documentation for a complete description of this product.
The Software AG product Entire Transaction Propagator can also be used to define distributed data structures.
This section describes how data distribution structures are defined. It covers the following topics:
Adabas Vista offers various options for distributing data across a network.
Storing Data Locally in an Isolated Database
Adabas Vista is not required if data is stored locally in a
single database. In this case, the database is called an isolated database and
the logical distribution type of all files is either simple or expanded.
Distributing/Duplicating Data Across Several Databases
(Adabas Vista)
With Adabas Vista, data belonging to one logical file can be
physically distributed across several physical files (that may reside in
different databases).
Data logically belonging to one file can be split between several physical files. For example: A (logical) file is defined to store information on all customers of a company. Data of customers living in the north is to be stored separately from the data of customers living in the south of the country. The zip code is used as the distribution criterion.
A file with the logical Distribution type partitioned can be used to store data in this fashion.
Storing Data in Remote Databases (Net-work)
With Net-work, data stored in databases on remote systems can be
accessed as if it were stored locally. The use of this product is described in
the documentation of Net-work.
Distributing/Duplicating Data Across Several Databases on
Different Machines
By combining Net-work and Adabas Vista, data belonging to one
file can be distributed across several databases residing on different
machines.
Predict objects of type network, virtual machine, database and file are used to define where exactly data is stored.
Adabas attributes of Predict file objects define how files are implemented in a database, for example partitioned. Adabas attributes document the physical links between files and databases.
Vista elements document the accessibility of the physical files with Adabas Vista.
A: Active P: Passive |
Links between networks, virtual machines, databases and files are defined as follows:
Links between networks, virtual machines, databases are defined with attributes of the respective lower level objects, for example: the link between a network and a virtual machine is defined with the parameter in Network of the virtual machine.
Each virtual machine object must be linked to a network object, and each database object must be linked to a virtual machine object.
Links between databases and files are defined with the function Link children of association "Contains FI".
Information on how files are implemented in a database is stored in the Adabas attributes of file objects.
Adabas attributes can be modified by entering the line command
.A
when editing the file list of a database or with
the file maintenance function Modify Adabas attributes.
Defining the distribution of data is a two-step process:
Define the structure of the data distribution by creating and linking the respective network, virtual machine, database and file objects. See the sections Defining a Network, Virtual Machine and Database Structure and Defining the File Structure.
Determine the accessibility of data by creating Vista elements for physical file definitions. A Vista translation table can be generated from Vista elements. See the section Vista Translation Table in the section Generation in the External Objects in Predict documentation.
Since data can be distributed across several databases, the exact location of data storage has to be specified: each database object must be linked to a virtual machine and each virtual machine must be assigned to one network.
Networks and virtual machines identify the location of databases.
A network contains all virtual machines and databases that are to be accessed. In the case of databases that reside on local machines without any remote databases being connected, a network may in fact identify a local machine.
A network object HOME is provided by Predict.
A Predict object Virtual Machine identifies a machine and operating system environment of databases. A virtual machine represents one Adabas SVC (supervisor call).
Each virtual machine can contain one Transaction Manager used to distribute Adabas calls across the network. However, a virtual machine does not necessarily have to contain a Transaction Manager.
Each virtual machine can contain one or more Vista databases providing access to partitioned data. However, a virtual machine does not necessarily have to contain a Vista database.
A network object has all the standard attributes of Predict objects (for example extended description and abstract) and no type-specific attributes.
A virtual machine object has all the standard attributes plus the type-specific attribute Operating system type.
Note:
Network and
virtual machine attributes are
described in detail in the respective sections of the Predefined
Object Types in Predict documentation.
13:36:38 ***** P R E D I C T ***** 2007-05-31 - Add a database - Database ID ..... DATABASE-TEST +All--------Run mode----------+ ! _ I Isolated ! ! _ L Local ! ! _ V Vista ! Database type .............* A Adabas ! _ ! Belongs to VM .............* HOME ! _ ! Run mode ..................* * Vista ! _ ! Physical database number ..* ! _ ! ! _ ! |
Note:
Database attributes are described in detail in the section
Database in
the Predefined Object Types in Predict
documentation.
Parameters | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Belongs to VM | Associates the database to a virtual machine. Must be specified for all databases except types Conceptual, DB2 and IMS. A default virtual machine can be defined in the profile. See Maintenance Options in the section Predict User Interface in the Introduction to Predict. | |||||||||||||||||||||||
Run mode |
|
|||||||||||||||||||||||
Physical database number | Identifies a database in a virtual
machine and, in the case of databases that can be accessed using Adabas Vista,
in a network.
|
The above diagram shows how data distribution is defined on two levels:
The logical level
The file Test-file has the logical
distribution type partitioned.
The physical level
The data is distributed across the physical files 12 and 13 in
databases 2 and 3. It also exists as physical file 11 of type simple in
database 1 (for example for evaluation purposes).
The diagram shows that files are defined on the logical and the physical file level:
On the logical level
Defining a logical file includes the definition of the fields
in a file. Files of type simple, expanded, partitioned and PROPAGATOR can be
defined on the logical level. See Defining a Logical
File.
On the physical level
The exact physical implementation for the storage of data is
defined. Depending on the logical distribution type, different types of
physical files can be implemented. The following table shows which types of
physical files can be used for files with different logical Vista types. See
Defining
the Physical Implementation of Logical Files.
Logical Level | Physical Level |
---|---|
simple | simple |
expanded | expanded, simple |
partitioned | partitioned, simple |
PROPAGATOR | PROPAGATOR master, PROPAGATOR replicated, simple |
In the first screen that is displayed when you define a file, basic attributes of the file are specified. The parameters that are important when defining files for use with Adabas Vista are described below. See also section File in the Predefined Object Types in Predict documentation.
13:01:26 ***** P R E D I C T ***** 2007-05-31 - Add a file - File ID ......... ADABADA-33 +All---Distribution types-----+ ! _ E Expanded file ! ! _ P Partitioned ! ! _ N PROPAGATOR file ! ! _ ' ' Simple file ! ! _ ! ! _ ! File type .................* A Adab ! _ ! Master file ...............* ! _ ! File number ...............* 123 ! _ ! Logical distribution type .* * Simp ! _ ! Contained in DA ...........* ! _ ! |
Parameters | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
File number | If a database is specified, the file number of the logical file is taken as a physical file number automatically (if this is possible). If not, a free physical number can be selected from a selection window. The file number must be in the range 1 - 32767. | ||||||||||
Logical distribution type |
|
||||||||||
Contained in DA | A link to this database is established. |
A logical file definition does not contain any information on the physical implementation of the file. To specify the physical implementation of a file, a physical file definition has to be added. Physical file definitions are identified by both a physical database number (PDBnr) and a physical file number (PFnr).
The physical database number and a physical file number are specified in one of the following ways:
A database is specified by adding the logical file (with the in database parameter). The PDBnr is taken from the Predict database object. The PFnr is the same as the logical file number (the File number) if this is possible. If not, a free physical number can be selected from a selection window.
By specifying a database ID when adding new physical file in the Select one or more physical files window as described in the next section.
By executing the .A
line command in
the list editor when maintaining the file list of a database object. If a file
is not yet in the database, a new physical file is added.
Note:
If no physical file has yet been defined for a logical file,
the string ** default record ** is displayed in the Select one or more physical
files window.
Physical file definitions are added or modified using the Select one or more physical files window. This window appears when either
the Modify Adabas Attributes Function (Code J) in the File Maintenance menu is executed or
the Additional attributes parameter in the first Add/Modify file screen is set to Y.
The Select one or more physical files window contains a list of all physical files belonging to the logical file.
Physical file definitions are added, modified or purged with one-letter commands in the column Cmd.
Note:
The Select one or more physical files window is also displayed
if the logical file contains only one physical file (as shown in the screen
below).
08:57:25 ***** P R E D I C T ***** 2007-05-31 - Add a file - File ID ......... JPE-PART5 +--- Additional attributes ---+ Type ............ Adabas, Partitioned ! --> Mark one or more ! File number ..... 923 +All--------Select one or more physical file-------+ Contained in DA . HNO-D ! Cmd Database name T PDBnr PFnr ! Keys .. ! ! ! _ ** new ** ! Literal name .......... ! _ HNO-DA-A P 134 125 ! Average count ......... ! ! Stability ............. ! ! Sequence field ........ ! ! Vista Access DBnr ..... ! ! Vista Access Fnr ...... ! ! Adabas SQL usage ...... ! ! Abstract Zoom: N ! ! ! ! +--------------------------------------------------+ ! ! EDIT: Owner: N Desc: N Has Field+-----------------------------+ |
Commands in the Select one or more physical files window | |
---|---|
A | Add a new physical file definition. A can only be entered in the line **new** at the top of the list. The Add command displays a window to enter a physical database ID and subsequently the Modify Adabas Attributes screen. |
M, X or / | Modify the physical file definition. The Modify Adabas Attributes screen is displayed. |
P | Purge the physical file definition. Additional confirmation is requested. The physical file is removed from the file list of the database. |
13:47:38 ***** P R E D I C T ***** 2007-05-31 - Add Adabas attributes - File ID ......... JPE-PART4 +-----Additional attributes-----+ Type ............ Adabas, Partitioned ! --> Mark one or more ! Contained in DA . HEB-DA-3 (PDBnr: 33333) ! attributes ! ! _ Phys. distribution attr. ! Required attributes Ph ! _ Miscellaneous attributes ! Phys. file number ..* 146 ! _ ADAM key definition ! Min ISN ............. 1 ! _ Extent allocation ! Max ISN ............. ! _ Distribution criteria ! ! _ Encodings ! Device Cylinder Blocks Paddin ! ! *----- -------- -------- ------ ! ! ASSO 3380 UI ! ! NI ! ! DATA 3380 DS ! ! ! ! Loading attributes Lo ! ! Max recl. ........... ! ! ISN reusage ......... N (Y,N) ! ! User ISN ........... N (Y,N) +-------------------------------+ Additional attributes ..* N Associations ..* N |
The Additional attributes window that is displayed by entering Y in the Additional attributes field of the Modify Adabas Attributes screen (see screen above) contains two topics needed for defining data distribution:
Physical distribution attributes
Distribution criteria
Both topics are described in the sections Specifying Physical Distribution Attributes and Specifying Distribution Criteria for Partitioned Files below. All general attributes of physical file definitions are described in the section Adding, Modifying and Purging Physical Files.
To specify or modify the Vista attributes of a physical file, select the topic Phys. distribution attr. in the Additional Attributes window. Physical distribution attributes is not contained in the Additional attributes window if no association to a database exists or the logical distribution type is simple.
13:58:35 ***** P R E D I C T ***** 2007-05-31 - Modify Adabas attributes - File ID ......... PD-A-EXP Modified 2007-05-31 at 13:24 Type ............ Adabas, Expanded file by PD Contained in DA . PD-AAA (PDBnr: 28) Distribution attribute Phys. distribution attr. ......* E Expanded file Loading attributes Min ISN ................... 1 Max ISN ................... One AC extent ............. Y (Y,N) |
Parameters | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Type |
The distribution types to be assigned to a physical file. The table below shows which types of physical distribution types apply to different logical distribution types:
|
||||||||||
Loading attributes | |||||||||||
Min ISN | ADALOD LOAD parameter MINISN | ||||||||||
Max ISN | ADALOD LOAD parameter MAXISN | ||||||||||
One AC extent | ADALOD LOAD parameter NO AC EXTENSION. |
The distribution criteria are used as follows:
For files with logical distribution type partitioned, the distribution criteria determine how data is split across several physical files.
Any field of a file can be taken as the distribution criterion. An example: The field zip_code is evaluated. Only if a record has a zip_code starting with 6 (identifying the area around Frankfurt/Main) but equal or less than 61999 is a record to be included into the file. The respective input is shown in the diagram below.
08:13:12 ***** P R E D I C T ***** 2007-05-31 - Modify Adabas attributes - File ID ......... PD-A-PAR Modified 2007-05-31 at 08:12 Contained in DA . PD-A0 by SMR PDBnr ........... 16 PFnr ... 151 Ty Partitioning field F Cs Length Occ D U DB N NAT-l -- *------------------------------- -- -- -------- ----- - - -- - ----- ZIP-CODE N 5.00 AH N 1 Access ....* GE Critical .. (Y,N) Shared Partition .. (Y,N) Part. name . Frankfurt High value . 61999 Zoom: N 1 Access ....* GE Critical .. (Y,N) Shared Partition .. (Y,N) Part. name . Munich High value . 82999 Zoom: N 1 Access ....* GE Critical .. (Y,N) Shared Partition .. (Y,N) Part. name . Hamburg High value . 22999 Zoom: N Additional attributes ..* N Associations ..* N Scroll to: |
For an explanation of the valid parameters and values see Specifying Restrictions on Input Data - Distribution Criteria in the section Adabas Files, File Type A in the Predefined Object Types documentation.
To access data in physical files with Adabas Vista, the file definitions must be contained in the Vista translation table of the Adabas Vista translator database. Exactly one Vista translator database must exist in any Virtual Machine (see also description of the Vista parameter in the section Defining a Database).
Vista translation tables can be generated from Vista elements defined in Predict. See Vista Translation Table in the section Generation in the External Objects in Predict documentation.
Vista elements on file level are defined with the file maintenance functions Add/Modify Vista elements.
Vista elements on database level are defined with the database maintenance functions Add/Modify Vista elements.
The function uses the following screen:
13:30:02 ***** P R E D I C T ***** 2007-05-31 - Add Vista element - File ID ......... HNO-FI-V Added 2007-05-31 at 13:30 Type ............ Adabas, Partitioned by HNO Network ........* HOME Simple .......... Y (Y,N) Partition ID assignment ..* V Vista Vista Max number of partitions .. 255 Environment ID . Enable Read-by-ISN ........ Y (Y,N) DBnr ........... Part. file concurrency .... 8 Fnr ............ Store control option .....* 1 Reject Name ........... HNO-FI-V Database PDBnr PFnr Criterion *------------------------------- ----- ----- ------------------------------- 1 Additional attributes ..* N Associations ..* N Scroll to: |
Parameters | |||||
---|---|---|---|---|---|
Type | Type of the logical file (for example Adabas,
Partitioned). A read-only field.
Note: |
||||
Network | The Vista element is available throughout the given network. | ||||
Simple |
|
||||
Environment ID | The Vista element can be used exclusively by the given environment. If, for example, a data administrator wants to access a file for administration purposes, he might create a Vista element for his privileged use. | ||||
DBnr | Database number used for access from the application. This number is translated into the PDBnr by Vista. | ||||
Fnr | File number used for access from the application. This number is translated into the PFnr by Vista. | ||||
Name | Name of the translation element in Vista. | ||||
Database | Database containing the physical file. | ||||
PDBnr | Physical database number. | ||||
PFnr | Physical file number. | ||||
Criterion | Name of the distribution criterion. |
The Vista element attributes Network, Environment ID and Vista numbers together identify how a Vista element can be used. These attributes are also referred to as the Vista Key. The following rules apply:
Environment ID and Vista numbers must be unique for each Vista element within each network.
If the parameter Unique DBnr/Fnr in the Predict defaults is set to Y, Environment ID and Vista number must additionally be unique throughout all networks.
The function Vista number (code N) in the Network Retrieval Menu can be used to determine how Vista numbers are referenced in databases, physical files and Vista elements. See the section Network in the Predefined Object Types in Predict documentation.
Predict generation, incorporation and comparison functions can be applied to data definitions under Adabas Vista. The following functions are designed especially for maintaining Vista translation tables:
Generation of Vista translation tables (command:
GENERATE STARTAB
)
Incorporation of entries in Vista translation tables as Vista elements of Predict database and file objects of type A with the function Incorporate Adabas Database/File. Incorporating Vista elements requires that either a Predict file object for the implemented physical file does not exist, or an existing Predict file object has the correct physical distribution type.
Comparison of Vista translation tables with Adabas file
definitions in Predict (command: COMPARE
VISTA-FI
).
Using the above functions requires the following:
An interface that is provided with Adabas Vista Version 7.4. If you want to use this interface together with Adabas Vista Version 7.3, please contact Software AG.
LFILE 152 must be set and must point to the Vista system file.
For detailed descriptions of the above options see the respective parts of the sections Generation, Incorporation and Comparison in the External Objects in Predict documentation.