SlideShare a Scribd company logo
1 of 24
Download to read offline
UML for Data Architects:
A Painless Introduction

Dr. Vladimir Bacvanski
vladimir.bacvanski@scispike.com
About the Speaker: Dr. Vladimir Bacvanski

 Mission: to make organizations successful in
  solving problems through adoption of modern
  software technologies
  – Founder of SciSpike – a training and consulting firm
    specializing in advanced software technologies
  – Over two decades of experience with software and data
    technologies
  – Vladimir has helped a number of organizations
    including US Treasury, Federal Reserve Bank, US Navy,
    IBM, Dell, Hewlett Packard, JP Morgan Chase, Nokia,
                                      g
    Lucent, Nortel Networks, General Electric, BAE Systems,
    AMD, and others
  – Frequent speaker at leading industry events.
       q        p              g        y
  – For three years in a row awarded the title "IBM
    Information Champion" for his contributions to the
    information management community
                       g                  y


                        www.scispike.com   Copyright © SciSpike 2011   2
Outline

 What is UML?
 How to approach UML? (aka "Avoiding pain")
 UML diagrams: use only what you need!
         g             y      y
 Representing structure: class (aka type) diagrams
 UML for database design
 Automation
 Conclusion




                   www.scispike.com   Copyright © SciSpike 2011   3
What is UML?

 The UML is a graphical language for
  software intensive systems
    f
  – Note: UML is just a notation:
    the way we visualize our decisions
     h           i li        d ii
 UML covers a broad area of software
  development
  d l         t
 UML is a standard: it enables you to
  express your models i a way th t
                  d l in        that
  can be understood by others




                   www.scispike.com   Copyright © SciSpike 2011   4
Models and Diagrams




 Model is a view of a system from a particular perspective
 Diagram visually presents elements of a model
  – One model can be presented with several diagrams, each
    focusing on a separate aspect

                   www.scispike.com   Copyright © SciSpike 2011   5
UML Diagrams




                                                 Diagrams in italics are introduced in UML 2

           www.scispike.com   Copyright © SciSpike 2011                                        6
Choose your Approach to UML!

        Painful                                                  Painless

• Focus on > 95% of UML                   • Focus on < 5% of UML
  that
  th t you d 't need
           don't     d                      that
                                            th t you need d
• Start with a 1000+                      • Start with a subset
  pages UML Reference                       relevant to data
• Avoid practical                           modeling
  examples                                • Seek practical guides
• Use UML for all the                       and examples
  wrong reasons                           • Use UML to
                                            communicate and
                                            automate

                  www.scispike.com   Copyright © SciSpike 2011              7
Modeling Data with UML Class Diagrams

 A subset of UML Class Diagram is very close to notations
  used in d
     d data modeling
                 d l
 UML Class Diagrams have features not needed for data
  modeling:
    d l
  – Operations (methods)
  – Visibility (public, private, …)
 We can use only a subset that make sense for data modeling:
  – Classes (aka "types")
  – Attributes
  – Associations
  – Generalization

                    www.scispike.com   Copyright © SciSpike 2011   8
UML Classes and Attributes
                                    Class
                                    Similar to entity in ERD.
    Customer
                                    Class name
                                    Typically capitalized.

                                    Attribute Compartment
                                    The only compartment we care about. 
                                    UML classes can have other 
                                    compartments, e.g. for operations.
                                    It is fine to skip parts we don't need!
                                                     pp



                                                                    Note:
                                                                    N t
Attribute Name   Attribute Type                                     High level class 
Typically        E.g. String, Integer,…                             diagrams typically don't 
lowercase.       but also other class names                         need primary and 
                                                                    foreign keys. 
                 www.scispike.com       Copyright © SciSpike 2011                               9
UML Associations
 Association             Association Name                        Multiplicity
                         Usually skipped.                        *: zero or many
                                                                 1..*: one or many
                                                                 0..1: zero or one




 Association Role
 Start from a class, follow the 
 Start from a class follow the                                  Note:
 association, read the role of the                              Foreign key attributes are 
                                                                not needed
 associated objects.


                       www.scispike.com   Copyright © SciSpike 2011                           10
Navigability


                    1..*                             *
     Person                                                        Address
                                       homeAddress




 High level diagrams typically do not show navigability
 Navigability is a design decision!
  – It is a bad practice to assign navigability prematurely
  – Typically not needed for modeling when we target
    relational databases


                    www.scispike.com   Copyright © SciSpike 2011             11
