# Property-Based Semantic Similarity Criteria to Evaluate the Overlaps of Schemas
## 5 Computation of Coverage and Flexibility
### Computation of Coverage and Flexibility  
After defining the weights, we can define the computation formulas of coverage and flexibility:  
**Definition 3**.: _Coverage and Flexibility._  
Given a schema \(X\),  
\[X=\{A_{1}:k_{1},\ldots,A_{n}:k_{n},B_{1}:k_{n+1},\ldots,B_{m}:k_{n+m}\}\]  
\(A_{i}:k_{i}\) means that for entity type \(A_{i}\) in schema \(X\), \(k_{i}=weight(A_{i})\), and given a schema \(Y\),  
\[Y=\{A_{1}:j_{1},\ldots,A_{n}:j_{n},C_{1}:j_{n+1},\ldots,C_{l}:j_{n+l}\}\]  
The coverage and flexibility of schema \(X\) to schema \(Y\) are given by:  
\[Cov(X,Y)=\sum_{i=1}^{n}j_{i} \tag{5}\]  
\[Flx(X,Y)=\sum_{i=n+1}^{n+l}k_{i} \tag{6}\]  
Some explanations of the formula:  
Figure 5: Special case 2 of is-a relation processing.  
The semantic equivalent entity type between schema \(X\) and schema \(Y\) is \(\{A_{1},\ldots,A_{n}\}\);  
The positions of the two independent variables in (5) and (6) cannot be exchanged, that is, the independent variables do not have symmetry.  
**Theorem 2**: _Formulas (5) and (6) conform to the semantics set of Formula (1) and (2), that is, the computation method proposed in Definition 3 is correct._  
**Proof.**\(Cov(X,Y)\) is defined as  
\[Cov(X,Y)=\frac{X\cap\ Y}{Y}\]  
Combined with Definition 2, for each entity type \(E_{i}\) in schema \(Y\), there is  
\[weight(E_{i})=\frac{|L_{E_{i}}|}{2*|L_{Y}|}\]  
where \(|L_{E_{i}}|\) is the number of all properties with entity type \(E_{i}\) as the range or domain, and \(|L_{Y}|\) is the number of all properties in schema \(Y\). According to Definition 3, there is  
\[j_{i}=weight(E_{i})=\frac{|L_{E_{i}}|}{2*|L_{Y}|}\]  
thus  
\[Cov(X,Y)=\sum_{i=1}^{n}j_{i}=\sum_{i=1}^{n}\frac{|L_{E_{i}}|}{2*|L_{Y}|}=\frac {\sum_{i=1}^{n}|L_{E_{i}}|}{2*|L_{Y}|}\]  
\(X\cap\ Y\) are the entity types in two schemas, namely entity type \(A_{1}-A_{n}\), and the number of properties of this part is \(\sum_{i=1}^{n}|L_{E_{i}}|\). The total number of properties in schema \(Y\) is \(|L_{Y}|\), as shown in Figure 2, each property links two entity types and both entity types count this property when calculating their weights. Therefore, each property is counted twice, so \(2*|L_{Y}|\) represents the number of times involved in the calculation.  
Therefore, \(\sum_{i=1}^{n}|L_{e_{i}}|/2*|L_{Y}|\) represents the meaning of \(X\cap\ Y/Y\), and the computation method in Definition 3 is correct. The correctness of \(Flx(X,Y)\) can be proved in the same way. \(\square\)  
The application scenarios of these two formulas are widely used. When we need to fuse schemas, we need to measure their overlapping effect. In the past, it was mostly decided by domain experts whether the two schemas could be fused, which is not scientific and efficient. This kind of quantitative evaluation can assist domain experts to judge. Moreover, when the number of schemas that need to be evaluated is too large, it is unrealistic to rely only on domain experts. Then, automation or semi-automation can be designed according to the metrics above. It can increase efficiency, save labor costs and avoid instability of subjective factors. In a word, the computability of evaluation criteria is very important. The calculation method in Formulas (5) and (6) contributes to the evaluation of schema fusion and the evaluation process.