1. Trang chủ
  2. » Công Nghệ Thông Tin

PATTERNS OF DATA MODELING- P42 potx

5 243 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 5
Dung lượng 149,94 KB

Nội dung

192 Chapter 14 / Generic Diagrams Entity name EntityType name {unique} * 1 SimpleEntityExpandableEntity Model 1 * 1 * Connection 1 1 input output ExpansionMapping 1 * 1 * inner outer 1 1 0 10 1 subModel Figure 14.9 Model subject area, no ports: UML model. name * * connectionID Connection modelID (FK) inputEntityID (FK) outputEntityID (FK) entityDiscrim entityID Entity entityName entityDiscrim entityTypeID (FK) ExpandableEntity expandableEntityID (FK) submodelID (FK) SimpleEntity simpleEntityID (FK) entityTypeID EntityType entityTypeName (AK1.1) modelID (FK) expansionMappingID ExpansionMapping expandableEntityID (FK) innerEntityID (FK) (AK1.1) outerEntityID (FK) (AK2.1) modelID Model Figure 14.10 Model subject area, no ports: IDEF1X model. modelName 14.4 Model–Diagram Binding Subject Area 193 14.4 Model–Diagram Binding Subject Area Figure 14.11 and Figure 14.12 map diagram constructs to model constructs. Each diagram construct corresponds to one model construct. A model construct can appear in multiple places. These additional relationships lead to three more homomorphisms (considering also the previous subject areas). 14.5 DiagramType Subject Area Figure 14.13 and Figure 14.14 determine the kind of diagram construct from the Diagram- Type and kind of model construct. For example, the combination of a DiagramType and an EntityType determine the IconType. Thus North America and Europe may have different Di- agramTypes leading to different IconTypes for a heat exchanger. A DiagramType specifies the kind of notation for a Diagram. For example, IDEF1X and IE are alternative DiagramTypes for a data structure model. Figure 14.11 Model–diagram binding subject area: UML model. Diagram constructs correspond to model constructs. 1 * Model Diagram 1 * Entity Icon 1 * Port Tab 1 * Connection Line Figure 14.12 Model–diagram binding subject area: IDEF1X model. Model_Diagram diagramID (FK) modelID (FK) modelID Model entityID Entity . . . portID Port . . . connectionID Connection . . . Entity_Icon iconID (FK) entityID (FK) Port_Tab tabID (FK) portID (FK) Connection_Line lineID (FK) connectionID (FK) lineID Line . . . tabID Tab . . . iconID Icon . . . diagramID Diagram . . . . . . 194 Chapter 14 / Generic Diagrams An IconType is the graphical shape for an Icon. The IconType can be determined as fol- lows. An Icon corresponds to an Entity and an Entity has an EntityType. An Icon also belongs to a Diagram of a specific DiagramType. The combination of a DiagramType and an Entity- Type determines an IconType for the Icon. A TabType is the graphical shape for a Tab. TabType can be determined in a similar man- ner to IconType. A LineType is the graphical representation for a Line that renders a Connection. 14.6 Diagram Example, Revisited Figure 14.15 shows populated relational database tables for the equipment example at the start of the chapter (Figure 14.2). Figure 14.13 Diagram type subject area: UML model. The kind of model construct determines the kind of diagram construct. ** 1 * DiagramType name {unique} EntityType IconType name {unique} ** 1 * PortType TabType name {unique} LineType name {unique} lineType * 1 pixelDefinition pixelDefinition lineThickness Figure 14.14 Diagram type subject area: IDEF1X model. lineTypeID LineType lineTypeName (AK1.1) tabTypeID TabType tabTypeName (AK1.1) iconTypeID IconType iconTypeName (AK1.1) lineType diagramTypeID DiagramType diagramTypeName (AK1.1) lineTypeID (FK) DiagramType_PortType diagramTypeID (FK) portTypeID (FK) tabTypeID (FK) portTypeID PortType . . . DiagramType_EntityType diagramTypeID (FK) entityTypeID (FK) iconTypeID (FK) entityTypeID EntityType . . . lineThickness pixelDefinitionpixelDefinition 14.6 Diagram Example, Revisited 195 Icon table icon ID iconName scale position icon TypeI D diagram ID 1 Compressor 1 1 2 Condenser 2 1 3 Expansion valve 31 4 Evaporator 2 1 Figure 14.15 Populated tables for air conditioner example. Tab table tab ID tab Name scale position icon ID tab TypeI D 1 in 1 1 2 out 1 1 3 tube in 2 1 4 tube out 2 1 5 in 3 1 6 out 3 1 7 tube in 4 1 8 tube out 4 1 IconType table icon TypeID iconType Name pixel Defi- nition 1 compressor 2 air heat exchanger 3 expansion valve TabType table tab TypeID tabType Name pixel Definition 1 standard Line table line ID line TypeID diagram ID inlet TabID outlet TabID 1 11 81 2 11 23 3 11 45 4 11 67 LineType table line Type ID line Type Name line Type line Thickness 1 standard solid medium Diagram table diagram ID diagram Name diagram Type ID 1 air conditioner 1 DiagramType table diagram TypeID diagram Type Name line TypeI D 1 equipment flow diagram 1 Port_Tab table tab ID portID 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 Entity_Icon table iconID entityID 1 1 2 2 3 3 4 4 196 Chapter 14 / Generic Diagrams Figure 14.15 Populated tables for air conditioner example (continued). E n tit y t a bl e entity ID entityName entity Discrim entity Type ID model ID 1 Compressor simple 1 1 2 Condenser simple 2 1 3 Expansion valve simple 3 1 4 Evaporator simple 4 1 Port table port ID port Name port TypeID entity ID 1 in 1 1 2 out 1 1 3 tube in 1 2 4 tube out 1 2 5 in 1 3 6 out 1 3 7 tube in 1 4 8 tube out 1 4 E n tit y T ype t a bl e entity TypeID entityType Name 1 compressor 2 condenser 3 expansion valve 4 evaporator PortType table tabTypeID tabTypeName pixelDefinition 1 standard Connection table connection ID input PortID output PortID model ID 1 811 2 231 3 451 4 671 Model table modelID modelName 1 air conditioner SimpleEntity table simple EntityID 1 2 3 4 ExpandableEntity table expandable EntityID submodel ID ExpansionMapping table expansion MappingID expandable EntityID inner PortID outer PortID DiagramType_PortType table diagramTypeID portTypeID tabTypeID 111 DiagramType_EntityType table diagram TypeID entity TypeID icon TypeID 111 122 133 142 Connection_Line table lineID connectionID 1 1 2 2 3 3 4 4 Model_Diagram table diagramID modelID 1 1 . relational database tables for the equipment example at the start of the chapter (Figure 14.2). Figure 14.13 Diagram type subject area: UML model. The kind of model construct determines the kind of. Area Figure 14.13 and Figure 14.14 determine the kind of diagram construct from the Diagram- Type and kind of model construct. For example, the combination of a DiagramType and an EntityType determine. Entity and an Entity has an EntityType. An Icon also belongs to a Diagram of a specific DiagramType. The combination of a DiagramType and an Entity- Type determines an IconType for the Icon. A

Ngày đăng: 05/07/2014, 06:20