next up previous contents index
Next: 5 Behavior View Editors Up: 4 Data View Editors Previous: 4.1 The Entity-Relationship Diagram

Subsections

4.2 The Class-Relationship Diagram Editor (TCRD)

    

4.2.1 Nodes and Edges

See figure 4.7 for the subjects and the representing shapes that are used in TCRD. In figure 4.8 you can see which node types can be connected by which edge types. These are immediately enforced constraints. Note that object classes can be represented by three different box types. In figure 4.8 only the double box type variant is shown but each double box could be replaced by a single or triple box.


  
Figure 4.7: Class-relationship diagram nodes and edges.
\begin{figure}
\begin{center}
\begin{tabular}
{\vert c p{1.3in}\vert c p{1.3in}\...
 ...mpty edge & &\index{Empty edge} \  \hline
\end{tabular}\end{center}\end{figure}


  
Figure 4.8: Permitted Class-relationship connections.
\begin{figure}
\begin{center}

\includegraphics {p/CRconnections.eps}\end{center}\end{figure}

4.2.2 Classes and Relationships

The object class node type of TCRD can be seen as an extension of the entity type node type of TERD. Like TERD, TCRD has binary relationships and functions. Value type nodes are not needed in TCRD because attribute names and value types are now included in the object class in the form of attribute definitions. Also unlike TERD, TCRD does not have a separate node type for relationships. Relationship nodes can be   represented by the same type of class box as an object class box. The only difference between a real object class instance and a relationship instance, is that the latter has two or   more components. A relationship instance is called a link. The components make up the identity of a link. The components of a link are objects or other links. The component relationship is a projection function represented by a dashed arrow. This function is called a component function.   Like ordinary functions, component functions can have a cardinality constraint label (see figure 4.9). There is no other visual difference between an object class instance and a relationship instance in TCRD than the component functions. So, in TCRD a link can have attributes, actions and it can be part of a taxonomic structure.


  
Figure 4.9: Example CR diagram, showing a relationship class.
\begin{figure}
\begin{center}

\includegraphics {p/componentexample.eps}\end{center}\end{figure}

TCRD inherits all the applicable constraints of TERD, on the understanding that object classes in TCRD replace the entity types from TERD. Furthermore, see section 4.1.2 for the use of cardinality constraints and role names, see section 4.1.3 for the use of taxonomies and see figure 4.6 for all the other constraints that are checked in TERD.

4.2.3 Attributes and Actions

    The class-relationship editor TCRD offers object classes that can have a number of attributes and a number of actions [*]. See figure 4.10 for an example.


  
Figure 4.10: Example object class with attribute and action definitions.
\begin{figure}
\begin{center}

\includegraphics {p/classexample.eps}
\end{center}\end{figure}

An object class can be represented by a single box in which only the name label is visible, by a double box  in which the name label and all the attributes are visible, or by a triple box   in which the name label, all the attributes and all the actions are visible. For each representing shape type there is a separate tiled button in the list of nodes in the main window, but they are all representations of the same node type, Object class. You can change the representation of an existing object class by the change box type   command in a submenu of the Edit menu. These commands modify only the shapes of the selected boxes, The other shapes, unselected boxes and shapes that are not boxes, are not updated. These commands only change the shape, the attributes and actions are preserved.

Each attribute definition and each action definition occupies a single text line. Any text on a single line in the appropriate part of a box is considered as an attribute or action definition. Attribute names are in the second compartment and action names are in the third compartment of the class box. You can perform the following operations on attributes and actions:

4.2.4 Taxonomic Structures

  Like TERD, TCRD has taxonomic structures with taxonomy junctions, is-a relationships and empty edges. TCRD offers a second kind of taxonomy junction which is called mode junction and which is represented by a small dashed circle instead of a small solid circle.   Mode junctions are used for constructing mode specializations. For an example mode specialization, see figure 4.11. The concept of mode specialization as a form of type migration is explained in appendix C. Except the different shape of the circle, mode specializations are drawn in the same way as static specializations, having the same constraints as in section 4.1.3.


  
Figure 4.11: Example mode specialization.
\begin{figure}
\begin{center}

\includegraphics {p/modeexample.eps}
\end{center}\end{figure}

An is-a relationship (without a junction) between two object classes, and an is-a relationship connected to a taxonomy junction are considered as static specializations, whereas is-a relationships connected to a mode junctions are considered as dynamic specializations.   Both kinds of specializations can be combined, with the exception that a mode type should not be specialized statically. This is an immediately enforced constraint.

4.2.5 Constraint Checking

TCRD checks also the soft and immediately enforced constraints that are summarized in figure 4.12. Note that TCRD checks a lot of constraints but it does not check yet all plausible constraints on CRDs. For instance, name conflicts between actions and attributes of classes that are is-a related are not yet discovered and the syntax of attributes and actions is still very liberal.


  
Figure 4.12: Immediately checked and soft constraints on CRDs.
\begin{figure}
\begin{center}

\includegraphics {p/CRconstraints.eps}\end{center}\end{figure}


next up previous contents index
Next: 5 Behavior View Editors Up: 4 Data View Editors Previous: 4.1 The Entity-Relationship Diagram
Frank Dehne,Faculty of Mathematics and Computer Science, Vrije Universiteit Amsterdam
11/17/1997