Associations vs. Attributes


       Person
       P                       Multiplicity
                               M lti li it                                   Company
                                                                             C


 employer: Company[*]
   p y        p y[ ]                                                   employee: Person[1..*]
                                                                         p y           [    ]




 In UML, attributes and associations are equivalent!
 Choose the representation that is more suitable to the
  reader
 Important relationships are often represented as
  associations – they bring the visual emphasis

                        www.scispike.com   Copyright © SciSpike 2011                            12
Association Class




                                                                  Association 
                                                                  Class
                                                                  Cl




 Association class allows to attach information to an
  association
  – Often refined into two associations to a class


                   www.scispike.com   Copyright © SciSpike 2011                  13
Association Class Refined




 Association classes are commonly refined in lower level
                                 y
  diagrams



                   www.scispike.com   Copyright © SciSpike 2011   14
Semantics of Aggregation and Composition

                                           1
          Car                                                     Engine


                               Aggregation
                                           1
          Car                                                     Engine


                               Composition

 Aggregation: shortcut for "has" relationship
                             has
  – Does not have a well defined semantics. Use sparingly!
 Composition lifetime of the owner determines the lifetime
  Composition:
  of the owned objects
  – Similar to "cascading"
                cascading
                   www.scispike.com   Copyright © SciSpike 2011            15
Generalization (aka Inheritance)

                                     Employee
                                                                             Generalization
                                                                             G     li i




         Engineer                        Manager                          TechWriter




 Subclasses extend superclasses with additional attributes
  and associations
 This relationship eventually needs to be mapped to tables
  for relational database design
  – Several solutions possible with different performance impact. Choice
                                                          impact
    depends on the typical pattern of usage.
                      www.scispike.com        Copyright © SciSpike 2011                       16
Constraints




 Constraints can be expressed as:
  – Plain text
  – OCL: Object Constraint Language, part of UML
    • Not common in mainstream projects
    • Enforcable



                   www.scispike.com   Copyright © SciSpike 2011   17
Organizing UML Models: Packages

                                          A package is a
                                           structuring element
  Customer
 Management                                – It contains other
                                             elements and
                                             diagrams
   Sales
                                          P k
                                           Packages are important
                                                          i
                                           for managing
                                           complexity of models
                                          Prefer models organized
  Inventory                                into packages to huge
                                           diagrams


              www.scispike.com   Copyright © SciSpike 2011          18
Mapping UML to ER Models…

 Class  Entity
  – Add primary key
 Simple Attribute Type  Column Type
 Complex Attribute Type  Relationship to an entity for the
  attribute type
 Association  Foreign Key relationships
  – Use role names for foreign keys
  – Many-to-many association  add an associative table
  – Aggregation: treat as ordinary relationships




                   www.scispike.com   Copyright © SciSpike 2011   19
…Mapping UML to ER Models

 Generalization: use the usual mappings:
  – Table per class hierarchy
  – Table per subclass
  – Table per concrete class
 Constraints
  – Set constraints on the database
  – Some only enforceable in application logic
             y                 pp          g



  This is just a simplified set of rules to get you going!


                     www.scispike.com   Copyright © SciSpike 2011   20
UML for Database Design




 Agile teams often use UML for both software and database
  design
 UML data modeling profile introduces extensions to UML:
  – <<PK>>, <<FK>>, <<Auto Generated>>, <<Not Null>>,
    <<View>>, <<Stored Procedures>>,…
 Use relational data types
  – String  CHAR(x), VARCHAR(x)

                    www.scispike.com   Copyright © SciSpike 2011   21
Automation

                                                                        Code

                                 Transformer
                                                                        DDL

          Input
                                                                        Models
         Models
                                                                    Output

 Tools can convert from UML to ERD and vice versa
 Model transformation tools operate at a MOF/EMF level and
  can transform UML to various targets
  – Visual Domain Specific Languages (DSLs) based on UML may provide
    better alignment with the p
              g               problem domain than vanilla UML

                     www.scispike.com   Copyright © SciSpike 2011                22
Conclusion

 You will need just a small part of UML!
 UML is a common starting point for data models
 Mapping of UML to ER is quite straightforward
    pp g                  q          g
 Knowing UML makes you a more significant player in the
  software development p
                 p     process




                   www.scispike.com   Copyright © SciSpike 2011   23
