next up previous contents index
Next: 3.2 Creating Nodes Up: 3 Diagram Editing Previous: 3 Diagram Editing

3.1 Definitions

Diagrams that are made by a TCM diagram editor are a special kind of graph  with a certain representation  (layout, view). Each TCM editor is a specialization of a generic graph editor. A graph consists of a set of subjects.  A subject is either a node  or an edge  that connects two nodes. Subjects are of different node types  and edge types.  For example, a TDFD data flow diagram graph could contain nodes of type Data Process and nodes of type Data Store, and it could contain edges of type Data flow.

The graphs that are edited in TCM have only edges that connect exactly two (not necessarily different) nodes. So some kind of relationship between more than two nodes, for instance a specialization relationship in an ER diagram is specified in TCM as a node (which is called in this case a taxonomy junction node) that is connected by three or more edges (which is in this case one is-a relationship edge and two or more so-called empty edges).

In a representation of a graph, nodes and edges are shown as shapes.  In the case of nodes the representing shapes are boxes, diamonds, ellipses etc. In the case of edges, shapes are lines, arrows etc. In general, there is a many-many relationship between a certain subject type and a certain shape type and also between a particular subject instance and a particular shape instance. It is possible that a subject type is represented by more than one shape type. For instance a class relationship diagram made by TCRD can contain different kinds of class boxes. It is also possible that a particular subject instance is represented by more than one shape instance. This is necessary when you want to represent the same subject at different positions in the diagram. But, nevertheless, in most cases, the relationship between subjects and representations is one-one. For this reason, subjects and shapes can be identified most of the time.

A TCM diagram  is composed of a graph, its representing shapes, and extra diagram information, such as the diagram name, the author and the creation date.

A TCM diagram is empty after creation. You can build it up by interactively drawing it with the TCM user interface, node by node, edge by edge.

TCM documents should satisfy certain constraints.   Most constraints are specific for the particular diagram technique supported by the editor. Many constraints are checked by TCM. The constraints that are checked, are classified according to how TCM deals with possible violations.

Built-in constraints.    These are constraints which are built-in and which can never be violated because there is no command in the user interface to achieve that. We give three examples of built-in constraints: 1. an edge connects exactly two (not necessarily different) existing nodes, 2. an entity type in TERD is always represented by a box and 3. the label of an is-a relationship edge is always "is_a".
Immediately enforced constraints.   These are constraints that are immediately enforced by TCM if that is possible. When you perform a command that would violate a constraint that is immediately enforced, this command is rejected immediately by TCM and a pop-up window with an error message is displayed. We give two examples of immediately enforced constraints: 1. an entity type and a relationship node in TERD cannot be connected by an is-a relationship and 2. two entity types cannot have the same (non-empty) name.

Soft constraints.   These are constraints that can be violated. Soft constraints are needed because the TCM user interface demands that you draw only one node or one edge at the time, and only edit the label of an existing subject. So there are certain commands that produce diagrams that might violate a constraint and that can not be immediately enforced.

We give two examples of soft constraints: 1. all entity types have a non-empty name and 2. a relationship node in TERD should be connected to entity type nodes by two or more different edges.

Soft constraints are checked by TCM when the Check Document   command is issued by you. Check Document displays a list of error messages in a pop-up window. As opposed to the previous two classes of constraints, you are responsible for correcting the diagram.

It is possible that some immediately enforced constraints can still be violated by some user command. Such a constraint is then classified as both an immediately enforced and a soft constraint. Example: if a part of a diagram is copied and pasted into the same diagram, the unique name constraint is a soft constraint as it can be violated by the paste command. But when you have edited the text of one of the nodes in the diagram, and you issue the stop edit command, the unique name constraint can and will be immediately enforced.

next up previous contents index
Next: 3.2 Creating Nodes Up: 3 Diagram Editing Previous: 3 Diagram Editing
Frank Dehne,Faculty of Mathematics and Computer Science, Vrije Universiteit Amsterdam