• 沒有找到結果。

Mapping between Relational Databases and OWL Ontologies

Due to the requirement for the Semantic Web and the problem of the deep Web, many re-searches has focused on the mapping between a relational database and OWL ontologies [2] [24] [37] [1] [19]. In this field, mapping is the process to find the semantic corre-spondences between entities or elements of the relational database and OWL ontologies.

Currently there are some solutions and tools to deal with this problem. They can be clas-sified into two parts: methods for creating ontologies from existing relational database and methods for mapping a relational database to already existing OWL ontologies. If the former case that generated ontologies finally will be mapped to domain-related ontologies , we think it will lose more semantic information comparing to the original database. For this reason, our work will focus on the latter case. In next two sections, we will discuss these two kinds of methods.

2.3.1 Extracting OWL ontologies from Relational Databases

Extracting OWL ontologies from relational databases is a Reverse engineering which is the process of analyzing an existing system; identifying system components, abstractions, and interrelationships; and creating representations of them. There are plenty of work on the reverse engineering of relational databases. However, most of them focus on extracting E-R(entity-relationship) and object models from them, the semantics obtained by these methods cannot fully meet the requirement of constructing ontologies. Until recent years, there exist a few approaches that consider ontologies as the target for reverse engineering.

In this section, we will introduce some studies in this field.

Astrova [2] presented a method to extract ontologies from a relational database. This method is composed of two processes: By analyzing information such as key, data and attribute correlations to extract a conceptual schema, which expresses semantics about the relational database, and transforming this schema into a semantically equivalent on-tology. Finally migrating data from a database to ontologies. Transforming the relational

schema into a semantically equivalent ontology proceeds as follows:

1. Classification of relations: Depend on the features, relations can be classified into three categories:

• Base relations: If a relation is independent of any other relation in a relational database schema, it is a base relation.

• Dependent relations: If a primary key of a relation depends on another rela-tions’ primary key, it is a dependent relation.

• Composite relations: A composite relation is a relation that is neither base nor dependent and its primary keys are composed of other relations’ primary keys.

2. Mapping: Key, data and attribute correlations can be described given two relations.

Each kind of correlation has four types: equality, inclusion, overlap and key disjoint-edness. With the combination of these types of correlation and the development of the mapping constraint, how to extract a ontology from a relational database schema can be determined.

Since the relational database schema often has little explicit semantics [33] , through analyzing tuples in the relational database, additional ”hidden” semantics (e.g. inheri-tance) can be discovered. However, it is very time consuming with regard to the number of tuples of the relational database.

Astrova also presented a method [3] that constructed an ontology based on analyzing the HTML-forms to extract a form model schema, transforming the form model schema into ontology and creating ontological instances from data contained in the pages. The drawback of this approach is that it does not offer any way to the identification of inher-itance relationship which is a significant aspect in the ontology construction. In order to overcome this drawback, Benslimane proposed an approach [9] to acquire ontologies from data-intensive webs. The main idea of this approach is the fact that users often query database through HTML forms and the query results often return as HTML tables. Thus, the data in the HTML forms are often structural data. By analyzing a HTML-form, im-portant information can be obtained. Besides, this method use an enriched relational

schema instead of simply use the relational schemas that is constructed from database.

The processes of this method are as follows:

1. Extract forms schema by analyzing HTML pages. It uses several identification rules and translation rules to identify the form unit and generate the XML-schema.

2. Restructure and enrich the relational schema through semantics of the forms schema.

In this step, the result of the relational schema is mostly like the structure of the underlying database. But it has additional inclusion dependencies and constraints.

3. Construct OWL ontology from the enriched relational schema using a set of trans-formation rules. These rules construct classes, properties, and Inheritance from the semantic similarities between the relational schema and ontology(OWL).

Man Li [24] extracted ontology in a relational database using E-R Model. This ap-proach defined twelve rules for extracting ontology from the relational database schema and used these rules to create ontology.

Trinh [37] proposed a tool named RDB20NT that creates ontology in a relational database. This tool is a method using an ontology to describe relational database and converting the information in a relational database into this ontology.

2.3.2 Mapping Relational Databases to Existing OWL Ontolo-gies

In this section we will discuss some approaches that directly mapping relational databases to OWL ontologies. These approaches are assumed that domain-related ontologies and legacy relational databases already exist. Because there is a different domain level or size between databases and ontologies, and the modeling criteria used for designing databases is also different from those used for designing ontology models. Thus, compare with the approaches that extract ontologies from databases, mapping approaches here are rare and more complex.

Borgida et al. [1] proposed a method that assists users in specifying and inferring mapping formulas between relational databases and OWL ontologies. Based on the sim-ple correspondences between relational database schemas and OWL ontologies, comsim-plex formulas expressing the semantic mapping can be found. However, this method has a

disadvantage that the database must be based on ER design principles and cannot extract classes that can be separated in the fields within a table. Besides, since only scheme is taken account of without consideration on instance, it is hard to match precisely.

Hu and Qu presented an approach [19] that uses virtual documents based on TF/IDF model to discover simple mappings between the relational database schema and OWL ontologies. Besides, this approach also finds the subsumption relationships, called contex-tual mappings, which can be directly translated to conditional mappings or view-based mappings [11] . The overview of this approach is as follows:

1. Classifying entity types: This is a preprocessing process. It classifies entities into the relational schema and the ontology into four different groups to limit the search-ing space of candidate mappsearch-ings. Besides, it coordinates different characteristics between the relational schema and the ontology.

2. Discovering simple mappings: This step firstly constructs virtual documents for the entities in the relational schema and the ontology to capture their implicit semantic information. Then, it discovers simple mappings between entities by calculating the confidence measures between virtual documents via the TF/IDF model

3. Validating mapping consistency: This phase uses mappings between relations and classes to validate the consistency of mappings between attributes and properties.

It considers the compatibility between data types of attributes and properties as well. In addition, some inference rules are also integrated in this process.

4. Constructing contextual mappings: This phase operates on mappings between re-lations and classes found in the previous phases, and supplies them with sample instances. It constructs a set of contextual mappings, which indicate the conditions how they could be transformed to view-based mappings with selection conditions.

Furthermore, there exist some studies that deal with the other problems from other aspects. For instance, Dou et al. [15] describe a general framework for integrating databases with ontologies via a first-order ontology language Web-PDDL. Barrasa et al.

[5] design a language R2O to express complex mappings between relational database schemas and ontologies.