Getting in Touch

 Email: vladimir.bacvanski@scispike.com
 Blog: http://www.OnBuildingSoftware.com/
 Twitter: http://twitter.com/OnSoftware
              p
 LinkedIn: http://www.linkedin.com/in/VladimirBacvanski


 SciSpike Training and Consulting:
  http://www.scispike.com
  http://www scispike com
  – Related training for data architects:
    • Visual Modeling with UML
    • Mastering Data Modeling with InfoSphere Data Architect


                   www.scispike.com   Copyright © SciSpike 2011   24

More Related Content

What's hot

Architecture solution architecture method
Architecture solution architecture methodArchitecture solution architecture method
Architecture solution architecture methodChris Eaton
 
Learn Togaf 9.1 in 100 slides!
Learn Togaf 9.1 in 100 slides!Learn Togaf 9.1 in 100 slides!
Learn Togaf 9.1 in 100 slides!Sam Mandebvu
 
TOGAF 9.2 - Transforming Business
TOGAF 9.2  -  Transforming BusinessTOGAF 9.2  -  Transforming Business
TOGAF 9.2 - Transforming BusinessReal IRM
 
Documenting software architecture
Documenting software architectureDocumenting software architecture
Documenting software architectureHimanshu
 
Solution Architecture Framework
Solution Architecture FrameworkSolution Architecture Framework
Solution Architecture FrameworkFirmansyahIrma1
 
Requirements Gathering And Management
Requirements Gathering And ManagementRequirements Gathering And Management
Requirements Gathering And ManagementAlan McSweeney
 
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門Salesforce Developers Japan
 
Siebel business process flow
Siebel business process flowSiebel business process flow
Siebel business process flowmohammed a
 
Gartner's IT Score Wallchart
Gartner's IT Score WallchartGartner's IT Score Wallchart
Gartner's IT Score WallchartPaul Sullivan
 
11 deployment diagrams
11 deployment diagrams11 deployment diagrams
11 deployment diagramsBaskarkncet
 
Understanding and Applying The Open Group Architecture Framework (TOGAF)
Understanding and Applying The Open Group Architecture Framework (TOGAF)Understanding and Applying The Open Group Architecture Framework (TOGAF)
Understanding and Applying The Open Group Architecture Framework (TOGAF)Nathaniel Palmer
 
Experiences with enterprise architecture using togaf and ibm rational system ...
Experiences with enterprise architecture using togaf and ibm rational system ...Experiences with enterprise architecture using togaf and ibm rational system ...
Experiences with enterprise architecture using togaf and ibm rational system ...james_dzidek
 
鷲崎 メトリクスの基礎とGQM法によるゴール指向の測定 2014年12月18日 日本科学技術連名SQiP研究会 演習コースI ソフトウェア工学の基礎
鷲崎 メトリクスの基礎とGQM法によるゴール指向の測定 2014年12月18日 日本科学技術連名SQiP研究会 演習コースI ソフトウェア工学の基礎鷲崎 メトリクスの基礎とGQM法によるゴール指向の測定 2014年12月18日 日本科学技術連名SQiP研究会 演習コースI ソフトウェア工学の基礎
鷲崎 メトリクスの基礎とGQM法によるゴール指向の測定 2014年12月18日 日本科学技術連名SQiP研究会 演習コースI ソフトウェア工学の基礎Hironori Washizaki
 
Service Oriented Architecture (SOA) [5/5] : SOA Best Practices
Service Oriented Architecture (SOA) [5/5] : SOA Best PracticesService Oriented Architecture (SOA) [5/5] : SOA Best Practices
Service Oriented Architecture (SOA) [5/5] : SOA Best PracticesIMC Institute
 
SWEBOKにみるソフトウェアエンジニアリングの全体、および、 つながる時代のソフトウェアモデリング&品質
SWEBOKにみるソフトウェアエンジニアリングの全体、および、 つながる時代のソフトウェアモデリング&品質 SWEBOKにみるソフトウェアエンジニアリングの全体、および、 つながる時代のソフトウェアモデリング&品質
SWEBOKにみるソフトウェアエンジニアリングの全体、および、 つながる時代のソフトウェアモデリング&品質 Hironori Washizaki
 
