You are on page 1of 31

Advanced Modeling Topics

Overview
Patterns
Drawing conventions
Generic modeling

Patterns
Similar structure
Similar rules and constraints?

Patterns: MasterDetail
Characteristic: consists of
An instance of B only exists in the context of an A
Metaphor: Master Detail
A

consists
of
part of
B

Pattern: Basket
Characteristic:
container for various types of items
Items may be of different types
Metaphor: Shopping Basket
A
X
consists
of

part of
B

A
B

X
Y
Z

Patterns: Classification
Characteristic: classified by, grouped by
Q exists independently, may be related
Metaphor: EMPLOYEEDEPARTMENT
Q

classifying
classified by
P

Patterns: Hierarchy
Characteristic: manager of / subordinate of
Additional constraints to guard hierarchical nature
Metaphor: MotherChild

A
# Id

Patterns: Chain
Characteristic: preceded by / followed by
Sequence is important
Metaphor: Elephants
preceded
by
BEAD
# Id

followed
by
A

CHAIN

BEAD
# Seqno

Patterns: Network
Characteristic: pairs
Every A can be connected to every A
(sometimes: to every other A)
Metaphor: Web Document with Hyperlinks
A
A

Bill of Material
PRODUCT
# Code

product of
with

COMPOSITION
* Quantity
part in Needed

in

PRODUCTS
Code
914.53
914.54
914.55
914.56

Name
AAAAAAAA
AAA
BBBBBBBBB
CCCCCCC
DDDDD

COMPOSITIONS
Prod_code Part_codeQuantity
854.01
604.18
1
854.01
604.19
1
854.01
914.54
2
914.54
914.55
1
914.54
914.56
1
934.76
915.12
3

Bill
of
Material
Example
854.01

914.54

604.18
604.19

914.54

914.55
914.56

Symmetric Relationship
GROUP
# Id
consists of 2
in
S

Group_id
1
1
2
2
3
3

S
S1
S2
S3
S4
S5
S6

Patterns: Roles
Characteristic: is / is 1:m (or 1:1) relationships
Metaphor: PersonMany Hats
(not necessarily concurrent...)

P
Q

Roles

PERSON ROLE
TYPE
ROLE

roles

PERSON

PRESIDENT

COUNTRY

appointing

appointed
by
MINISTER

PARTY
LEADER

DEPARTMENT
PARTY

Fan Trap
Characteristic: ring of m:m related entities
Metaphor: ABC Combination

A
C

B
AB
AC

BC
C

Fan Trap Resolved


A

AB

BC

ABC
AB functions as
list of values

ABC

ABC
BC functions as
list of values

Patterns: Data Warehouse


Characteristic: multidimensional, many, many
detail instances
Metaphor: star model
Stars may be strangely shaped:
Snowflake model
B
A

C
X

July

D
E

Drawing Conventions
high volumes

high volumes

Not important which convention you choose,


as long as you follow one of them

Use Conventions Sensibly

But:
Readability first

Model Readability
A

B
C

E
D
F

Takes space
Subject to taste
F

Generic Modeling
MANUFACTURER
* Name

FILM
* AsaTRIPOD
* Height
LENS
CAMERA
* Focal
BODY
Distance
* Weight

MANUFACTURER
* Name

ARTICLE
TYPE

ARTICLE
o Weight
o Focal Distance
o Height
o Asa Number
o ...

Generic Modeling
ARTICLE TYPE
* Definition
Prop1
o Definition
Prop2
o Definition
Prop3
o Definition
MANUFACTURER
Prop4
...
* Name

ARTICLE
o Property1
o Property2
o Property3
o Property4
o Property5
o Property6
o Property7
o Property8

Generic Model
ARTICLE TYPE

ARTICLE

PROPERTY

ARTICLE PROPERTY VALUE


o Value

Generic
having some kind of
relationship with
THING
having some kind of
relationship with

More Generic
THING

ASSOCIATION

More Generic Plus


THING
TYPE

THING

ASSOCIATION
TYPE

ASSOCIATION

Most Generic?
THING TYPE

ASSOCIATION
TYPE

THING
ASSOCIATION
PROPERTY

THING PROPERTY VALUE

Best of Two Worlds


CUSTOMER

generic
ARTICLE TYPE

ORDER HEADER
ARTICLE

PROPERTY

ORDER ITEM
down to earth

ARTICLE PROPERTY VALUE

Summary
Patterns
Show similarities
Invent your wheel only once

Generic models

Reduce the number of entities dramatically


Are more complex to implement
Are very flexible
Are usually the best choice in unstable situations

Quiz
1.
2.
3.
4.
5.
6.

Explain Master Detail Pattern?


What is Classification Pattern?
Explain Chain Pattern?
Explain Network Pattern?
Explain Fan Trap Pattern?
Explain Data Warehouse or Data Mart ?
And Find
Example?
7. What is Generic Modeling?
(5Pts)

You might also like