tailieunhanh - PATTERNS OF DATA MODELING- P12

PATTERNS OF DATA MODELING- P12: Models provide the means for building quality software in a predictable manner. Models let developers think deeply about software and cope with large size and complexity. Developers can think abstractly before becoming enmeshed in the details of writing code. Although models are beneficial, they can be difficult to construct. That is where patterns come in. Patterns provide building blocks that help developers construct models faster and better. | 3 Directed Graph Template The directed graph is another term from graph theory. A directed graph is a set of nodes and a set of directed edges. Each directed edge originates at a source node and terminates at a target node which may be the same as the source node . The nodes of a directed graph can have any number of edges. Directed graphs arise for applications with important topology or connectivity. For example a directed graph is a natural representation for airline flights between airports. Figure shows two examples of directed graphs. Figure Sample directed graphs. A directed graph is a set of nodes and a set of directed edges that connect the nodes. t There are six templates for directed graphs. Simple directed graph. Similar to the simple tree Section but relaxes multiplicity constraints. Use when edges are unimportant and nodes have the same kind of data. Structured directed graph. Similar to the structured tree Section but relaxes multiplicity constraints. Use when edges are unimportant. Node and edge directed graph. Regards nodes and edges as peers. Treats nodes the same. Use when edges are important and have data of their own. 36 Simple Directed Graph Template 37 Connection directed graph. Promotes the connection between a node and an edge to an entity type. Treats nodes the same. Use when there is data for the connection itself as well as for nodes and edges. Simple directed graph changing over time. Stores variants of a directed graph. A particular directed graph can be extracted by specifying a time. Expresses nodes and implies edges. Use when the history of a directed graph must be recorded and edges are unimportant. Node and edge directed graph changing over time. Stores variants of a directed graph. A particular directed graph can be extracted by specifying a time. Expresses both nodes and edges. Use when the history of a directed graph must be recorded and edges are important. There appears to be no directed graph counterpart

TỪ KHÓA LIÊN QUAN