# Semantics-Preserving RDB2 RDF Data Transformation Using Hierarchical Direct Mapping
## 3 Preliminaries
### Limitation of Direct Mapping for Semantics Preservation  
This section defines the three challenging problems encountered during the direct-mapping process for semantic preservation. This paper observes loss of semantics (Problems 1 and 2) and incorrect semantic data generation (Problem 3), which may occur in specific cases. The problems and specific conditions in which the problems occur were found during studies of existing direct-mapping methods [8; 9; 10; 11; 12; 13; 14; 15; 16]. To overcome these drawbacks, the problems into three categories are organized. Problem 1 illustrates the loss of information when relational tables are transformed into semantic data using an OWL class. Because the OWL class is associated with objects generated in a single semantic model structure, every semantic resource can be inferred from the OWL class. Therefore, additional methods are needed to indicate that the output data are particularly generated from the transformed relational table. * Problem 1: Suppose \(y_{a}\) = Class(\(x_{a}\)) is an RDB2 RDF mapping rule for a relational table, where \(x_{a}\in R\), \(R\) is a set of relational tables, \(y_{a}\in C\), \(C\) is a set of OWL classes, and \(x_{b}\) = Class_Inverse(\(y_{b}\)) is an RDF2 RDB inverse-mapping rule of an OWL class, where \(x_{b}\in X\), \(X\) is a set of results generated by Class_Inverse(\(y_{b}\) ), \(y_{b}\in C\), and \(C\) is a set of OWL classes. However, \(x_{b}\) is not the same as \(x_{a}\), because \(R\subset X\). Problem 2 illustrates another type of information loss that occurs when semantic resources reference other resources. Each referencing object, including relational attributes and binary relations, can be transformed into the same type (i.e., OWL object property). Thus, a method of distinguishing each referencing object is discussed and provided in Section 4. * Problem 2: Suppose \(y_{a}\) = ObjProp(\(x_{a}\)) is an RDB2 RDF mapping rule for a relational table, where \(x_{a}\) = \(\{x_{a1},x_{a2}\}\), \(x_{a1}\in B\), \(B\) is a set of binary relations, \(x_{a2}\in F\), \(F\) is a set of foreign keys, \(y_{a}\in O\), \(O\) is a set of OWL object properties, and \(x_{b}\) = ObjProp_Inverse(\(y_{b}\)) is an RDF2 RDB inverse-mapping rule of an OWL object property, where \(x_{b}\in X\), \(X\) is a set of results generated by ObjProp_Inverse(\(y_{b}\)), \(y_{b}\in O\), and \(O\) is a set of OWL object properties. However, ObjProp_Inverse( ) does not work as intended, because it has not been given any information to determine whether \(y_{b}\) is generated from \(x_{a1}\) or \(x_{a2}\). Problem 3 illustrates incorrect semantic data generation when integrity constraints are transformed without considering that every subgraph having a specific identical root node can be merged into a single graph. * Problem 3: Assume that the mapping rules for integrity constraints of relational data are described in Figure 7. Here, the predicates on the right-hand side are used to verify the integrity  
Figure 6: Graphical view of semantics preservation of direct mapping. constraints. DefaultCondition(\(p\), \(v\)) is a function that assigns \(v\) as a default value of predicate \(p\). CheckCondition (\(p\), \(c\)) is a function that assigns \(c\) as a check condition of predicate \(p\), and the other predicates on the left-hand side are defined in the Appendix A. The subset relationships can be inferred, as shown in Figure 8. However, semantic data generated by the above rules can be misinterpreted. For example, assume that a relational attribute, x, has integrity constraints, \"primary key\" and \"check,\" F is a mapping function that contains the rules of Figure 7, and G is an inverse mapping function of F. Then, the integrity constraints of G(F(x)) are \"primary key,\" \"check,\" \"foreign key,\" and \"unique,\" because FK(p) \(\subseteq\) Check(p), and Unique (p) \(\subseteq\) PK(p) \(\cup\) Check(p).