<!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Archiving and Interchange DTD v1.0 20120330//EN" "JATS-archivearticle1.dtd">
<article xmlns:xlink="http://www.w3.org/1999/xlink">
  <front>
    <journal-meta />
    <article-meta>
      <title-group>
        <article-title>Toward the Semantic Web - An Approach to Reverse Engineering of Relational Databases to Ontologies</article-title>
      </title-group>
      <contrib-group>
        <contrib contrib-type="author">
          <string-name>Irina Astrova</string-name>
          <email>irinaastrova@yahoo.com</email>
          <xref ref-type="aff" rid="aff0">0</xref>
        </contrib>
        <aff id="aff0">
          <label>0</label>
          <institution>Tallinn University of Technology</institution>
          ,
          <addr-line>Ehitajate tee 5, 19086 Tallinn</addr-line>
          ,
          <country country="EE">Estonia</country>
        </aff>
      </contrib-group>
      <fpage>111</fpage>
      <lpage>122</lpage>
      <abstract>
        <p>We propose a novel approach to reverse engineering of relational databases to ontologies. Our approach incorporates two main sources of semantics: HTML pages and a relational schema. This incorporation results in that: (1) only minimal information about a relational database is required to build an ontology; and (2) the ontology is no longer “impaired” by bad-database design, and by optimization and de-normalization of the relational schema. Our approach can be used for migrating HTML pages (especially those that are dynamically generated from a relational database) to the ontology-based Semantic Web. The main reason for this migration is to make the relational database information that is available on the Web machine-processable.</p>
      </abstract>
    </article-meta>
  </front>
  <body>
    <sec id="sec-1">
      <title>1 Introduction</title>
      <p>
        One of the main driving forces for the Semantic Web has always been the expression,
on the Web, of the vast amount of relational database information in a way that can
be processed by machines [
        <xref ref-type="bibr" rid="ref1">1</xref>
        ]. Indeed, most information on the Web is not
machineprocessable, because it is often represented in HTML (Hypertext Markup Language)
[
        <xref ref-type="bibr" rid="ref2">2</xref>
        ]. This language describes how the information looks like and not what it is. In
order for machines to process the information, it must be represented in an ontology
language – e.g. Frame Logic (F-Logic) [
        <xref ref-type="bibr" rid="ref3">3</xref>
        ] – and linked to ontologies. An ontology
can be used for annotating HTML pages with semantics.
      </p>
      <p>
        Manual or semi-automatic semantic annotation [
        <xref ref-type="bibr" rid="ref4">4</xref>
        ] is time-consuming, subjective
and error-prone. It is even impossible on scale of the Web that contains billions of
pages. Most pages even do not exist until they are dynamically generated from
relational databases at the time of submitting HTML forms.
      </p>
      <p>
        An alternative to the semantic annotation is automatic or semi-automatic reverse
