Re: Pattern for data conversion between versions



Responding to Carter...

Could someone point me to relevant patterns for converting data as it
evolves?  For example, converting data back and forth between different
versions of a database schema.

I don't think there are any magic patterns. Data is typically abstracted to suit a particular problem in hand, which means that to capture invariants across diverse problems one would need a very abstract view. Such views tend to be formalized already.


For example, one could argue that

                *      formatted by 1
[DataAggregate] --------------------- [Specification]

is a pattern. One dynamically instantiates the relationship based on context and employs a generic processor to access the data given the specification (e.g., an XML string that provides data ordering in a buffer).

But in arenas where it is likely to be useful it will already be formalized. Thus in the realm of data storage the specification object becomes a schema and the data aggregate becomes a table. IOW, the RDM has already formalized the invariants and one would simply abstract those elements as part of the basic design.


************* There is nothing wrong with me that could not be cured by a capful of Drano.

H. S. Lahman
hsl@xxxxxxxxxxxxxxxxx
Pathfinder Solutions  -- Put MDA to Work
http://www.pathfindermda.com
blog: http://pathfinderpeople.blogs.com/hslahman
(888)OOA-PATH



.