JaSSTよいテストプロセスの作り方
JaSSTよいテストプロセスの作り方JaSSTよいテストプロセスの作り方
JaSSTよいテストプロセスの作り方崇 山﨑
 
All about ISO/IEC/IEEE 42010 (r5)
All about ISO/IEC/IEEE 42010 (r5)All about ISO/IEC/IEEE 42010 (r5)
All about ISO/IEC/IEEE 42010 (r5)Rich Hilliard
 

What's hot (20)

Architecture solution architecture method
Architecture solution architecture methodArchitecture solution architecture method
Architecture solution architecture method
 
Learn Togaf 9.1 in 100 slides!
Learn Togaf 9.1 in 100 slides!Learn Togaf 9.1 in 100 slides!
Learn Togaf 9.1 in 100 slides!
 
TOGAF 9.2 - Transforming Business
TOGAF 9.2  -  Transforming BusinessTOGAF 9.2  -  Transforming Business
TOGAF 9.2 - Transforming Business
 
Documenting software architecture
Documenting software architectureDocumenting software architecture
Documenting software architecture
 
Solution Architecture Framework
Solution Architecture FrameworkSolution Architecture Framework
Solution Architecture Framework
 
Requirements Gathering And Management
Requirements Gathering And ManagementRequirements Gathering And Management
Requirements Gathering And Management
 
Documenting Software Architectures
Documenting Software ArchitecturesDocumenting Software Architectures
Documenting Software Architectures
 
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
モダンなイベント駆動型システム連携を学ぼう〜Platform Events 入門
 
Siebel business process flow
Siebel business process flowSiebel business process flow
Siebel business process flow
 
Gartner's IT Score Wallchart
Gartner's IT Score WallchartGartner's IT Score Wallchart
Gartner's IT Score Wallchart
 
11 deployment diagrams
11 deployment diagrams11 deployment diagrams
11 deployment diagrams
 
Togaf introduction ver1 0
Togaf introduction ver1 0Togaf introduction ver1 0
Togaf introduction ver1 0
 
Understanding and Applying The Open Group Architecture Framework (TOGAF)
Understanding and Applying The Open Group Architecture Framework (TOGAF)Understanding and Applying The Open Group Architecture Framework (TOGAF)
Understanding and Applying The Open Group Architecture Framework (TOGAF)
 
Experiences with enterprise architecture using togaf and ibm rational system ...
Experiences with enterprise architecture using togaf and ibm rational system ...Experiences with enterprise architecture using togaf and ibm rational system ...
Experiences with enterprise architecture using togaf and ibm rational system ...
 
鷲崎 メトリクスの基礎とGQM法によるゴール指向の測定 2014年12月18日 日本科学技術連名SQiP研究会 演習コースI ソフトウェア工学の基礎
鷲崎 メトリクスの基礎とGQM法によるゴール指向の測定 2014年12月18日 日本科学技術連名SQiP研究会 演習コースI ソフトウェア工学の基礎鷲崎 メトリクスの基礎とGQM法によるゴール指向の測定 2014年12月18日 日本科学技術連名SQiP研究会 演習コースI ソフトウェア工学の基礎
鷲崎 メトリクスの基礎とGQM法によるゴール指向の測定 2014年12月18日 日本科学技術連名SQiP研究会 演習コースI ソフトウェア工学の基礎
 
Service Oriented Architecture (SOA) [5/5] : SOA Best Practices
Service Oriented Architecture (SOA) [5/5] : SOA Best PracticesService Oriented Architecture (SOA) [5/5] : SOA Best Practices
Service Oriented Architecture (SOA) [5/5] : SOA Best Practices
 
About itil v3
About itil v3About itil v3
About itil v3
 
SWEBOKにみるソフトウェアエンジニアリングの全体、および、 つながる時代のソフトウェアモデリング&品質
SWEBOKにみるソフトウェアエンジニアリングの全体、および、 つながる時代のソフトウェアモデリング&品質 SWEBOKにみるソフトウェアエンジニアリングの全体、および、 つながる時代のソフトウェアモデリング&品質
SWEBOKにみるソフトウェアエンジニアリングの全体、および、 つながる時代のソフトウェアモデリング&品質
 
JaSSTよいテストプロセスの作り方
JaSSTよいテストプロセスの作り方JaSSTよいテストプロセスの作り方
JaSSTよいテストプロセスの作り方
 