engineering of relational databases to ontologies [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. However, because of the novelty
of that area, there are few approaches that consider an ontology as the target for
reverse engineering. A majority of the work has been done on extracting a conceptual
schema such as an entity-relationship model from relational databases.
      </p>
    </sec>
    <sec id="sec-2">
      <title>Common Problems of Reverse Engineering</title>
      <p>
        At first glance, it seems easy to reverse engineer a relational database to an ontology:
just map each relation to a class, each attribute in the relation to an attribute in the
class, each tuple to an instance, and each constraint to an axiom [
        <xref ref-type="bibr" rid="ref6">6</xref>
        ]. This provides
simple and fully automatic (i.e. without user interaction) reverse engineering. So, why
would not we want to do this? The easy approach ignores common problems of
reverse engineering; e.g.:
− Optimization and de-normalization: A relational schema is often optimized and
de-normalized for performance reasons [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
− Unrealistic assumptions: Many organizations believe in keeping all their data in
third normal form. However, every database designer has war stories about finding
the entire relational schema in first normal form instead of third normal form [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
− Bad database design: A relational schema is often bad-designed, because it may
be done by novice and untrained database designers who are not familiar with
database theory and database methodology [
        <xref ref-type="bibr" rid="ref8 ref9">8, 9</xref>
        ].
− Non-translated constructs: Since a relational schema does not support all
constructs of a conceptual schema, some of the semantics captured in the conceptual
schema – e.g. inheritance – will necessarily be lost when translating the schema
from conceptual to relational. Indeed, this translation usually results in “semantic
degradation” of the schema that becomes simpler, less complete, less
understandable, and less expressive [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
− Implicit semantics: Semantics may be not in a relational schema, but rather in data
or even in the heads of users who query a relational database [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ].
− Meaningless names: Relations and attributes in a relational schema are often
assigned names that are a maze of cryptic abbreviations; e.g. YRTREBUT,
B_423_SPD or FRED [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ]. However, it is difficult or even impossible to deduce
the meaning (i.e. semantics) of data from those names.
3
      </p>
    </sec>
    <sec id="sec-3">
      <title>Related Work</title>
      <p>
        Existing approaches to reverse engineering of relational databases to ontologies fall
roughly into one of the three categories:
− Approaches based on an analysis of relational schema: E.g. Stojanovic et al’s
approach [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ] provides a set of rules for mapping constructs in the relational
database (i.e. relations, attributes, tuples, and constraints) to semantically equivalent
constructs in the ontology (i.e. classes, attributes, instances, and axioms). These
rules are based on an analysis of relations, attributes, primary and foreign keys,
and inclusion dependencies.
− Approaches based on an analysis of data: E.g. Astrova’s approach [
        <xref ref-type="bibr" rid="ref11">11</xref>
        ] builds an
ontology based on an analysis of relational schema. However, since a relational
schema often captures little explicit semantics [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], this approach also analyzes
data in the relational database.
− Approaches based on an analysis of user queries: E.g. Kashyap’s approach [
        <xref ref-type="bibr" rid="ref13">13</xref>
        ]
builds an ontology based on an analysis of relational schema; the ontology is then
refined by user queries. However, this approach does not create axioms that are
part of the ontology.
      </p>
      <p>Not all of the common problems of reverse engineering can be solved using the
existing approaches. In particular, the existing approaches can be limited in terms of
requiring more input information than it is possible to provide in practice and making
unrealistic assumptions about the input. E.g. they typically assume that a relational
schema is in third normal form.</p>
      <p>
        The search for a solution leads us to a novel approach where HTML pages are
analyzed. So far, this analysis has been focused on generation of wrappers; see e.g. [
        <xref ref-type="bibr" rid="ref14 ref15 ref16 ref17">14,
15, 16, 17</xref>
        ]. A wrapper is a program that extracts the relational database information
from HTML pages. There are wrappers that are based on ontologies; see e.g. [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ].
      </p>
      <p>
        Wrappers have the main advantage of reconstructing a (part of) relational database
“hidden” behind HTML forms, when a relational schema is unknown. The backside
of this advantage is that any changes to structures of HTML pages – e.g. adding or
deleting fields in the pages – can break the wrappers and thus, the ontologies they are
based on. HTML pages are volatile by nature, meaning that they are often redesigned
[
        <xref ref-type="bibr" rid="ref19">19</xref>
        ] – typically more than twice a year [
        <xref ref-type="bibr" rid="ref20">20</xref>
        ].
      </p>
      <p>The biggest problem of wrappers is that they rely on structures of HTML pages to
extract semantics, thus throwing away all the advantages of analyzing a relational
schema; e.g.:
− An analysis of HTML pages often leads to a “brittle” ontology. Since a relational
schema is more stable than HTML pages, its analysis guarantees that the ontology
need not be rebuilt every time the pages change their structures.
− HTML pages represent views of the relational database; i.e. different ways of
viewing the relational database information on the Web. Thus, some semantics
may be not in the pages, but rather in the relational schema.</p>
      <p>
        Apart from these, the relational schema is a formal explicit agreement between
database designers and users about data and its meaning in an organization. Thus, the
relational schema provides an important source of semantics to be extracted into an
ontology [
        <xref ref-type="bibr" rid="ref25">25</xref>
        ].
      </p>
    </sec>
    <sec id="sec-4">
      <title>4 Our Approach</title>
      <p>
        As an attempt to solve the common problems of reverse engineering, we propose a
novel approach. Our approach is based on an analysis of HTML pages. There are two
main reasons for this analysis. One is that a relational schema often captures little
explicit semantics [
        <xref ref-type="bibr" rid="ref12">12</xref>
        ], while a conceptual schema is usually unavailable or
out-ofdate [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. Another reason for analyzing HTML pages is to benefit from their
userfriendliness. This user-friendliness results in that:
− HTML pages partially represent a logical structure of the relational database,
rather than its physical structure (i.e. a relational schema). Indeed, they often
provide a user-friendly interface to the relational database. Behind this interface, a
relational schema can be bad-designed, optimized, and de-normalized.
− Table and field names in HTML pages are often more explicit and more
meaningful than the corresponding relation and attribute names in a relational schema.
      </p>
      <p>Given the reasons for analyzing HTML pages, let’s now consider more precisely
what our approach is and then illustrate it by example. Suppose going to a website
http://www.bobhowardhonda.com and searching for information about a
used vehicle; e.g. Ford Mustang. Since such information is stored in a relational
database, we fill out an HTML form in Figure 1 (located in the upper frame of the page)
and submit it. After submitting the form, search results will be returned in an HTML
page in Figure 1. This page is dynamically generated from a relational database and
contains specifications of Ford Mustang and its features.</p>
      <p>
        Extracting Form Model Schema
The first step of our approach is extracting a form model schema [
        <xref ref-type="bibr" rid="ref10">10</xref>
        ]. This schema
was originally proposed to extract an entity-relationship model from database forms.
Basically, the form model schema contains:
− Form field: This is an aggregation of name and entry associated to it1. A name is
pre-displayed and serves as a clue to what will be entered by users or displayed by
HTML pages. An entry is the actual data; it roughly corresponds to an attribute in
the relational schema. We use the term of linked attribute for such an entry to
distinguish it from other entries that are computed or simply unlinked with the
relational schema.
− Structural unit: This is a logical group of closely related form fields. It roughly
corresponds to a relation in the relational schema.
− Relationship: This is a connection between structural units that relates one
structural unit to another (or back to itself). There are two kinds of relationship:
association and inheritance.
− Constraint: This is a rule that defines what data is valid for a given linked
attribute. A cardinality constraint specifies for an association relationship the number of
instances that a structural unit can participate in.
− Underlying source: This is a physical structure of the relational database (i.e. a
relational schema) that defines relations and attributes with their data types.
− Form type: This is a collection of empty form fields.
− Form template: This is a particular representation of form type. Each form
template has a layout (i.e. its graphical representation) and a title that provides its
general description.
− Form instance: This is an occurrence of form type, when its template is filled in
with the actual data. E.g. Figure 1 is an instance of the form type.
− Hierarchical tree: This is a hierarchical structure of form instance. There are two
kinds of hierarchical tree: structured data tree and content tree [
        <xref ref-type="bibr" rid="ref21">21</xref>
        ]. A structured
data tree captures, for an HTML page, the hierarchy of HTML tags and data
contents (i.e. the syntactic hierarchy). A content tree is the same, except that HTML
tags are deleted. Thus, it captures only the hierarchy of data contents (i.e. the
intended hierarchy).
4.1.1 Analysis of HTML Pages Structures and Relational Schema
      </p>
      <p>
        Extracting a form model schema consists in an analysis of HTML pages
(especially their structures) and a relational schema to identify constructs of the form
model schema and to assign those constructs names using wrapper generation
techniques [
        <xref ref-type="bibr" rid="ref14 ref15 ref16 ref17 ref18">14, 15, 16, 17, 18</xref>
        ].
      </p>
      <sec id="sec-4-1">
        <title>4.1.1.1 Identifying Form Instances</title>
        <p>1 However, we can also identify a form field with no name for its entry; e.g. the photo, year,
make, and model in Figure 1.</p>
        <p>
          HTML pages typically contain advertisements and navigational menus that can be
viewed as “noisy” data [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. Thus, given an HTML page, the first task is to identify a
data-rich section (i.e. a form instance). We can do this in three ways.
        </p>
        <p>
          First, we can compare HTML pages for overlaps in structure [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. The implication
is that all pages from a given website will organize their content in a similar way,
regarding the location of advertisements and navigational menus.
        </p>
        <p>
          Second, we can examine HTML code for block tags such as &lt;frame&gt; [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]. A
difficulty is that HTML pages often consist of multiple frames.
        </p>
        <p>
          Third, we can search through all frames in the page to find the largest one [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ].
This approach typically implies that a frame that takes up the largest display area will
be the most interesting to users.
        </p>
        <p>E.g. from Figure 1 we would identify that Vehicle Detail represents all data
that is the subject of interest to users.</p>
      </sec>
      <sec id="sec-4-2">
        <title>4.1.1.2 Identifying Structural Units</title>
        <p>
          We can take three basic approaches to this. First, we can examine HTML code for
block tags such as &lt;table&gt;, &lt;ul&gt; and &lt;ol&gt; [
          <xref ref-type="bibr" rid="ref17 ref18">17, 18</xref>
          ]. The implication is that
structural units will be represented by tables or lists in HTML pages. The biggest problem
with this approach is that it relies on a physical structure of HTML pages. Thus, it
fails if the pages change their structures frequently. There are many other situations,
where the approach does not work either such as errors in the code and misuse of the
block tags [
          <xref ref-type="bibr" rid="ref14">14</xref>
          ]. E.g. not only is &lt;table&gt; used for representing a relation in the
relational schema, but it is also the primary method for grouping data in HTML pages
[
          <xref ref-type="bibr" rid="ref15">15</xref>
          ]. The data is often grouped just for easier viewing it by users.
        </p>
        <p>
          Second, we can use visual cues to determine a logical structure of HTML pages –
that is, the real meaning of the pages as they are understood by users [
          <xref ref-type="bibr" rid="ref14 ref16">14, 16</xref>
          ]. E.g. the
users might consider the year, make, model, price, mileage, …, and vin in Figure 1 as
a whole group, just because they all are specifications.
        </p>
        <p>Third, we can look for structural units in relations of the relational schema (i.e. the
underlying source).</p>
        <p>E.g. from Figure 1 we would identify two structural units: Vehicle and
Feature. One contains specifications for a used vehicle (Year, Make, Model, Price,
Mileage, …, and VIN); while another structural unit lists the vehicle features (Air
Conditioning, Passenger Side Air Bag, …, and Tilt Steering
Wheel).</p>
      </sec>
      <sec id="sec-4-3">
        <title>4.1.1.3 Identifying Linked Attributes</title>
        <p>
          We can take three basic approaches to this. First, we can examine HTML code for
block tags such as &lt;thead&gt; and &lt;th&gt; [
          <xref ref-type="bibr" rid="ref18">18</xref>
          ]. Again, this approach works as long as
the code is well designed, correct, and stable. Moreover, the approach is viable only if
fields in HTML pages are separated with the block tags; it does not work for merged
data. E.g. the year, make, and model in Figure 1 are all merged data, meaning that
they are combined in a single text string: “2002 Ford Mustang”.
Form model schema
-- Structural units
Structural-Units ::= {
Feature(
-- Linked attributes
name : VARCHAR)
Vehicle(
-- Linked attributes
year : INTEGER,
make : VARCHAR,
model : VARCHAR,
price : FLOAT,
mileage : FLOAT,
…
vin : VARCHAR)}
-- Relationships
Relationships ::= {
Has(Vehicle, Feature)}
-- Constraints
NotNull(Vehicle, mileage)
Cardinality (Vehicle, Feature,
1, n)
-- Underlying source
Underlying-Source ::= {
-- Relations
Detail(
-- Attributes
name : VARCHAR)
Vehicle (
-- Attributes
year : INTEGER,
make : VARCHAR,
model : VARCHAR,
price : FLOAT,
mileage : FLOAT,
…
vin : VARCHAR)}
        </p>
        <sec id="sec-4-3-1">
          <title>Ontology</title>
          <p>// Classes
Feature::Object[
// Attributes
name =&gt;&gt; String].</p>
          <p>Vehicle::Object[
// Attributes
year =&gt;&gt; Integer,
make =&gt;&gt; String,
model =&gt;&gt; String,
price =&gt;&gt; Float,
mileage =&gt;&gt; Float,
…
vin =&gt;&gt; String,
// Relationships
features =&gt;&gt; {Feature}].
// Axioms
NotNull(Vehicle, mileage).</p>
          <p>Forall C,A NotNull(C, A)
&lt;Forall IC Exists IA IC:C And</p>
          <p>IC[A -&gt;&gt; IA].
// Instances
f1:Feature[
// Attributes
name -&gt;&gt; “Air Conditioning”].
f2:Feature[
// Attributes
name -&gt;&gt; “Passenger Side
Bag”].
…
fn:Feature[
// Attributes
name -&gt;&gt; “Tilt Steering Wheel”].
v:Vehicle[
// Attributes
year -&gt;&gt; 2002,
make -&gt;&gt; “Ford”,
model -&gt;&gt; “Mustang”,
price -&gt;&gt; 9988,
mileage -&gt;&gt; 19037,
…
// Relationships
features -&gt;&gt; {f1, f2, …, fn}].</p>
          <p>Air</p>
          <p>
            Second, we can use visual cues [
            <xref ref-type="bibr" rid="ref14 ref17">14, 17</xref>
            ]. This approach typically implies that there
will be some separators (e.g. blank areas) that help users split the merged data. E.g.
the year, make, and model in Figure 1 are space-separated. Sometimes we can also
use data formats as visual cues to understand the meaning of data. E.g. the price in
Figure 1 is also indicated with a dollar sign (i.e. “$”).
          </p>
          <p>Third, we can look for linked attributes in attributes of the relational schema. This
is because a given HTML page may contain only a part of the total attributes in the
relational schema.</p>
          <p>Looking at a form model schema in Figure 2, we can see that each structural unit is
defined by a set of linked attributes. E.g. the structural unit Vehicle contains linked
attributes definitions for year, make, model, price, mileage, …, and vin;
while the structural unit Feature has a linked attribute name.</p>
        </sec>
      </sec>
      <sec id="sec-4-4">
        <title>4.1.1.4 Identifying Relationships</title>
        <p>
          We can take two basic approaches to this. First, we can look for relationships
(usually many-to-many) in relations of the relational schema, then look for
relationships (one-to-one and one-to-many) in foreign keys. A difficulty is that there are
always relations with unknown foreign keys [
          <xref ref-type="bibr" rid="ref8">8</xref>
          ].
        </p>
        <p>Second, since the relational database information typically does not reside on a
single HTML page, we can try to find relationships in hyperlinks.</p>
        <p>E.g. from Figure 1 we would identify an association relationship between the
structural units Vehicle and Feature: a used vehicle has features. The
implication is that related structural units will appear at the same page.</p>
      </sec>
      <sec id="sec-4-5">
        <title>4.1.1.5 Naming Structural Units</title>
        <p>Structural units can be given names of the corresponding relations in the relational
schema. But it is generally less confusing to users if the names are more meaningful.
Looking back at the form model schema in Figure 2, notice the adaptation of the
name Feature to the structural unit. This can better convey the meaning of data
than the original relation name Detail would.</p>
      </sec>
      <sec id="sec-4-6">
        <title>4.1.1.6 Naming Linked Attributes</title>
        <p>There are three basic approaches to this. One is to give linked attributes names of
the corresponding attributes in the relational schema.</p>
        <p>
          Since field names in HTML pages are often more explicit and more meaningful
than the corresponding attribute names in the relational schema, another approach is
to give linked attributes the field names. A difficulty is that the field names are not
always encoded in HTML pages. E.g. the photo, year, make, and model in Figure 1
are given no names at all. However, missing names can be found in HTML forms.
Since the forms are often used for querying a relational database, they provide a
sketch (of part) of a relational schema [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. Assuming that a given website will do its
best to return the most relevant data to users, search criteria submitted through an
HTML form are likely to re-appear in the returned HTML pages. E.g. from an HTML
form in Figure 1, we could enter “Ford” and “Mustang” for fields Make and
Model, respectively. Search results for the form will be returned in an HTML page
in Figure 1. This contains details of a used vehicle that matches the search criteria; i.e.
Ford Mustang. Therefore, linked attributes corresponding to the fields, with “Ford”
and “Mustang” re-appeared in their entries, could be named make and model,
respectively.
        </p>
        <p>
          Yet another approach is to give linked attributes data type names [
          <xref ref-type="bibr" rid="ref17">17</xref>
          ]. E.g. a
linked attribute represented by the photo in Figure 1 might be named image.
        </p>
      </sec>
      <sec id="sec-4-7">
        <title>4.1.1.7 Naming Relationships</title>
        <p>Relationships can be given names that are either names of the corresponding
relations (usually for many-to-many relationships) or foreign key names (for one-to-one
or one-to-many relationships). Again, users can give more meaningful names to the
relationships.</p>
        <p>The end result for the first step is the form model schema in Figure 2.</p>
        <sec id="sec-4-7-1">
          <title>4.1.2 Data Analysis</title>
          <p>
            In addition to the structures of HTML pages, we also analyze data in the pages to
identify constraints. A data analysis includes a strategy of learning by examples,
borrowed from machine learning techniques [
            <xref ref-type="bibr" rid="ref22 ref23">22, 23</xref>
            ]. In particular, it is performed as a
sequence of learning tasks from the relational database. Each task is defined by: (1)
task relevant data (e.g. data contained in the pages), (2) problem background
knowledge (e.g. application domain knowledge), and (3) expected representation of results
of learning tasks (e.g. first order predicate logic). The results of learning tasks are
related to a current state of the relational database. They will be generalized into
knowledge about all states through an induction process [
            <xref ref-type="bibr" rid="ref10">10</xref>
            ]. This process combines
the semantics extracted from the pages with the application domain knowledge that is
provided by users (i.e. the user “head knowledge”). Such knowledge controls the
learning tasks to come to the best inductive conclusion, the conclusion that will be
consistent with all states of the relational database.
          </p>
          <p>E.g. from Figure 1 we would identify a constraint NotNull on the linked attribute
mileage. This contains non-null values for any used vehicle.</p>
        </sec>
        <sec id="sec-4-7-2">
          <title>4.1.3 Integration</title>
          <p>
            There are typically several HTML pages (of different structures) for any given
website. Thus, their analysis will produce several form model schemata. These will
be merged into a single one through an integration process [
            <xref ref-type="bibr" rid="ref10">10</xref>
            ]. This process
performs as follows. First, the schemata are compared for overlaps in structure. This
means looking for structural units and relationships with similar names, then looking
for similar structures within structural units and relationships. Second, the schemata
are compared for overlaps in meaning. This means looking for structural units that
correspond to the same real-world objects but have different names. Third, naming
conflicts (i.e. synonyms and homonyms) are resolved. Conflicts can also be in
different constraints on the linked attributes and different cardinality constraints on the
relationships. By performing these tasks, the integration process makes the schemata
consistent with one another and brings them together into a single one that makes
sense for all HTML pages from a given website.
          </p>
        </sec>
        <sec id="sec-4-7-3">
          <title>4.2 Schema Transformation</title>
          <p>
            The second step of our approach is transforming the form model schema into an
ontology (i.e. “schema transformation”). Basically, this means replacing constructs of
the form model schema to constructs of the ontology using mapping rules [
            <xref ref-type="bibr" rid="ref24">24</xref>
            ].
          </p>
          <p>The ontology is formulated in F-Logic. This language has an object-oriented
syntax. It provides support for classes, attributes with domain and range definitions,
inheritance hierarchies of classes and attributes, and axioms that can be used for
further characterizing relationships between instances.</p>
          <p>Continuing the example, consider again a form model schema in Figure 2. Here
schema transformation is straightforward. First, we create a class for each structural
unit in the form model schema. E.g. we create two classes: Vehicle and Feature.
Within each class, we create an attribute for each linked attribute in the structural
unit. E.g. for the class Vehicle, we add attributes year, make, model, price,
mileage, …, and vin. We also add an attribute features. This associates the
two classes. Finally, we create an axiom for each constraint (except cardinalities) in
the form model schema. E.g. we add an axiom NotNull to the ontology.</p>
          <p>
            The end result for the second step is the ontology in Figure 2. The ontology is
nearing completion. But there are still instances to create. These instances will
populate a knowledge base, whose schema is defined by the ontology [
            <xref ref-type="bibr" rid="ref12">12</xref>
            ].
4.3
          </p>
          <p>
            Data Migration
The third step of our approach is creating instances from data contained in HTML
pages (i.e. “data migration”). Basically, this means assigning values to the attributes
in the ontology using wrapper generation techniques [
            <xref ref-type="bibr" rid="ref17 ref18">17, 18</xref>
            ].
          </p>
          <p>Continuing the example, consider again an HTML page in Figure 1. Here data
migration is easy for the attributes year, make, model, price, mileage, …, and
vin in the class Vehicle. However, we meet with a difficulty when trying to find a
value for the attribute features that corresponds to the list of features in Figure 1.
We overcome this difficulty by creating an instance for each feature in Figure 1 and
assigning it to the attribute features.</p>
          <p>The end result for the third step is the ontology in Figure 2.
5</p>
        </sec>
      </sec>
    </sec>
    <sec id="sec-5">
      <title>Conclusion</title>
      <p>We have proposed a novel approach to reverse engineering of relational databases to
ontologies. Our approach is based on the idea that semantics of data in a relational
database can be extracted by analyzing HTML pages. These semantics are
supplemented with those captured in the relational schema to build an ontology.</p>
      <p>
        There are three important advantages of our approach:
− It requires minimal information about a relational database. This is important
because the complete knowledge of the relational database is usually unavailable
[
        <xref ref-type="bibr" rid="ref9">9</xref>
        ]. E.g. there are always relations with unknown primary keys [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ].
− It makes no assumptions about a relational schema that can be bad-designed,
optimized, and de-normalized. This is important because even database experts
may occasionally break the rules of good database design [
        <xref ref-type="bibr" rid="ref8">8</xref>
        ]. And many database
designers improve performance by optimizing and de-normalizing the relational
schema [
        <xref ref-type="bibr" rid="ref7">7</xref>
        ].
− It appeals to users who likely understand HTML pages better than a relational
schema. This is important because reverse engineering cannot be completely
automated [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ]. There are always situations where user interaction is necessary.
      </p>
      <p>
        These advantages come in large part from an analysis of HTML pages. But this
analysis has costs. One is the difficulty in automation [
        <xref ref-type="bibr" rid="ref18">18</xref>
        ]. This is because HTML
pages are designed for (human) users use only. E.g. data in the pages can be
embedded in natural language text or hidden within graphical presentation primitives [
        <xref ref-type="bibr" rid="ref19">19</xref>
        ].
      </p>
    </sec>
    <sec id="sec-6">
      <title>6 Future Work</title>
      <p>
        In the future, our approach can be used for migrating HTML pages (especially those
that are dynamically generated from a relational database) to the ontology-based
Semantic Web. The main reason for this migration is to make the relational database
information that is available on the Web machine-processable [
        <xref ref-type="bibr" rid="ref5">5</xref>
        ].
      </p>
    </sec>
    <sec id="sec-7">
      <title>Acknowledgement</title>
      <p>This research is partly sponsored by ESF (Estonian Science Foundation) under the
grant nr. 5766.</p>
    </sec>
  </body>
  <back>
    <ref-list>
      <ref id="ref1">
        <mixed-citation>
          1.
          <string-name>
            <surname>Berners-Lee</surname>
            ,
            <given-names>T.</given-names>
          </string-name>
          :
          <article-title>Relational Databases on the Semantic Web (</article-title>
          <year>2002</year>
          ) http://www.w3.org/DesignIssues/RDB-RDF.html (
          <year>2002</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref2">
        <mixed-citation>
          2.
          <string-name>
            <surname>Raggett</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          <source>: HTML 4</source>
          .01 Specification, http://www.w3.org/TR/html401/ (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref3">
        <mixed-citation>
          3.
          <string-name>
            <surname>Kifer</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lausen</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Wu</surname>
          </string-name>
          , J.:
          <article-title>Logical Foundations of Object-oriented and Frame-based Languages</article-title>
          ,
          <string-name>
            <surname>Journal</surname>
            <given-names>ACM</given-names>
          </string-name>
          , No.
          <volume>42</volume>
          (
          <year>1995</year>
          )
          <fpage>741</fpage>
          -
          <lpage>843</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref4">
        <mixed-citation>
          4.
          <string-name>
            <surname>Erdmann</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Maedche</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Schnurr</surname>
            ,
            <given-names>H.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Staab</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <article-title>From Manual to Semi-automatic Semantic Annotation: About Ontology-based Text Annotation Tools</article-title>
          ,
          <source>Linköping Electronic Articles in Computer and Information Science Journal (ETAI)</source>
          , Vol.
          <volume>6</volume>
          , No.
          <volume>2</volume>
          (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref5">
        <mixed-citation>
          5.
          <string-name>
            <surname>Stojanovic</surname>
            ,
            <given-names>L.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stojanovic</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Volz</surname>
          </string-name>
          , R.:
          <article-title>Migrating Data-intensive Web Sites into the Semantic Web</article-title>
          ,
          <source>In: Proceedings of the 17th ACM Symposium on Applied Computing (SAC)</source>
          (
          <year>2002</year>
          )
          <fpage>1100</fpage>
          -
          <lpage>1107</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref6">
        <mixed-citation>
          6.
          <string-name>
            <surname>Dogan</surname>
            ,
            <given-names>G.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Islamaj</surname>
          </string-name>
          , R.:
          <source>Importing Relational Databases into the Semantic Web</source>
          (
          <year>2002</year>
          ) http://www.mindswap.org/webai/2002/fall/Importing_20Relational_
          <article-title>20Databases_20into_20 the_20Semantic_20Web</article-title>
          .html
        </mixed-citation>
      </ref>
      <ref id="ref7">
        <mixed-citation>
          7.
          <string-name>
            <surname>Muller</surname>
          </string-name>
          , R.:
          <article-title>Database Design for Smarties: Using UML for Data Modeling</article-title>
          , Morgan Kaufmann (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref8">
        <mixed-citation>
          8.
          <string-name>
            <surname>Premerlani</surname>
            ,
            <given-names>W.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Blaha</surname>
            ,
            <given-names>M.:</given-names>
          </string-name>
          <article-title>An Approach for Reverse Engineering of Relational Databases</article-title>
          ,
          <source>Communications of the ACM</source>
          , Vol.
          <volume>37</volume>
          , No.
          <volume>5</volume>
          (
          <year>1994</year>
          )
          <fpage>42</fpage>
          -
          <lpage>49</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref9">
        <mixed-citation>
          9.
          <string-name>
            <surname>Hainaut</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Henrard</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hick</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Roland</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Englebert</surname>
            ,
            <given-names>V.</given-names>
          </string-name>
          :
          <article-title>Database Design Recovery</article-title>
          ,
          <source>In: Proceedings of the 8th Conference on Advanced Information Systems Engineering (CAiSE)</source>
          ,
          <source>LNCS</source>
          , Vol.
          <volume>1080</volume>
          (
          <year>1996</year>
          )
          <fpage>272</fpage>
          -
          <lpage>300</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref10">
        <mixed-citation>
          10.
          <string-name>
            <surname>Mfourga</surname>
          </string-name>
          , N.:
          <article-title>Extracting Entity-Relationship Schemas from Relational Databases: A Formdriven Approach</article-title>
          ,
          <source>In: Proceedings of the 4th Working Conference on Reverse Engineering (WCRE)</source>
          (
          <year>1997</year>
          )
          <fpage>184</fpage>
          -
          <lpage>193</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref11">
        <mixed-citation>
          11.
          <string-name>
            <surname>Astrova</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          : Reverse Engineering of Relational Databases to Ontologies,
          <source>In: Proceedings of the 1st European Semantic Web Symposium (ESWS)</source>
          ,
          <source>LNCS</source>
          Vol.
          <volume>3053</volume>
          (
          <year>2004</year>
          )
          <fpage>327</fpage>
          -
          <lpage>341</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref12">
        <mixed-citation>
          12.
          <string-name>
            <surname>Noy</surname>
            ,
            <given-names>N.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Klein</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          :
          <article-title>Ontology Evolution: Not the Same as Schema Evolution, Knowledge and Information Systems</article-title>
          , Vol.
          <volume>6</volume>
          , No.
          <volume>5</volume>
          (
          <year>2003</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref13">
        <mixed-citation>
          13.
          <string-name>
            <surname>Kashyap</surname>
          </string-name>
          , V.:
          <article-title>Design and Creation of Ontologies for Environmental Information Retrieval</article-title>
          ,
          <source>In: Proceedings of the 12th Workshop on Knowledge Acquisition, Modeling and Management (KAW)</source>
          (
          <year>1999</year>
          )
        </mixed-citation>
      </ref>
      <ref id="ref14">
        <mixed-citation>
          14.
          <string-name>
            <surname>Yang</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Zhang</surname>
          </string-name>
          , H.:
          <source>HTML Page Analysis Based on Visual Cues, In: Proceedings of the 6th International Conference on Document Analysis and Recognition (ICDAR)</source>
          (
          <year>2001</year>
          )
          <fpage>859</fpage>
          -
          <lpage>864</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref15">
        <mixed-citation>
          15.
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Hu</surname>
            ,
            <given-names>J.:</given-names>
          </string-name>
          <article-title>A Machine Learning Based Approach for Table Detection on the Web</article-title>
          ,
          <source>In: Proceedings of the 11th International Conference on World Wide Web (WWW)</source>
          (
          <year>2002</year>
          )
          <fpage>242</fpage>
          -
          <lpage>250</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref16">
        <mixed-citation>
          16.
          <string-name>
            <surname>Gu</surname>
          </string-name>
          , X.
          <string-name>
            <surname>-D.</surname>
          </string-name>
          ,
          <string-name>
            <surname>Chen</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          , Ma, W-Y.,
          <string-name>
            <surname>Chen</surname>
          </string-name>
          . G.-L.:
          <article-title>Visual Based Content Understanding towards Web Adaptation</article-title>
          ,
          <source>In: Proceedings of the 2nd International Conference on Adaptive Hypermedia and Adaptive Web-Based Systems (AH)</source>
          (
          <year>2002</year>
          )
          <fpage>29</fpage>
          -
          <lpage>31</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref17">
        <mixed-citation>
          17.
          <string-name>
            <surname>Wang</surname>
            ,
            <given-names>J.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Lochovsky</surname>
            ,
            <given-names>F.</given-names>
          </string-name>
          :
          <article-title>Data Extraction and Label Assignment for Web Databases</article-title>
          ,
          <source>In: Proceedings of 12th International Conference on World Wide Web (WWW)</source>
          (
          <year>2003</year>
          )
          <fpage>187</fpage>
          -
          <lpage>196</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref18">
        <mixed-citation>
          18.
          <string-name>
            <surname>Embley</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          :
          <source>Toward Semantic Understanding - An Approach Based on Information Extraction, In: Proceedings of the 15th Australasian Database Conference (ADC)</source>
          (
          <year>2004</year>
          )
          <fpage>3</fpage>
          -
          <lpage>12</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref19">
        <mixed-citation>
          19.
          <string-name>
            <surname>Florescu</surname>
            ,
            <given-names>D.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Levy</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Mendelzon</surname>
            ,
            <given-names>A.</given-names>
          </string-name>
          :
          <article-title>Database Techniques for the World Wide Web: A Survey, ACM SIGMOD Record</article-title>
          , Vol.
          <volume>27</volume>
          , No.
          <volume>3</volume>
          (
          <year>1998</year>
          )
          <fpage>59</fpage>
          -
          <lpage>74</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref20">
        <mixed-citation>
          20.
          <string-name>
            <surname>Knoblock</surname>
            ,
            <given-names>C.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Kambhampati</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          :
          <source>Information Integration on the Web</source>
          (
          <year>2002</year>
          ) http://rakaposhi.eas.asu.edu/aaai-i3
          <string-name>
            <surname>-</surname>
          </string-name>
          tut-all.pdf
        </mixed-citation>
      </ref>
      <ref id="ref21">
        <mixed-citation>
          21.
          <string-name>
            <surname>Lim</surname>
            ,
            <given-names>S.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Ng</surname>
            ,
            <given-names>Y.</given-names>
          </string-name>
          :
          <article-title>Extracting Structures of HTML Documents</article-title>
          ,
          <source>In: Proceedings of the 12th International Conference on Information Networking (ICOIN)</source>
          (
          <year>1998</year>
          )
          <fpage>420</fpage>
          -
          <lpage>426</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref22">
        <mixed-citation>
          22.
          <string-name>
            <surname>Paredis</surname>
          </string-name>
          , J.:
          <article-title>Learning the Behavior of Dynamical Systems from Examples</article-title>
          ,
          <source>In: Proceedings of the 6th International Workshop on Machine Learning (ICML)</source>
          (
          <year>1989</year>
          )
          <fpage>137</fpage>
          -
          <lpage>140</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref23">
        <mixed-citation>
          23. Michalski, R.:
          <source>A Theory and Methodology of Inductive Learning, Machine Learning: An Intelligence Approach</source>
          , Vol.
          <volume>1</volume>
          (
          <year>1983</year>
          )
          <fpage>83</fpage>
          -
          <lpage>134</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref24">
        <mixed-citation>
          24.
          <string-name>
            <surname>Astrova</surname>
            ,
            <given-names>I.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Stantic</surname>
            ,
            <given-names>B.</given-names>
          </string-name>
          :
          <article-title>Reverse Engineering of Relational Databases to Ontologies: An Approach Based on an Analysis of HTML Forms</article-title>
          ,
          <source>In: Proceedings of the Workshop W6 on Knowledge Discovery and Ontologies (KDO)</source>
          ,
          <source>15th European Conference on Machine Learning (ECML)</source>
          ,
          <source>8th European Conference on Principles and Practice of Knowledge Discovery in Databases (PKDD)</source>
          , eds. Buitelaar,
          <string-name>
            <surname>P.</surname>
          </string-name>
          et al. (
          <year>2004</year>
          )
          <fpage>73</fpage>
          -
          <lpage>78</lpage>
        </mixed-citation>
      </ref>
      <ref id="ref25">
        <mixed-citation>
          25.
          <string-name>
            <surname>Meersman</surname>
          </string-name>
          , R.:
          <article-title>Ontologies and Databases: More than a Fleeting Resemblance</article-title>
          .
          <source>In: Proceedings of the International Workshop on Open Enterprise Solutions: Systems</source>
          , Experiences, and
          <string-name>
            <surname>Organizations</surname>
            (OES/SEO), eds. d'Atri,
            <given-names>A.</given-names>
          </string-name>
          ,
          <string-name>
            <surname>Missikoff</surname>
            ,
            <given-names>M.</given-names>
          </string-name>
          (
          <year>2001</year>
          )
        </mixed-citation>
      </ref>
    </ref-list>
  </back>
</article>