Details of the decomposition

The ERD in Figure 8.3 gives only a global perspective how the Matchings and the Program are decomposed into relations. Details of implementation are expressed in terms of the Unified Modeling Language Diagrams, see Figure 11.1.

The relations are represented as UML Class objects. Each Class object is denoted by its name and a list of attributes, along with their data types. An attribute denoted with '#', is the primary key for a given relation.

Figure 11.1: Implementation of the ERD using UML diagrams
\includegraphics[height=0.8\textwidth,width=\textwidth]{pic/tab-tng3-1}


Table 11.2: From the ERD to Relations
ERD Relation Description
table-predicate ratablepred the External Matching
tp-argument ratparg attributes of the Jelly View
predicate-table rapredtable the Internal Matching
clause raclause a clause of the decomposed Prolog Program
argument raclarg argument of the clause
logical operator raoperator the clause separator
has ratppt a many-to-many relationship between table-predicate and predicate-table
consists_of ratpcl a many-to-many relationship between table-predicate and clause


The Internal Matching, External Matching and Logic Program are labeled with UML Notes. The relation names resemble entity names in Figure 8.3, but they are usually shorter and preceded with 'ra' keyword.

The relationships are marked as UML Aggregate Roles which denote multiple allowance constraints. Each Aggregate Role is uniquely labeled.

The related attributes are indicated by their names at both ends of each association. A foreign key side is indicated by a diamond. UML Components define the basic contents for a given relation.

The description below refers to both Figures 8.3 and 11.1, and explains how the ER diagram, shown in Figure 8.3, is transformed into relations, which are shown in Figure 11.1. The External Matching is implemented using ratablepred, for table-predicate (Figure 8.3), and ratparg for tp-argument (Figure 8.3). The Internal Matching is covered by rapredtable which implements predicate-table. And finally, the Logic Program is provided by raclause, which covers clause , raclarg, which covers argument, and raoperator, which holds all valid logical operators and corresponds to logical operator. The following auxiliary relations are used to provide many-to-many relationships: ratppt (it stands for: table-predicate-predicate-table), which is a relationship between the Internal Matching and External Matching, ratpcl (table-predicate-clause) , which states a relationship between the External Matching and Logic Program. The above relationships are summarized in Table 11.2.

Igor Wojnicki 2005-11-07