Database Reference
In-Depth Information
In this step, we use a hypernode database schema composed by the union of two
sets: H
h d f g
The first one is the set of hypernodes where:
f
n
H:
¼h
h n ;
Nh
i
g [
R h n
R h : ¼h
r,h s ;
l h n denotes the name of H.
l Nh denotes a set of nodes Nh
, where n n is the node
name, t is the type, ce mentions if the nodes contains a foreign key (in the
relational schema n is a foreign key), and cp mentions if the nodes contains a
primary key.
f
n
n
n
:¼h
n n ;
t
;
ce
;
cp
i
g
The second one is the set of relations where:
l r denotes the name of R
l h s denotes the hypernode source name
l h d denotes the hypernode destination name
To extract this schema, we start by identifying the hypernodes and then their
relations.
Hypernode identification. Using the relational schema, we create from each table
t
TR a new hypernode h. h has the same characteristics as t: same name and
attributes. Indeed, each attribute from the table TR is transformed into a node n in
h where n contains all the characteristics of a (name, type, etc.). If the attribute is a
foreign key, its type is changed to be the name of the exported relation.
Relation identification. In order to identify the relations between the identified
hypernodes, the nodes set Nh of each hypernode h is analyzed. For each node, we
verify whether it contains a foreign key in order to search existing dependency on
other hypernodes. We have identified four relation types:
2
l “IS-A” relation: if h has only one node n pf and no more and that contains a key
which is primary (a simple one) and foreign key, then h shares the relation “IS-
A” with the hypernode mentioned in the n pf type; for example, if the hypernode
“Foreign_Student” contains the node “ST_id,” which is a primary key and a
foreign key, then “Foreign_Student” shares the relation “IS-A” with “Student.”
l “Part_of” relation : if h has more than one node n pf that contains a key which is
primary and foreign key, then h shares a Part-of relation with each hypernode
mentioned in the n pf type; for example, “ Student ” and “ Thesis ” are “Part-of ” the
hypernode “ Thesis_hasStudent ” because “ Thesis_hasStudent ” contains the
nodes “ St-id ” with type “ Student” and “ Th-id ” with type “ Thesis ”.
l R relation: this kind of relation is a particular case of the “Part_of” relation .
When the hypernode is composed only of nodes which contain a key which is
primary and foreign key, then we delete this hypernode and we use its name to
build relations between the hypernodes mentioned in the n pf type; for example,
the hypernode “ Thesis_hasLab ” is deleted and is transformed into a relation
between “ Thesis ” and “ Laboratory ”.
l “” relation: if h contains a node which contains a foreign key, h has a relation
with the hypernode mentioned in the type of the node. In this case, we are not
able to give a name to this relation.
Search WWH ::




Custom Search