From IT Skills
Jump to: navigation, search

Since PlantUML generates only picture without hyperlinks on it then PlantUML diagram should have legend (Template:legend) with links on pages of this mediawiki.

Understanding UML Class Relationships[edit | edit source]

Dependency[edit | edit source]

uses in method call

Association[edit | edit source]

uses as field

aggregation[edit | edit source]

when A1 goes out of scope (e.g. garbage collected), the instance of B1 does not (of necessity) go out of scope

composition[edit | edit source]

when A1 goes out of scope, then B1 also goes out of scope

multiplicity[edit | edit source]

association arrow label indicates the number of instances involved in the association

label "1"[edit | edit source]

means - NOT NULL

Generalization[edit | edit source]

Symbolizes inheritance in OOP. Also is named as "Extension".

Realization[edit | edit source]

is somewhat related to generalization, but a bit different: it is the interface implementation of a class in OOP

SQL model as a UML class diagram[edit | edit source]

some recommendations...

  • at the begining
hide methods
hide circle
  • foreign key is shown as #Association which beginning is labelled with field name
  • foreign key not null is labelled with "1" at #Association's end

stereotype near class name[edit | edit source]

  • U - rows may be updated
  • D - rows may be deleted

it is obvious that record may be added to any table

by default U and D are turned on

stereotype near field name[edit | edit source]

  • <<identity>> - key, int, identity
  • <<uniqueIdentity>> - key, Guid
  • <<key>> - key, not auto-set
  • <<unique>> - unique index
  • <<auto>> - not null, auto applied; mostly time of adding or updating
  • <<not null>> - analog of #label "1"

naming rules[edit | edit source]

  • table name is FromUpper
  • field name is camelCase