Schema Comparison via Cross-Validation Sampling
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing schema comparison methods fail to accurately determine equivalence or hierarchy between XML and JSON schemas due to their structural differences and the limitations of traditional code diff tools, which often misinterpret minor changes as significant or vice versa.
Innovation Solution
A system generates sample documents based on both schemas, validating them against each other to systematically determine equivalence, superset, or unrelated status, focusing on boundary conditions and using a schema comparer tool to analyze validation results and declare the relationship between the schemas.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Measurement precision
If traditional code diff tools are used to compare schemas, then the comparison process is simple and fast, but the accuracy of determining schema equivalence or hierarchy is poor due to misinterpretation of structural differences
Solution Approach 1:
The patent creates sample documents by copying and instantiating schema definitions, then validates these samples against both schemas to determine their relationship. This indirect comparison through shared samples resolves the accuracy issue without requiring complex direct schema analysis.
Solution Approach 2:
The patent introduces sample documents as an intermediary element between the two schemas being compared. By validating samples against both schemas and analyzing the validation results, the system determines schema relationships without directly comparing the schemas themselves, thereby improving accuracy.
2Reliability
If schemas are compared using traditional methods, then the process is quick, but false positives and negatives occur due to inability to properly handle structural differences between XML and JSON schemas
Solution Approach 1:
The patent performs preliminary actions by generating sample documents before validation. By pre-instantiating samples based on schema definitions and preparing validation test cases in advance, the system ensures reliable comparison results while maintaining reasonable comparison time through systematic preparation.
3Measurement precision
If boundary conditions are thoroughly tested to ensure accurate schema equivalence determination, then the reliability of comparison results improves, but the number of validation tests and processing time increases
Solution Approach 1:
The patent applies local quality by focusing validation tests on boundary conditions and critical schema elements rather than uniformly testing all possible document scenarios. This targeted approach ensures accurate equivalence determination for the most important cases while reducing overall testing time and improving productivity.
Data Source
AI summary
An approach is provided in which the approach generates a first set of sample documents based on a first schema and generates a second set of sample documents based on a second schema. The approach determines a set of validation results by comparing the first set of sample documents against the second schema and comparing the second set of sample documents against the first schema. The approach evaluates the set of validation results and declares a type of equivalence between the first schema and the second schema accordingly.


