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

PATTERNS OF DATA MODELING- P42 potx

5 244 0
Tài liệu đã được kiểm tra trùng lặp

Đ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

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

name * * connectionID Connection modelID FK inputEntityID FK outputEntityID FK entityDiscrim entityID Entity entityName entityDiscrim entityTypeID FK ExpandableEntity expandableEntityID

Trang 1

192 Chapter 14 / Generic Diagrams

Entity

name

EntityType

name {unique}

*

1

SimpleEntity ExpandableEntity

Model

1

*

1

*

1 input

output

ExpansionMapping

1

*

1

outer 1 1

0 1 0 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

Trang 2

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 DiagramDiagram-Type 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

.

.

Trang 3

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 IconEntity-Type 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

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

pixelDefinition pixelDefinition

Trang 4

Icon table

icon

ID

iconName scale position icon

TypeID

diagram ID

3 Expansion

valve

Figure 14.15 Populated tables for air conditioner example

Tab table

tab

ID

tab

Name

scale position icon

ID

tab TypeID

IconType table

icon TypeID

iconType Name

pixel Defi-nition

exchanger

valve

TabType table

tab TypeID

tabType Name

pixel Definition

Line table

line

ID

line

TypeID

diagram

ID

inlet TabID

outlet TabID

LineType table

line Type ID

line Type Name

line Type

line Thickness

1 standard solid medium

Diagram table

diagram ID

diagram Name

diagram TypeID

1 air conditioner 1

DiagramType table

diagram

TypeID

diagram

TypeName

line TypeID

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

Trang 5

196 Chapter 14 / Generic Diagrams

Figure 14.15 Populated tables for air conditioner example (continued)

Entity table

entity

ID

entityName entity

Discrim

entity TypeID

model ID

valve

Port table

port

ID

port

Name

port TypeID

entity ID

EntityType table

entity TypeID

entityType Name

valve

PortType table

tabTypeID tabTypeName pixelDefinition

Connection table

connection

ID

input

PortID

output PortID

model ID

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

DiagramType_EntityType table

diagram

TypeID

entity

TypeID

icon TypeID

Connection_Line table

lineID connectionID

Model_Diagram table

diagramID modelID

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