All about ISO/IEC/IEEE 42010 (r5)
All about ISO/IEC/IEEE 42010 (r5)All about ISO/IEC/IEEE 42010 (r5)
All about ISO/IEC/IEEE 42010 (r5)
 

Viewers also liked

Dache: A Data Aware Caching for Big-Data Applications Using the MapReduce Fra...
Dache: A Data Aware Caching for Big-Data Applications Usingthe MapReduce Fra...Dache: A Data Aware Caching for Big-Data Applications Usingthe MapReduce Fra...
Dache: A Data Aware Caching for Big-Data Applications Using the MapReduce Fra...Govt.Engineering college, Idukki
 
UML and Data Modeling - A Reconciliation
UML and Data Modeling - A ReconciliationUML and Data Modeling - A Reconciliation
UML and Data Modeling - A Reconciliationdmurph4
 
Data Modeling for Big Data
Data Modeling for Big DataData Modeling for Big Data
Data Modeling for Big DataDATAVERSITY
 
Win Friends and Influence People... with DSLs
Win Friends and Influence People... with DSLsWin Friends and Influence People... with DSLs
Win Friends and Influence People... with DSLsVladimir Bacvanski, PhD
 
High performance database applications with pure query and ibm data studio.ba...
High performance database applications with pure query and ibm data studio.ba...High performance database applications with pure query and ibm data studio.ba...
High performance database applications with pure query and ibm data studio.ba...Vladimir Bacvanski, PhD
 
Introduction to Hadoop at Data-360 Conference
Introduction to Hadoop at Data-360 ConferenceIntroduction to Hadoop at Data-360 Conference
Introduction to Hadoop at Data-360 ConferenceAvkash Chauhan
 
Introduction to Apache Pig
Introduction to Apache PigIntroduction to Apache Pig
Introduction to Apache PigAvkash Chauhan
 
Data-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your Business
Data-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your BusinessData-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your Business
Data-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your BusinessDATAVERSITY
 
CDO Webinar: 2017 Trends in Data Strategy
CDO Webinar: 2017 Trends in Data StrategyCDO Webinar: 2017 Trends in Data Strategy
CDO Webinar: 2017 Trends in Data StrategyDATAVERSITY
 
Data-Ed Slides: Exorcising the Seven Deadly Data Sins
Data-Ed Slides: Exorcising the Seven Deadly Data SinsData-Ed Slides: Exorcising the Seven Deadly Data Sins
Data-Ed Slides: Exorcising the Seven Deadly Data SinsDATAVERSITY
 
Data-Ed Slides: Data Architecture Strategies - Constructing Your Data Garden
Data-Ed Slides: Data Architecture Strategies - Constructing Your Data GardenData-Ed Slides: Data Architecture Strategies - Constructing Your Data Garden
Data-Ed Slides: Data Architecture Strategies - Constructing Your Data GardenDATAVERSITY
 
Data strategy in a Big Data world
Data strategy in a Big Data worldData strategy in a Big Data world
Data strategy in a Big Data worldCraig Milroy
 
Data Governance
Data GovernanceData Governance
Data GovernanceSambaSoup
 
A New Way of Thinking About MDM
A New Way of Thinking About MDMA New Way of Thinking About MDM
A New Way of Thinking About MDMDATAVERSITY
 
Big Data Analytics Strategy and Roadmap
Big Data Analytics Strategy and RoadmapBig Data Analytics Strategy and Roadmap
Big Data Analytics Strategy and RoadmapSrinath Perera
 
Data Governance: Keystone of Information Management Initiatives
Data Governance: Keystone of Information Management InitiativesData Governance: Keystone of Information Management Initiatives
Data Governance: Keystone of Information Management InitiativesAlan McSweeney
 

Viewers also liked (20)

Dache: A Data Aware Caching for Big-Data Applications Using the MapReduce Fra...
Dache: A Data Aware Caching for Big-Data Applications Usingthe MapReduce Fra...Dache: A Data Aware Caching for Big-Data Applications Usingthe MapReduce Fra...
Dache: A Data Aware Caching for Big-Data Applications Using the MapReduce Fra...
 
UML and Data Modeling - A Reconciliation
UML and Data Modeling - A ReconciliationUML and Data Modeling - A Reconciliation
UML and Data Modeling - A Reconciliation
 
Data Modeling for Big Data
Data Modeling for Big DataData Modeling for Big Data
Data Modeling for Big Data
 
