Information Technology Reference
In-Depth Information
6<67(0
V\V
SUHVLGHQWUHFRUG
3OQDPHSIQDPH SDUW\FROOJ
V\V
V\V
V\V
DGPLQLVWUDWLRQUHFRUG
VHW
$'0 LQ\LQPLQG
VHW
HOHFWLRQUHFRUG
(\HDU ZLQYRWHV
VHW
VWDWHUHFRUG
FRQJUHVVUHFRUG
&1*5 +'+56'65
VHW
61$0( &$3\DG
VHW
OLQNSRLQWHUUHFRUG
Fig. 3.1 Network schema on US president
3.2
Directly Translating a Hierarchical Model
into a Relational Model
Mapping between hierarchical and relational schema is similar to the one between
network and relational. It can be considered as a subset of a network schema be-
cause the inverted tree structure of its data structure can be modeled directly in a
network data model. However, it does not have as many set membership types and
constraints as in the network schema. All parent-child relationships in the hierar-
chical schema are “fixed,” i.e., not changeable once they are inserted. A relational
schema can be derived using the following steps:
Step 1—Derive relations.
Map each record type into a relation.
Step 2—Derive relation keys.
The record key of a hierarchical schema is mapped as a primary key of a relation.
However, if the record type of the hierarchical schema is a child record, then the pri-
mary key is derived by concatenating it with its parent record key. The parent record
key is also mapped as a foreign key in the child relation (Quizon 1990 ).
An example of mapping a hierarchical database for an accounts system is shown
in Fig. 3.2 .
 
Search WWH ::




Custom Search