Method and system for migrating data6151608Abstract Method and system of the invention migrate data from one or more ASCII files and/or from one or more relational databases to one or more relational database tables without the need to write code. In doing so, the invention allows the user to define mapping templates and conditionals to assist in translating and transforming data values. The invention also enforces referential integrity, data dependencies, order of operations, and uniqueness constraints using a predefined set of migration rules templates that are based on the principles of relational design. The invention uses these mapping and migration rules templates to intelligently generate instructions for updating or populating relational database destination tables. The instructions control the data transfer, data translation, data transformation, data validation, foreign key insertion, and the addition of required codes and flags in the destination tables. A migration engine of the system includes a data map architect and an update processor which spawns the templates and migrates the data dynamically, utilizing the data definitions for the destination tables. In addition to supporting conversion efforts, the invention provides support for performing consolidation, restoration from an archive, migration to new instances, upgrading to a new release, adding bolt-ons and enhancements, and changing business requirements. The audit trail in the invention is complete enough that the entire migration process can be reversed without compromising the integrity of either the source or the destination application. Claims What is claimed is: Description TECHNICAL FIELD
______________________________________
Company
Product Functionality
Limitations
______________________________________
SMART Smart DB Transforms and
Performs no other function
Corp. maps legacy except conversion, and then
data to new only translates and
application. transforms the values of the
Generates data.
and executes The product maps table to
SQL code to table, rather than
insert, update, understanding the
or delete relationships in the entire
data. Graphi- application. It can only
cally joins accommodate data that
tables and originates in one table with
views. Manipu- a single destination table.
lates data val- Does not enforce referential
ues among integrity, data dependen-
multiple tables. cies, uniqueness con-
straints. Does not provide
patterns, pre-defined migra-
tion rules. Audit Trail not
complete enough to reverse
transactions.
Some pre-defined templates
are provided for Oracle
Applications .TM.. Requires
recoding, and new template
definition for new or
updated versions of the
destination tables.
Constellar Constellar Ongoing moving Requires expert knowledge
Corp. Hub of transaction of programming languages
and operational (Cobol, SQL, C) and
data to and from Oracle7 .RTM. architecture.
legacy systems Does not appear to enforce
into databases referential integrity, data
(Oracle, DB/2, dependencies, uniqueness
Informix, IDMS) constraints. Performs no
and files. Popu- functions other than
lating and refresh- conversion and data
ing of data ware- mining. Does not provide
houses. Generates patterns, pre-defined migra-
C, Cobol and tion rules. Requires recod-
Pro*C source ing for new or updated ver-
code. Uses Trans- sions of the destination
formation Defini- tables. Does not come
tion Language to seeded with data particular
create business to Oracle Applications .TM.,
rules to filter or with predefined migra-
data. Supports tion rules.
data dictionary
and CASE reposi-
tories in the
transformation of
data. Constantly
sits on network
and manages data
flow.
Oracle Data Stores data in a DCT has no drivers or
Corp. Conversion central repository. control files specific to
Tool (part of Manages data Oracle Applications .TM..
Enterprise conversions by DCT has no predefined
Data generating code rules for migrating data and
Management to map data maintaining relational and
System) from legacy data integrity. The user
(DCT) systems to must specify the order of
Oracle .RTM. data- the conversion execution.
bases or from DCT alone does not enforce
Oracle to a flat referential integrity, data
file. DCT mines dependencies, or unique-
transactions for ness constraints.
data warehouse DCT requires extensive
and data marts programming expertise in
and performs an SQL and PL/SQL to define
actual extract of the conditions of data
legacy data. Uses transfer, and to create the
gateways for non- load packages.
Oracle systems to DCT requires knowledge of
create extracts of relational database
legacy data. DCT architecture and the design
can convert flat of the destination system,
files to relational and knowledge of the
tables, or tables to SQL*Loader utility's
flat files. concepts and features to
define the migration
process. Performs no other
function except conversion.
Does not provide patterns,
pre-defined migration rules.
Only supports conversion to
a single destination table
for each result. In other
words, for a source to load
more than one destination
table would require the user
to define separate conver-
sion groups and create sep-
arate SQL scripts. Does not
support one-to-one or
many-to-one transforma-
tions within a single con-
version group. The DCT
user must write and test his
own SQL scripts and
PL/SQL packages for
transformation of the
data. The user must
also create the required
cursors for each group. The
user creates a script that
executes the stored
procedures and passes the
needed parameters to
schedule and control the
migration process. For a
file based conversion, the
control script must also
FTP the files to the desti-
nation system and then exe-
cute a SQL*Loader process
to perform the data load.
Chain Chain Link Manages multiple Only migrates a small set of
Link Object instances of the Oracle Application Object
Tech- Migrator Application Ob- Library .TM. tables.
nologies, Chain Link ject Library .TM. Performs no other function
Inc. Migration tables across mul- except
migration to differ-
Manager tiple Oracle .RTM. ent database instances.
RDBMS environ- Does not provide patterns,
ments (produc- pre-defined migration rules,
tion, test, deve- translation, or
lopment, etc.) transformation of data.
Migrates data Requires recoding for new
from Application or updated versions of the
Object Library .TM. destination tables.
tables to different
Oracle database
instances.
Rockport Conversion The Conversion Conversion Toolbox does
Software, Toolbox Toolbox performs not provide for generation
Inc. conversion of of data translation or trans-
data from a formation instructions. It
legacy system in- allows a user to change val-
to selected Oracle ues (e.g. from doz. to doz-
Applications .TM. en), but does not provide
tables. The pro- any rules or conditionals for
duct also claims doing so. The user merely
to be able to sup- indicates the new value
port two way in- (field-by-field) to be moved
terfaces, and sup- to the destination tables.
port changes to The mapping facility of the
the accounting Conversion Toolbox is lim-
flexfield, al- ited and allows only for sin-
though the latter gle source to a single desti-
functionality was nation table translation. The
not complete in actual values in the source
the version of the are not displayed on the
software evalu- screen within the software.
ated. The soft- The user must define the
ware dynamically translated values based on
generates driver prior knowledge of the leg-
tables to migrate acy system's data. The
the data and vali- Conversion Toolbox can
date data depen- only be used for convers
dencies. It allows ions and table-to-table map-
for translation of ping. Conversion Toolbox
values and addi- has no predefined tem-
tion of new re- plates. Does not provide
quired data to in- patterns, predefined migra-
termediate tables. tion rules. Audit Trail not
These driver complete enough to reverse
tables provide transactions. Does not en-
generic migration force referential integrity,
instructions to uniqueness constraints
the toolbox. In without significant user
other words, the input. Performs no other
Conversion Tool- function except conversion.
box allows the
user to create
templates to gen-
erate the migra-
tion instructions.
These migration
instructions use
predefined driver
tables to move
the data from the
source to the des-
tination. The
Conversion Tool-
box uses a single
intermediate table
to translate and
transform the
U.S. Pat. No. 5,596,746 discloses a method and system to transform relational data models into object models (input and output to modeling tool). The invention has the following features: User must have a database design; Generates SQL Code; Uses graphic depiction of entity relationship model rather than the unique identifier; Creates data dictionary; Stores tables and data models rather than dynamically creating insert records; Creates the data model rather than populating the tables with new data; User needs to input primary keys; Populate refers to insertion of object name (such as table and column names) rather than load data. U.S. Pat. Nos. 5,566,332; 5,416,917; and 5,278,978 disclose inventions which refer to transferring data between dissimilar hardware environments. The transfer is only between two relational database management systems. They deal with the types of storage on different machines (e.g. whether numeric data is physically stored in a low to high order sequence or a high to low sequence). They are based on machine and system descriptors to establish links between two relational database systems. U.S. Pat. No. 5,379,419 discloses a method and system to decode relational queries into a set of common data file commands to retrieve data in non-relational formats. SUMMARY OF THE INVENTION An object of the present invention is to provide a method and system for migrating data without writing any code but rather using migration rules and the use of patterns to translate and transform the data to be mapped. The invention dynamically employs the rules and patterns which enforce referential integrity, validate data dependencies, check for uniqueness constraints, ensure that mandatory fields are populated, and verify the format of the data before the data is loaded into the destination tables. The invention uses patterns and conditionals to accommodate all of the different translations and transformations of data. The invention allows for population of any relational database tables as the destination. Using level coding, the invention is able to automatically sequence the loading of data so that referential integrity of the destination is maintained. The invention knows the data schema of all the Oracle Applications.TM. tables (in contrast to the Conversion Toolbox which has driver tables for a small subset of the major Oracle Applications.TM. tables) and has the migration rules and dependencies predefined. Using the invention, multiple migration rules and data translation and transformation patterns are applied to a source so that multiple records and tables can be updated simultaneously and in the proper sequence. The Conversion Toolbox, on the other hand, requires the user to define templates on a field-by-field basis. The invention also allows for the definition of new destination tables. In addition to supporting conversion efforts, the invention provides support for performing consolidation, restoration from an archive, migration to new instances, upgrading to a new release, adding bolt-ons and enhancements, and changing business requirements. The audit trail in the invention is complete enough that the entire migration process can be reversed without compromising the integrity of either the source or the destination application. In carrying out the above object and other objects of the present invention, the invention provides an automated computer-implemented method for migrating source data from at least one source to at least one destination table of a database having a schema without a user having to write computer code. The method includes the steps of defining patterns which describe format and content of the source data, applying the patterns to the source data to create transformed data and associating migration rules based on the schema with the patterns to generate a set of instructions that define migration paths. The method also includes the steps of loading the transformed data in a sequence into the at least one destination table based on the set of instructions, the at least one destination table having a defined format and field. The method further includes the step of loading the data from the at least one source into at least one temporary table having source and destination fields. The at least one temporary table is a relational database table. When the at least one source is an ASCII file, the method further includes the steps of creating an extract table with the data from the at least one source and loading the extract table into the at least one temporary table. When the at least one source is a relational database table, the step of loading the data from the at least one source includes the step of automatically loading the relational database table into the at least one temporary table. The method preferably includes the steps of associating the source fields with the destination fields based on the schema and creating templates for transforming the data from the at least one source based on the schema to obtain the transformed data. The method also preferably includes the steps of creating at least one intermediate table having a format and fields and linking the at least one temporary table and its fields with the at least one intermediate table and its fields. The format and the fields of the at least one intermediate table are substantially identical to the format and fields of the at least one destination table. The transformed data is utilized to populate the at least one intermediate table. The step of creating the templates can be performed interactively with the user. The templates include data migration patterns and logical operators to provide instructions for translating and transforming the data from the at least one source. The patterns may include a transfer mapping pattern, a monovariate translation pattern, a multivariate concatenation translation pattern, a multivariate reverse concatenation translation pattern and/or a multivariate transformation pattern. The step of generating the set of instructions is preferably based on the templates and the database schema and the step of loading the transformed data includes the step of moving the data from the at least one source to the at least one temporary table where it is translated and transformed and then to the at least one intermediate table for validation and correction to obtain validated and corrected data. The method preferably further includes the step of grouping the templates into batches. The data base is preferably a relational data base and the at least one destination table is a relational database table. Preferably, the step of loading is automatically sequenced so that referential integrity is maintained. Preferably, the data may be migrated from a plurality of sources. Preferably, the transformed data loaded into the at least one destination table may update or add to records already in the at least one destination table. Further in carrying out the above object and other objects of the present invention, a computer system is provided including a migration engine for migrating data from at least one source to at least one destination table of a database having a schema without a user having to write computer code. The migration engine includes a data map architect and an update processor for carrying out the above-mentioned steps. The data map architect, for example, provides: 1. Definition of mapping patterns for transferring, translating, and transforming the format, content, and characteristics of source data including: a) Transfer Mapping; b) Monovariate Translation; c) Multivariate Concatenation Translation; d) Multivariate Reverse Concatenation Translation; and e) Multivariate Transformation. f) Parsing, combining, adding to, or changing the format or content of the source data. g) Specification of constraints or conditions under which these mapping patterns apply. i) Applies IF-THEN-ELSE logic to automatically generate destination values. ii) Applies conditionals to multiple records simultaneously. h) Association of source data with the format, content, and characteristics of the destination data. i) Analysis of the patterns and conditionals defined for logical application to the source data. 2. Generation of migration instructions that utilize the mapping patterns for moving data from one or more source tables to one or more destination tables. a) Validates that mandatory fields are populated. b) Adds additional data required by the destination. c) Determines where to put source data that doesn't have a corresponding field in the destination. The update processor, for example, provides: 1. Definition of rules that check for uniqueness constraints, verify data dependencies, enforce referential integrity, and specify order of operations for moving the data into the destination system wherein: a) Rules are based on pre-defined hierarchies or nesting of relationship in the destination system. b) These rules control the migration process. 2. Aggregation of mapping patterns into templates that provide instructions to transfer, translate, or transform the source data. a) Definition of hierarchies of templates based on principles of relational database design. b) Grouping of templates together to move a particular type or types of data. c) Iterative processing of the mapping patterns until all of the source data has been transferred, translated, or transformed. 3. Creation of batches of templates and rules to populate destination tables. a) Addition of control fields to batches to maintain audit history of transaction processing. b) Ability to schedule the running of batches and specify the order of processing. 4. Utilization of the templates and migration rules to derive values that populate the destination tables. 5. Verification of the integrity of the destination data prior to loading into the destination tables. a) Checks uniqueness constraints. b) Validates population of mandatory fields in the destination system. c) Confirms that data dependency requirements are satisfied. d) Enforces referential integrity. e) Maintains a logical order of operations in application of templates and rules. 6. Trial runs of the data migration, identification of errors, and correction of potential errors before committing the data to the destination tables. a) A transaction report identifies errors. b) The transaction report notes errors that fail uniqueness, data validation and violate dependency rules. c) No records containing errors are written to destination tables. d) Individual or mass corrections. i) Identify a specific record to change or browse through all error records in the batch, making changes as desired; and ii) Correct all occurrences of an error in one step; e) A change history of corrections is made so that the data in the destination remains consistent with that in the source and an audit trail is maintained. f) The entire migration process can be reversed so that the destination data remains intact and in the same condition as before the migration took place. 7. Definition of parameters and rules to allow for either the insertion of new data or the update of existing data into the destination system. The method and system of the present invention generally: Allow for the consolidation of data into a single destination system from multiple source systems. Include changing or modifying the content, format, or characteristics of data as business requirements or systems change. Restore archived data to a current database. Migrate data from one database instance or installation to another. Integrate enhancements, bolt-ons, and modifications to a relational application. Convert data from a legacy system to a new system. Consolidate multiple installations of a subledger into a multiorg environment. Support the consolidation of systems to support mergers or acquisitions. Add additional data or populate multiple tables simultaneously. Migrate data from a development, to a test, to a training, or to a production environment, without having to reconfigure the setup parameters each time. The computer-implemented method defines new destination tables and automatically generates the migration rules for these new destination tables based on predefined patterns. The method and system of the present invention also generally: Allow for definition of data dependencies in the destination. Allow for definition of primary keys, check constraints, and uniqueness in the destination that maintain constraints to ensure the data integrity of the destination tables. Allow for definition of relationships and foreign keys in the destination that, in turn, allow for maintaining referential integrity. Allow for assigning order of operations to the processing of templates by using level coding algorithms for relationships that identify those destination tables with the fewest relationships to populate first, and progressing sequentially through the more complex relationships. Provide for definition of seeded data that identifies data and referential dependencies within Oracle Applications.TM.. Allow the characteristics of every Oracle Applications.TM. table to be pre-defined. Preferably, all of the patterns and migration instructions are table-driven and require no coding from the user.
______________________________________
Definitions
______________________________________
Batch A group of template-generated data and
migration rules that are uploaded into
the intermediate or destination tables
simultaneously.
Conditionals Rules that define how data is to be
translated or transformed prior to load-
ing in destination tables.
Data The value of the data in one field is
Dependency dependent on the value of the data in
another field.
Data Map The part of the invention that prepares
Architect the source data and establishes the
mapping constraints on the format and
content of the data to be migrated from
the source to the destination.
Data Migration Pre-defined templates based on the knowl-
Rules edge of the Destination tables that
enforce template order, migration load
sequence, referential integrity, unique-
ness constraints, and data dependencies.
Destination A group of destination tables linked
Application through data relationships. Pointers in
the application designate locations of
related destination tables through use of
the unique identifiers of those tables.
Destination A table within a database such as an
Table Oracle database to which data is migrated
using the invention. The characteristics
of the Destination Tables dictate the
migration rules the invention follows to
populate the data.
Intermediate A database table such as an Oracle table
Table into which the source data is loaded in
order for the invention to add migration
or transformation batch control fields.
The invention uses an Intermediate Table
to manipulate the data prior to moving
that data into the Destination Tables.
The format and fields in the Intermediate
Table are identical to those of the
destination table.
Level Coding Process to locate and update records by
which the tables with no foreign key
relationships are populated first, then
the table with a single foreign key to
the first table is populated, building up
until the tables with multiple different
foreign key relationships are populated
and the relationships are maintained
throughout the destination application.
Pattern Description of the relationship type that
the Migration Engine uses to create rules
that enforce referential and data integ-
rity as it moves data from the Source to
the Destination.
Mapping The process used by the invention to
match the data values, the data format,
and the context of the data, between the
source data and the destination table.
Migration Transfers, translates, and transforms the
Engine format and content of data values from a
Source Application to the format and
characteristics of the values required by
the Destination Application. Applies
mapping templates and utilizes intelli-
gence about the destination tables, the
relationships among the data, the unique
identifiers of the data, the validation,
and data dependencies required in the
destination tables to create a set of
migration rules. Populates destination
tables by generating defined migration
paths.
Monovariate The value A in Source Field is translated
Translation into a different value in Destination
Pattern Field. Monovariate Translation Pattern
changes the format of a value or a con-
stant in the Source to a new format or
value in the Destination. This transla-
tion occurs 100% of the time.
Multivariate A Multivariate Concatenation Translation
Concatenation Pattern derives a single Destination
Translation Value from multiple Source Values.
Pattern
Multivariate Multivariate Reverse Concatenation pat-
Reverse terns take one field from the Source and
Concatenation create many fields in the Destination
Translation Tables. This Pattern usually occurs when
Pattern a value represents a concatenated value
in the Source.
Multivariate A Multivariate Transformation derives
Transformation multiple Destination Values from multiple
Pattern Source Values.
Referential Maintenance of the foreign key informa-
Integrity tion for a relational database. FIG. 2
shows a foreign key relationship.
Schema The definition or description of the
logical structure of a database such as
attributes (fields) and domains and
parameters of the attributes. The schema
determines the migration characteristics
of the destination.
Sequence The order in which update instructions
Rules and templates are applied to a destina-
tion table by the invention. Since tem-
plates can overwrite the previous value
in a field, applying templates out of
order can affect data integrity. Se-
quencing allows the user to control the
ending values.
Source Data The original data either in an ASCII file
or a table of a database such as an
Oracle table. This data will either be
migrated to or transformed into the
destination table by the invention.
Template Groups of values, patterns and rules that
provide instructions to the update Pro-
cessor. The invention copies template-
generated values to corresponding fields
in a destination table. The invention
allows for application of templates
across multiple records simultaneously.
Template The invention orders the application of
Order the generated templates using principles
of relational database design in a se-
quence to maintain the referential and
data integrity of the migration process.
(Also see Sequence Rules.)
Transfer The value A in Source Field is inserted
Mapping into the value A in Destination Field.
Pattern This data is in the same format in both
the Source and Destination. No changes
are required.
Update Utilizes the templates created with the
Processor Data Map Architect to generate a set of
instructions that define migration paths
from the source data to the destination
tables and populate the destination
tables.
Validation The process used by the invention to make
sure that resulting data values are among
the range of valid values in the destina-
tion application.
______________________________________
The above object and other objects, features and advantages of the present invention are readily apparent from the following detailed description of the best mode for carrying out the invention when taken in connection with the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWING FIGURES FIG. 1 is a schematic diagram of a traditional prior art data conversion approach; FIG. 2 is a schematic diagram which assists in the definition of referential integrity; FIG. 3 is a schematic diagram which shows the major features of the invention; FIG. 4 is a block diagram flow chart which shows the migration process; and FIG. 5 is a block diagram flow chart which shows a consolidation process. BEST MODE FOR CARRYING OUT THE INVENTION In general, the method and system of the present invention relate to the migration, conversion, consolidation and restoration of data. More particularly, the invention relates to an automated computer-implemented method and computer system that assists users to convert to new Oracle-based applications, to change the configuration of those applications, to operate those applications in a distributed environment, to interface with related applications, to consolidate data from different database instances or different applications, or to restore archived data into a current database without creating code. The method and system of this invention simplifies data migration by automating processes required to update or insert data into Oracle tables without coding. The core technology used in the invention is called the Migration Engine. The Migration Engine has two major components: the Data Map Architect and the Update Processor. Each of these are described below with reference to FIGS. 3 and 4. A. Data Map Architect The Data Map Architect prepares the source data and establishes the mapping constraints on the data to be migrated. It does this by using a three step process: load the data into an Oracle temporary table, associate the source fields with the destination fields, and create templates that translate and transform the data into the format required by the destination system. 1. Load Data into a Temporary Table There are two approaches to loading the data into a temporary table depending on whether the source data is in an ASCII file or whether it resides in another Oracle table. For data originating from a non-Oracle source, the invention provides a format for an ASCII file into which the user can extract data from a non-Oracle source and use SQL*Loader to insert the data into an Oracle temporary table. Before this invention, the user had to write validations, translations, and change the format of the data as part of coding the SQL*Loader script. Using the invention, however, the user only needs to create an extract table and dump it into the temporary Oracle table. For source data originating in an Oracle table, the invention uses an automatic upload process to load the source table to the temporary table. The format and characteristics of the data in the temporary table do not matter since the invention will later reformat the data to fit into the destination table. 2. Associate Source Fields with Destination Fields The Data Map Architect provides a format to associate the data in the source system (which now reside in temporary tables) with the data in destination system. The Data Map Architect uses knowledge about the characteristics, structure, and format of data in the destination tables to facilitate the match between the source data and the destination table. Based on the characteristics of the destination table, the Data Map Architect creates intermediate tables. The tables and fields of the temporary tables are linked to the tables and fields of the intermediate tables which are identical to the tables and fields of the destination tables. 3. Create Templates for Data Mapping The Data Map Architect allows the user to interactively create templates to govern mapping, translating, transforming the data in the fields of the source data to the fields in the destination table without coding. These templates use predefined data migration patterns and logical operators to provide instructions that translate and transform the source data into data with the same characteristics and format of that in the destination tables. The templates identify the migration or transformation parameters that control the movement of data to a specific destination table. B. Update Processor The Update Processor utilizes the principles of relational database design to enforce pre-defined Data Migration Rules templates. Using an aggregation of the pattern templates created by the Data Map Architect, the Data Migration Rules templates, and intelligence about the structure of the destination tables, the Update Processor dynamically generates and spawns a set of instructions that manipulate the data and move it from the temporary tables to the Intermediate Tables and ultimately to the Destination Tables. The Update Processor groups the templates into batches, adds fields for processing control, and creates and maintains control files that monitor the data migration process. Because the Update Processor already knows the data schema of the destination tables (including required validations and dependency rules of the destination tables), the invention defines template dependencies, creates template hierarchies, and sequences templates to be run. A template dependency stipulates that one template cannot be run until prerequisite templates are run (e.g. The Data Migration Rules know that a template that enters account distributions can not be run until the template that populates the account value tables is run). The invention has patterns for defining new destination tables that the user can apply. A user can define new destination tables if the relationships and keys are known. The user defines the new destination to the invention and the invention automatically generates the appropriate migration rules. The invention has pre-defined template hierarchies or the user can create case-specific parent-child templates. In other words, a template for a vendor hierarchy might include child templates for vendors, vendor addresses, and vendor contacts that would all be run together. The user can specify a order in which the batches are run and can schedule a time for the batch run or can schedule periodic batch runs (9:00 a.m. every Monday for three months). Utilizing batches allows the user to optimize performance and also to reduce the resource contentions during peak times. When the batch is run, the Update Processor uses the templates (created by the Data Map Architect) to generate values to populate the intermediate table. The templates provide translation and transformation parameters. The invention uses generic rules and variables to enforce data and referential integrity, to verify uniqueness, and to sequence the data load. The Update Processor substitutes the specific parameters created by the templates for the many generic variables already defined in the invention to align with the characteristics of specific Destination Tables. Based on the templates, the Update Processor populates values in the Intermediate Table from those in the temporary table. This is an iterative process that results in all of the records from the source system being translated, transformed, or migrated into the destination application in a defined sequence. The parameters and procedures embedded within the Data Migration Rules templates validate data, verify uniqueness constraints, enforce data dependencies, and maintain referential integrity (foreign key relationships). If the data passes all of the tests of the Data Migration Rules templates, the Update Processor loads it into the intermediate tables for user review and correction. Records that do not pass the tests are loaded into an error file for correction and resubmission. Finally, the Update Processor passes the corrected data to the final destination tables. For each upload batch, the Upload Processor tracks the batch number, the batch date, the record count, the items added, and error items. The Update Processor maintains an audit trail of the upload function so that the upload process can be reversed if necessary. Methodology and Logic The logic behind the Migration Engine accommodates the universe of possible data modeling relationships in mapping Source Data to Destination Data. The invention has predefined pattern templates to assist with the mapping of each of these relationships. The methodology is to separate the Source Fields into a series of data patterns for these logical relationships. These relationship patterns are described below with examples.
______________________________________
Migration
Relationship Engine Pattern
Type Name Explanation/Example
______________________________________
One-to-One
Transfer The value A in Source Field is inserted as
(1:1) Mapping the value A in Destination Field. This data
is in the same format in both the Source
and Destination. No changes are required.
Ven-Name in Source = VENDOR.sub.--
NAME in Destination.
Source Value "Smith" Destination Value
"Smith"
One-to-One Monovariate The value A in Source Field is translated
(1:1) Translation into a different value in Destinatio
n Field.
Monovariate Translation Pattern changes
the format of a value or a constant in the
Source to a new format or value in the
Destination. This translation occurs 100%
of the time.
Unit-of-Measure in Source =
UNIT.sub.-- OF.sub.-- MEASURE in Destination.
"DZ" in Source Field "DOZ" in
Destination Field.
Many-to- Multivariate A Multivariate Concatenation Translation
One (M:1) Concatenation Pattern derives a single Destination Value
Translation from multiple Source Values.
"Accounting Code Combination" in the
Destination might be derived from the
combination of "Segment.sub.-- 1",
"Segment.sub.-- 2, " and "Segment.sub.-- 3" in the
Source Table.
One-to- Multivariate Multivariate Reverse Concatenation
Many (1:M) Reverse patterns take one field from the Source
Concatenation and create many fields in the Destination
Translation Tables. Source Item Number "R075"
might create a color code value of "Red"
in the Destination Field "Color" and a
Item Number of "075" in the Destination
Field "Item Number"). This Pattern
usually occurs when a value represents a
concatenated value in the Source.
Many-to- Multivariate A Multivariate Transformation derives
Many (M:M) Transformation multiple Destination Values from multiple
Source Values. A vendor having multiple
addresses that is listed as separate vendor
records in a Source application may be
translated to a single vendor record in the
Destination with multiple sites. This
Pattern can also be used for many-to-one
transformations instead of Multivariate
Concatenation Translation when the
Source fields interact to derive the
Destination data, such as multiplying
number of units by unit price in the Source
to get a total cost value in the Destination.
______________________________________
The Migration Engine allows a user to specify constraints or conditions under which each of these relationship patterns apply to the Source data. The invention allows the user to associate the Patterns to the Source Data and then the Migration Engine derives the resulting data on the destination tables. (e.g. if a "date created" value on a Source invoice record is more than ten years ago, the user would specify a Monovariate Translation Pattern to assign the invoice record a status of "inactive" on the Destination Table). Conditionals are specified as an IF THEN, ELSE logical algorithm which the user defines in the Data Map Architect component of the invention for each Source Field. The conditionals apply mathematical operators of "Equal to", "Less than", "Greater than", "Less than or equal to", "Greater than or equal to", "Between" and variables such as "Null" or "Not Null" to the conditionals. The Data Map Architect allows the user to specify "AND" and "OR" conditions as well. Translation Functions (Left Pad, Right Pad, Left Trim, Right Trim, Decode, Convert to Date, Convert to Number, Change to Upper Case) are also available to insert into the Conditional. The values to be operated on by the conditionals can be a constant, a variable, a range of values, values in another field, a random number, or an arithmetic operator. The Data Map Architect links the Relationship Patterns and conditionals together to support the user in associating the values in each Source Field with the correct values in the Destination Field. It does this by processing the values and operators in each of the defined conditionals to prescribe the Mapping, Translation, and Transformational Rule Patterns listed above. The Update Processor applies the patterns that are defined in the Data Map Architect and creates Templates that control the content and format of the data in the Intermediate and Destination Tables. The Update Processor initially applies these templates to the data in the temporary tables to move the data to the Intermediate tables. All of the manipulation of data occurs in the Intermediate table. It is then tested, corrected by the user as needed, and moved as is to the Destination Table. The Migration Rules templates are based on the characteristics of the data and the relationships that exist in the Destination system. Through the Migration Rules Templates, the Update Processor enforces the rules of relational design including referential integrity (maintenance of foreign key relationships), validation of data dependencies, uniqueness, and order of operations, as the data is migrated to the Destination Tables. Features of Invention FIG. 3 shows the major features of this invention. Each of these are explained in further detail below: Migration Engine The Migration Engine has two component parts: the Data Map Architect and the Update Processor. The Migration engine uses the patterns and conditionals of the Data Map Architect to define the instructions for translating or transforming the data. The Update Processor automatically generates these instructions, and, using predefined Migration Rules, populates the Intermediate Tables. Data Map Architect The Data Map Architect provides a format for identifying the characteristics of the source data. The invention allows the user to determine whether the data is to be transferred unchanged, or whether the data must be changed before migrating to the destination. The invention employs pattern recognition techniques to determine the required changes. If the data is to be changed, the Data Map Architect provides a format for specifying the conditions of change, the changed value, the translation parameters, or the transformation algorithm. These patterns are aggregated into templates that allow multiple conditionals to be applied and multiple records to be updated simultaneously. The invention verifies the changed data and ensures consistency with the data of the destination table. Update Processor The Update Processor identifies the characteristics of the destination tables that will be updated, designates the fields within the destination tables that will be validated, and retrieves the proper foreign key relationships. The templates are read to develop data migration paths to destination tables automatically. The invention identifies migration parameters that will control the movement of data to a specific destination. The Update Processor creates or adds to existing records and inserts them into the destination tables. Utilizing this invention requires no knowledge of programming languages, database architecture, or SQL code. Migration rules for new destination applications will be created by identifying the schema definitions of the new destination. Batches Templates are aggregated into Batches for processing. These batches can be scheduled to run at a predefined time. The invention allows a Batch to be reversed so that the user can return the data to its original state before data was loaded. Dependency Checking The invention automatically tests to see whether the values stored in various columns within each record are logically consistent with one another. All data dependency checking is table driven rather than utilizing complex SQL logic or programming. Mandatory Data The invention verifies that all mandatory fields in the destination have been populated. Migration Rules The invention has predefined migration rules to enforce referential integrity and determine the order of operations. The invention uses level coding to determine the proper sequence of loading the data into the destination tables. A level coding algorithm used to enforce referential integrity in a destination system is defined as follows: Identify all tables involved in migration (original tables). Identify all foreign key constraints in the destination system. Insert a record for the table name of all tables for which the original table is a foreign key for another table in a foreign key column. (This will usually be a one relationship on the original table and a many relationship for the table on which the original table is a foreign key in the physical database schema). Sort the records in the foreign key column on table name. Count the number of foreign key relationship records for each table. Assign a sequence number of 1 to the table used most often in a foreign key relationship. Continue assigning a sequence number to the tables, going from the most number of relationships to the least number of foreign key relationships. Populate those tables with the most foreign key relationship (having the sequence numbers beginning with 1) records first. Locate those tables that have a relationship with the tables that were populated initially and assign the next sequence number. Proceed iteratively in sequence number order until all tables in the migration used as foreign keys are populated. Finally, populate those tables which do not have foreign key references to other tables until all tables have been populated. Proper sequencing of the database load allows related records in different tables to point to one another. Patterns The invention defines patterns that accommodate the principles of relational design. The user defines these patterns by stating values in conditional patterns. These patterns are combined into templates to assist with the mapping of each of the source fields to the destination fields. These conditionals are applied to the definition of these patterns so that the invention can generate migration instructions. Templates The invention's use of templates for all destination tables allows a user to perform mass changes to existing tables without writing SQL programming scripts. Templates are made up of many patterns and rules. The invention allows for the application of templates to multiple records without programming. Uniqueness Constraints The invention has predefined rules to enforce uniqueness constraints. The invention requires no coding to verify that an inserted value is unique. Validation The invention generates validations automatically. The invention validates the data prior to the update to the destination tables. The invention identifies errors and allows them to be corrected, either individually, or via a mass correction. Functional Application The primary function of this invention is to allow translation and transformation of data to convert from one system to another. The invention provides a format for entering the characteristics of the source data and the translation and transformation variables and the conditions of mapping the data so that the user does not have to know how to program. After the conditions are defined for each field in the source, the user creates templates to allow update to multiple source records simultaneously. Along with these user-defined templates, the invention uses predefined patterns of data characteristics to create migration instructions to the destination. The invention also provides predefined migration rules that enforce uniqueness constraints, maintain referential integrity, validate data dependencies, and control order of operations. Because of the generic nature of these patterns, the invention can be used to support virtually any function which involves translation, transformation, or migration of data from a source to an Oracle destination. The invention has predefined templates to support Oracle Applications.TM., but it is possible to use the invention's pattern definitions and rules to define migration instructions specific to any relational database or application. While the present invention has been described with respect to specific embodiments, many variations, modifications, alterations, substitutions, and equivalents will be apparent to those skilled in the art. Accordingly, the scope and spirit of the invention in its broader aspects is not limited to the specific details or functional applications defined below. The most basic application of the invention is data conversion. Large companies have many different incompatible systems that need to convert data into Oracle relational databases (ORACLE7.RTM. and ORACLE8.RTM.) and Oracle Applications.TM.. Rather than manually writing code to move data from a legacy environment into Oracle, the user can use the invention to generate the conversion instructions. A different use of the invention is to consolidate or combine information from different sources into a single set of Oracle tables. The consolidation process also involves a migration of data from a source to a destination, but adds the functionality of being able to update or add to existing destination records, rather than merely inserting new records. The invention defines a set of rules to manage the addition of data to existing records, and allows the user to identify the conditions associated with adding data to existing tables. Examples of how this consolidation function may be used follow with reference to FIG. 5. Companies may want to consolidate several purchase orders from purchasing systems in different locations into a single purchase order to send to a supplier. They may want to centralize their payables function in order to reduce payment processing time or leverage buying power. In order to do this, the invention allows the user to combine the purchase lines from each of the individual purchase orders together and add the quantities of individual items and the total purchase amount. The invention also provides for converting different units of measure for that item. To facilitate the combination (consolidation) process, the invention maintains an audit trail and link to the original purchase orders so that the user can drill back to the original data. Companies also may want to consolidate several order entry systems together or combine their inventories so that they may service their customers across organization units, or around the world. The invention's data migration rules and translation and transformation patterns provide support for mapping several sources of data into a single destination. Earlier releases of Oracle Applications.TM. forced multiple physical installations of the subledgers when organizations had different currencies, calendars, or charts of accounts. In these earlier releases, each subledger could have multiple copies of each of the subledger's tables. One company had 140 installations of Oracle Payables.TM. tables to support their business. Oracle Applications.TM. now supports a "multiorg" environment with a single physical installation of the subledgers and the data partitioned by an organization unit. However, Oracle did not provide a migration path from these earlier multiple installs to a single instance of the subledgers. The invention's patterns and rules can be used to define these consolidations from multiple sources to a single destination and can use conditional statements to add the required organization information to separate the data. The consolidation function of the invention can be used in many other circumstances. A merger or acquisition, or a selling of an organization or division, may force a consolidation of data. Many existing systems (including Oracle Applications.TM.) do not support a distributed environment. In these systems, a purchasing system on one database instance cannot feed a payables system in a different location without writing a custom conversion routine. Oracle Applications.TM. do support a consolidation function, but only at the general ledger level. The invention would support consolidations across any subledger from a source located anywhere to a destination that may be in an entirely different database instance. It does this using the same knowledge about the characteristics, structure, and format of the destination tables to define data migration rules. In a similar use, the invention can take data from a single subledger and use a multivariate reverse concatenation pattern translation that will provide instructions for separating the data into multiple destinations or subledgers. The Data Map Architect allows a user to change even the base structures of an existing application or source system as the business requirements of the organization change. The translation and transformation patterns and the migration rules dictate how the data is changed from the source to the destination. In Oracle Applications.TM. the base structure is called a key flexfield. These flexfields are used throughout the applications to write reports, obtain balances, or sort the data. Using the invention, a user can add new segments to the flexfield, change the size of segments, change the domains of value sets, replace values in value sets, move structures or values to different databases, or change the order of segments. All of this can be done with confidence that the data and referential integrity of the applications are maintained. The invention also simplifies the process of creating customizations, modifications, enhancements, or adding bolt-ons to a destination because the structure and characteristics of the destination are already known. A user would merely identify the type of data to be transferred in the customization or modification and use the invention to facilitate the integration of that new data into the destination application. The Update Processor ensures consistency on the destination side and provides an audit trail to monitor the data migration from the bolt-on, enhancement, or modification. The invention's technology can also be used to assist in rewriting customizations, modifications, or enhancements to integrate with a new version of an application or a new software release. The invention uses its pre-defined migration rules to map to the new release. The logic and methodology of the invention can also be used to restore archived versions of data to an existing system. A user might archive data (such as old invoices) after a certain period of time. However, typically, there is no way to restore that data because the current application or system has been upgraded to a new version or release, and the data format of the archived data is not compatible with the current system. Without the invention, in order to restore the archived data, a user would have to reinstall a previous version of the application and then restore the data. With the invention, restoring archived data is simply a process of using the invention's patterns for transforming the archived data into the format of the existing system. The invention makes this a routine migration effort with monovariate translation and transfer mapping patterns. Migration of data from development, to test, to training, to production environments, or to different database instances, is also a process of applying rules and templates to source data to move data. The invention supports populating different destination environments with data that has been entered in one system. In other words, a user can set up data in one instance or environment, and then decide to move all, or part of the data, to another environment without having to redefine the setup parameters. The invention treats this as a movement of data from one Oracle table to a different Oracle table. Prior to the invention, a user would have had to move all of the existing data by exporting all of the tables in one instance or would have had to manually re-enter that data which was to be duplicated in the new environment. It was not possible to move only a portion of the data from one environment to another without destroying the referential integrity of the destination. Another use of the invention is to automatically add additional data to many different destination tables at the same time. The invention uses the logic of a multivariate reverse concatenation translation pattern to populate the destination tables. While the best mode for carrying out the invention has been described in detail, those familiar with the art to which this invention relates will recognize various alternative designs and embodiments for practicing the invention as defined by the following claims.
APPENDIX A
__________________________________________________________________________
SQL*Loader script for vendor contact data file
__________________________________________________________________________
Vendor.sub.-- row
MD.sub.-- Vendors%rowtype;
BIS.sub.-- Vendor.sub.-- ID
number(15);
BIS.sub.-- Site.sub.-- ID
number(15);
BIS.sub.-- Contact.sub.-- ID
number(15);
Found.sub.-- Match
Boolean;
Found.sub.-- Site
Boolean;
Already.sub.-- Found
Boolean;
t.sub.-- cnt
number;
PROCEDURE Create.sub.-- Vendor.sub.-- Contact (M.sub.-- rowid ROWID) IS
t.sub.-- contact.sub.-- name
varchar2(40);
Begin
SELECT first.sub.-- name.vertline..vertline.last.sub.-- name
INTO t.sub.-- contact.sub.-- name
FROM POX.sub.-- VENDORS M
WHERE M.rowid = M.sub.-- rowid;
If NOT(t.sub.-- contact.sub.-- name IS NULL) then
Get next id from unique sequence generator
SELECT PO.sub.-- VENDOR.sub.-- CONTACTS.sub.-- S.nextval
INTO BIS.sub.-- contact.sub.-- id
FROM DUAL;
insert FFIN contact information into BIS table
INSERT INTO PO.sub.-- VENDOR.sub.-- CONTACTS (
vendor.sub.-- contact.sub.-- id,
last.sub.-- update.sub.-- date,
last.sub.-- updated.sub.-- by,
vendor.sub.-- site.sub.-- id,
creation.sub.-- date,
created.sub.-- by,
first.sub.-- name,
last.sub.-- name,
area.sub.-- code,
phone)
SELECT
BIS.sub.-- Contact.sub.-- id
vendor
.sub.-- contact.sub.-- id
sysdate,
last
.sub.-- update.sub.-- date
`2`,
last
.sub.-- updated.sub.-- by
BIS.sub.-- site.sub.-- id,
vendor
.sub.-- site.sub.-- id
sysdate,
creation
.sub.-- date
`2`,
created
.sub.-- by
substr(M.last.sub.-- name,1,decode(instr(M.last.sub.-- name,` `,1,1),0,
1,
instr(M.last.sub.-- name,` `,1,1)),--first.sub.-- name
substr(M.last.sub.-- name,decode(instr(M.last.sub.-- name,` `,1,1),0,
1,
instr(M.last.sub.-- name,` `,1,1))+1), -- last.sub.-- name
M.area.sub.-- code,
area
.sub.-- code
M.phone
phone
FROM POX.sub.-- VENDORS M
WHERE M.rowid = M.sub.-- rowid;
End If;
EXCEPTION
WHEN DUP.sub.-- VAL.sub.-- ON.sub.-- INDEX THEN
UPDATE POX.sub.-- VENDORS M
SET error.sub.-- flag = `Y`,
error.sub.-- reason = `Duplicate Contact Key`
__________________________________________________________________________
|
Same subclass Same class Consider this |
||||||||||