Win Friends and Influence People... with DSLs
Win Friends and Influence People... with DSLsWin Friends and Influence People... with DSLs
Win Friends and Influence People... with DSLs
 
Introduction to pig
Introduction to pigIntroduction to pig
Introduction to pig
 
High performance database applications with pure query and ibm data studio.ba...
High performance database applications with pure query and ibm data studio.ba...High performance database applications with pure query and ibm data studio.ba...
High performance database applications with pure query and ibm data studio.ba...
 
Introduction to Hadoop at Data-360 Conference
Introduction to Hadoop at Data-360 ConferenceIntroduction to Hadoop at Data-360 Conference
Introduction to Hadoop at Data-360 Conference
 
Introduction to Apache Pig
Introduction to Apache PigIntroduction to Apache Pig
Introduction to Apache Pig
 
Data-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your Business
Data-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your BusinessData-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your Business
Data-Ed Slides: Data-Centric Strategy & Roadmap - Supercharging Your Business
 
CDO Webinar: 2017 Trends in Data Strategy
CDO Webinar: 2017 Trends in Data StrategyCDO Webinar: 2017 Trends in Data Strategy
CDO Webinar: 2017 Trends in Data Strategy
 
Data-Ed Slides: Exorcising the Seven Deadly Data Sins
Data-Ed Slides: Exorcising the Seven Deadly Data SinsData-Ed Slides: Exorcising the Seven Deadly Data Sins
Data-Ed Slides: Exorcising the Seven Deadly Data Sins
 
Data-Ed Slides: Data Architecture Strategies - Constructing Your Data Garden
Data-Ed Slides: Data Architecture Strategies - Constructing Your Data GardenData-Ed Slides: Data Architecture Strategies - Constructing Your Data Garden
Data-Ed Slides: Data Architecture Strategies - Constructing Your Data Garden
 
Big Data Modeling
Big Data ModelingBig Data Modeling
Big Data Modeling
 
Data strategy in a Big Data world
Data strategy in a Big Data worldData strategy in a Big Data world
Data strategy in a Big Data world
 
Data Governance
Data GovernanceData Governance
Data Governance
 
Data Strategy
Data StrategyData Strategy
Data Strategy
 
A New Way of Thinking About MDM
A New Way of Thinking About MDMA New Way of Thinking About MDM
A New Way of Thinking About MDM
 
8 Steps to Creating a Data Strategy
8 Steps to Creating a Data Strategy8 Steps to Creating a Data Strategy
8 Steps to Creating a Data Strategy
 
Big Data Analytics Strategy and Roadmap
Big Data Analytics Strategy and RoadmapBig Data Analytics Strategy and Roadmap
Big Data Analytics Strategy and Roadmap
 
Data Governance: Keystone of Information Management Initiatives
Data Governance: Keystone of Information Management InitiativesData Governance: Keystone of Information Management Initiatives
Data Governance: Keystone of Information Management Initiatives
 

Similar to UML for Data Architects (20)

SE UML.ppt
SE UML.pptSE UML.ppt
SE UML.ppt
 
Bai giang-uml-14jan14
Bai giang-uml-14jan14Bai giang-uml-14jan14
Bai giang-uml-14jan14
 
Presentation on uml
Presentation on umlPresentation on uml
Presentation on uml
 
UML and Case study
UML and Case study UML and Case study
UML and Case study
 
UNIFIED MODELLING LANGUAGE (UML)
UNIFIED MODELLING LANGUAGE (UML)UNIFIED MODELLING LANGUAGE (UML)
UNIFIED MODELLING LANGUAGE (UML)
 
DISE - OOAD Using UML
DISE - OOAD Using UMLDISE - OOAD Using UML
DISE - OOAD Using UML
 
Ooad lab manual
Ooad  lab manualOoad  lab manual
Ooad lab manual
 
UML.pdf
UML.pdfUML.pdf
UML.pdf
 
Uml Presentation
Uml PresentationUml Presentation
Uml Presentation
 
UML
UMLUML
UML
 
PhD Core Paper Unit 5 _Part 1 Software Design and UML Use Case Modeling.pdf
PhD Core Paper Unit 5 _Part 1 Software Design and UML Use Case Modeling.pdfPhD Core Paper Unit 5 _Part 1 Software Design and UML Use Case Modeling.pdf
PhD Core Paper Unit 5 _Part 1 Software Design and UML Use Case Modeling.pdf
 
