|
|
|
|
|
4. Semantic and relational data models comparative analysis
|
||||
|
In this part we will attempt to carry out comparative estimation of semantic and
relational data models' efficiency. To do that we will apply some common for such a
task criteria, namely, data retrieval time, redundancy, errors sensitivity, etc.
Formal data models description is a necessary condition for their comparative
analysing. Above we have already presented such a description for the semantic data
model, so here we confine ourselves to the relational model's brief description.
D' = {dK,dK+1, ..., dN }, where dK is an element of DK, dK+1 - of DK and so on. Here each relationship is represented by an individual table. Columns of the table stand for the domains, while table's rows (also called records) stand for specific relationships' realizations. It is important to note that the tables by all means must contain common columns, since otherwise information in the different tables can not be compared. Both the relational and semantic models formal description having been had, we are able to estimate their efficiency to manipulate with data of various complexity degree. The data complexity degree is an inexact term. Informally one may define it proceeding from the data volume and also from an assumption which type of relations among modelled data prevails: 1-to-1, 1-to-many or many-to-many. |
||||
|
Let us consider an example. Example. Having at one's disposal the database information about various types of repairs and repairs' carrying out one must get to know the cost of repair works for every well. |
||||
|
||||
|
Let us determine how many compare and search operations are needed to fulfill the
query of repair works cost. Let number of wells be equal to Nw, number of repairs -
Nr, and average number of repairs per well be equal to Nra. To get information about
the repairs for each well in the relational model requires explicit or implicit
transformation of Wells X Repairs relation (which is of many-to-many type and
presented in table 4a-1) to Nw Single_well X Repairs relations. This procedure
implemented by means of identical well names seeking in the table 4a-1 requires at
least (Nw)x(Nw-1)/2 search and compare operations applied to the text strings.
Furthermore, provided relations Single_well X Repairs have been somehow got and
the table 4a-2 is available, total repair cost definition for every well is stipulated by
Nw x Nra appropriate repair names search passes through the table 4a-2. Every such a
pass requires about Nr/2 search and compare operations, exact number of operations
depending on rows arrangement in the table 4a-2.
Let us discuss the result obtained. Relational scheme seems to be certainly less
complicated in realization then the semantic one. The latter requires some expenses
connected with appropriate database objects' links establishing, and, additionally,
relational model has more understandable structure. But the semantic model has
undoubted advantages in data storage and retrieval organization. In the above-
discussed example a quantity of the compare and search operations needed to solve
rather simple task in both of the models differs significantly. For example, provided
number of wells Nw equals 100, average number of repair per a well equals 3 and
total number of repairs types Nr equals 6, total number of operations reaches about
5700 in the relational model and 300 in the semantic one.
Taking into account the above-stated one may conclude that the relational model use
is preferable only when small amount of data with prevailing simple interrelations
(one-to-one) is engaged in. In this case the relational scheme realization simplicity
becomes evident advantage, the data and operations redundancy being compensated
by computer capacities. |
||||
|
|
|
|