tailieunhanh - PATTERNS OF DATA MODELING- P10

PATTERNS OF DATA MODELING- P10: 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. | 26 Chapter 2 Tree Template Each BOM must be acyclic. Figure Overlapping tree Mechanical parts model. PartRole is the usage of a Part. The same part may have different usages within the same BOM and across BOMs. There are overlapping trees because a PartRole can belong to multiple BOMs such as one for a product s design engineering BOM another for how it is built manufacturing BOM and another for how it is maintained service BOM . Figure shows engineering and manufacturing BOMs for a lamp. Engineering BOM for a Lamp Manufacturing BOM for a Lamp Level PartName PartRoleName Qty Level PartName PartRoleName Qty 01 L101 Lamp 1 01 L101 Lamp 1 02 SA1 Socket asm 1 02 SA1 Socket asm 1 03 WA1 Wiring assembly 1 03 WA1 Wiring assembly 1 04 Plg2 Plug 1 04 WAC1 Wiring asm core 1 04 C2 Cord 1 05 Plg2 Plug 1 04 PS1 Power switch 1 05 C2 Cord 1 04 Scr1 Switch screw 2 05 PS1 Power switch 1 03 Sktl Socket 3 04 Scr1 Switch screw 2 02 SS1 Shade support 1 03 Skt1 Socket 3 02 Shd5 Shade 1 02 SS1 Shade support 1 02 BA1 Base assembly 1 02 Shd5 Shade 1 03 M2 Mat 1 02 BA1 Base assembly 1 03 B1 Base 1 03 BAC1 Base asm core 1 03 Sft1 Shaft 1 04 B1 Base 1 03 Scr25 Shaft-base screw 1 04 Sft1 Shaft 1 02 Scr25 Sft-shd supp scr 1 04 Scr25 Shaft-base screw 1 03 M2 Mat 1 02 Scr25 Sft-shd supp scr 1 Figure Overlapping tree Sample data for mechanical parts model. Tree Changing over Time Template 27 Tree Changing over Time Template UML Template For some applications there is a need not only to store trees but also to store the history of trees as they evolve over time. Figure shows such a template. To represent change over time the template separates an entity from its position in a tree node . The timeline for an entity can differ from that of its various positions. All nodes have a parent except the root node. There may not be any cycles of nodes. A child has at most one parent at a time. Figure Tree changing over time UML template. Use when you must store the .

TỪ KHÓA LIÊN QUAN