Case stydy cs701
Case stydy cs701 Case stydy cs701
Case stydy cs701
 
Uml overview modified
Uml overview modifiedUml overview modified
Uml overview modified
 
Unit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).pptUnit-II(STATIC UML DIAGRAMS).ppt
Unit-II(STATIC UML DIAGRAMS).ppt
 
l1_introuml.pdf
l1_introuml.pdfl1_introuml.pdf
l1_introuml.pdf
 
Srs
SrsSrs
Srs
 
Unified Modeling Language
Unified Modeling LanguageUnified Modeling Language
Unified Modeling Language
 
Intro Uml
Intro UmlIntro Uml
Intro Uml
 
Claas diagram
Claas diagramClaas diagram
Claas diagram
 
Claas diagram
Claas diagramClaas diagram
Claas diagram
 

Recently uploaded

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessPixlogix Infotech
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

UML for Data Architects

  • 1. UML for Data Architects: A Painless Introduction Dr. Vladimir Bacvanski vladimir.bacvanski@scispike.com
  • 2. About the Speaker: Dr. Vladimir Bacvanski  Mission: to make organizations successful in solving problems through adoption of modern software technologies – Founder of SciSpike – a training and consulting firm specializing in advanced software technologies – Over two decades of experience with software and data technologies – Vladimir has helped a number of organizations including US Treasury, Federal Reserve Bank, US Navy, IBM, Dell, Hewlett Packard, JP Morgan Chase, Nokia, g Lucent, Nortel Networks, General Electric, BAE Systems, AMD, and others – Frequent speaker at leading industry events. q p g y – For three years in a row awarded the title "IBM Information Champion" for his contributions to the information management community g y www.scispike.com Copyright © SciSpike 2011 2
  • 3. Outline  What is UML?  How to approach UML? (aka "Avoiding pain")  UML diagrams: use only what you need! g y y  Representing structure: class (aka type) diagrams  UML for database design  Automation  Conclusion www.scispike.com Copyright © SciSpike 2011 3
  • 4. What is UML?  The UML is a graphical language for software intensive systems f – Note: UML is just a notation: the way we visualize our decisions h i li d ii  UML covers a broad area of software development d l t  UML is a standard: it enables you to express your models i a way th t d l in that can be understood by others www.scispike.com Copyright © SciSpike 2011 4
  • 5. Models and Diagrams  Model is a view of a system from a particular perspective  Diagram visually presents elements of a model – One model can be presented with several diagrams, each focusing on a separate aspect www.scispike.com Copyright © SciSpike 2011 5
  • 6. UML Diagrams Diagrams in italics are introduced in UML 2 www.scispike.com Copyright © SciSpike 2011 6
  • 7. Choose your Approach to UML! Painful Painless • Focus on > 95% of UML • Focus on < 5% of UML that th t you d 't need don't d that th t you need d • Start with a 1000+ • Start with a subset pages UML Reference relevant to data • Avoid practical modeling examples • Seek practical guides • Use UML for all the and examples wrong reasons • Use UML to communicate and automate www.scispike.com Copyright © SciSpike 2011 7
  • 8. Modeling Data with UML Class Diagrams  A subset of UML Class Diagram is very close to notations used in d d data modeling d l  UML Class Diagrams have features not needed for data modeling: d l – Operations (methods) – Visibility (public, private, …)  We can use only a subset that make sense for data modeling: – Classes (aka "types") – Attributes – Associations – Generalization www.scispike.com Copyright © SciSpike 2011 8
  • 9. UML Classes and Attributes Class Similar to entity in ERD. Customer Class name Typically capitalized. Attribute Compartment The only compartment we care about.  UML classes can have other  compartments, e.g. for operations. It is fine to skip parts we don't need! pp Note: N t Attribute Name Attribute Type High level class  Typically  E.g. String, Integer,…  diagrams typically don't  lowercase.  but also other class names need primary and  foreign keys.  www.scispike.com Copyright © SciSpike 2011 9
  • 10. UML Associations Association Association Name Multiplicity Usually skipped. *: zero or many 1..*: one or many 0..1: zero or one Association Role Start from a class, follow the  Start from a class follow the Note: association, read the role of the  Foreign key attributes are  not needed associated objects. www.scispike.com Copyright © SciSpike 2011 10
  • 11. Navigability 1..* * Person Address homeAddress  High level diagrams typically do not show navigability  Navigability is a design decision! – It is a bad practice to assign navigability prematurely – Typically not needed for modeling when we target relational databases www.scispike.com Copyright © SciSpike 2011 11
  • 12. Associations vs. Attributes Person P Multiplicity M lti li it Company C employer: Company[*] p y p y[ ] employee: Person[1..*] p y [ ]  In UML, attributes and associations are equivalent!  Choose the representation that is more suitable to the reader  Important relationships are often represented as associations – they bring the visual emphasis www.scispike.com Copyright © SciSpike 2011 12
  • 13. Association Class Association  Class Cl  Association class allows to attach information to an association – Often refined into two associations to a class www.scispike.com Copyright © SciSpike 2011 13
  • 14. Association Class Refined  Association classes are commonly refined in lower level y diagrams www.scispike.com Copyright © SciSpike 2011 14
  • 15. Semantics of Aggregation and Composition 1 Car Engine Aggregation 1 Car Engine Composition  Aggregation: shortcut for "has" relationship has – Does not have a well defined semantics. Use sparingly!  Composition lifetime of the owner determines the lifetime Composition: of the owned objects – Similar to "cascading" cascading www.scispike.com Copyright © SciSpike 2011 15
  • 16. Generalization (aka Inheritance) Employee Generalization G li i Engineer Manager TechWriter  Subclasses extend superclasses with additional attributes and associations  This relationship eventually needs to be mapped to tables for relational database design – Several solutions possible with different performance impact. Choice impact depends on the typical pattern of usage. www.scispike.com Copyright © SciSpike 2011 16
  • 17. Constraints  Constraints can be expressed as: – Plain text – OCL: Object Constraint Language, part of UML • Not common in mainstream projects • Enforcable www.scispike.com Copyright © SciSpike 2011 17
  • 18. Organizing UML Models: Packages  A package is a structuring element Customer Management – It contains other elements and diagrams Sales  P k Packages are important i for managing complexity of models  Prefer models organized Inventory into packages to huge diagrams www.scispike.com Copyright © SciSpike 2011 18
  • 19. Mapping UML to ER Models…  Class  Entity – Add primary key  Simple Attribute Type  Column Type  Complex Attribute Type  Relationship to an entity for the attribute type  Association  Foreign Key relationships – Use role names for foreign keys – Many-to-many association  add an associative table – Aggregation: treat as ordinary relationships www.scispike.com Copyright © SciSpike 2011 19
  • 20. …Mapping UML to ER Models  Generalization: use the usual mappings: – Table per class hierarchy – Table per subclass – Table per concrete class  Constraints – Set constraints on the database – Some only enforceable in application logic y pp g This is just a simplified set of rules to get you going! www.scispike.com Copyright © SciSpike 2011 20
  • 21. UML for Database Design  Agile teams often use UML for both software and database design  UML data modeling profile introduces extensions to UML: – <<PK>>, <<FK>>, <<Auto Generated>>, <<Not Null>>, <<View>>, <<Stored Procedures>>,…  Use relational data types – String  CHAR(x), VARCHAR(x) www.scispike.com Copyright © SciSpike 2011 21
  • 22. Automation Code Transformer DDL Input Models Models Output  Tools can convert from UML to ERD and vice versa  Model transformation tools operate at a MOF/EMF level and can transform UML to various targets – Visual Domain Specific Languages (DSLs) based on UML may provide better alignment with the p g problem domain than vanilla UML www.scispike.com Copyright © SciSpike 2011 22
  • 23. Conclusion  You will need just a small part of UML!  UML is a common starting point for data models  Mapping of UML to ER is quite straightforward pp g q g  Knowing UML makes you a more significant player in the software development p p process www.scispike.com Copyright © SciSpike 2011 23
  • 24. Getting in Touch  Email: vladimir.bacvanski@scispike.com  Blog: http://www.OnBuildingSoftware.com/  Twitter: http://twitter.com/OnSoftware p  LinkedIn: http://www.linkedin.com/in/VladimirBacvanski  SciSpike Training and Consulting: http://www.scispike.com http://www scispike com – Related training for data architects: • Visual Modeling with UML • Mastering Data Modeling with InfoSphere Data Architect www.scispike.com Copyright © SciSpike 2011 24