Enforcing Constraints Upon Data Documents of Various Formats
- by Christopher Berman
This seems like the sort of problem that must have been solved elegantly long ago, but I haven't the foggiest how to google it and find it.
Suppose you're maintaining a large legacy system, which has a large collection of data (tens of GB) of various formats, including XML and two different internal configuration formats. Suppose further that there are abstract rules governing the values these files may or may not contain.
EXAMPLE: File A defines the raw, mathematical data pertaining to the aerodynamics of a car for consumption of the physics component of the system. File B contains certain values from File A in an easily accessible, XML hierarchy for consumption of a different component of the system. There exists, therefore, an abstract rule (or constraint) such that the values from File B must match the values from File A.
This is probably the simplest constraint that can be specified, but in practice, the constraints between files can become very complicated indeed.
What is the best method for managing these constraints between files of arbitrary formats, short of migrating it over to an RDBMS (which simply isn't feasible for the foreseeable future)? Has this problem been solved already?
To be more specific, I would expect the solution to at least produce notifications of violated constraints; the solution need not resolve the constraints.
==============================
Sample file structures
File A (JeepWrangler2011.emv):
MODEL JeepWrangler2011
{
EsotericMathValueX 11.1
EsotericMathValueY 22.2
EsotericMathValueZ 33.3
}
File B (JeepWrangler2011.xml):
<model name="JeepWrangler2011">
<!--These values must correspond File A's EsotericMathValues-->
<modelExtent x="11.1" y="22.2" z="33.3"/>
[...]
</model>