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

Building Lakehouses on Delta Lake with SQL Analytics Primer
Building Lakehouses on Delta Lake with SQL Analytics PrimerBuilding Lakehouses on Delta Lake with SQL Analytics Primer
Building Lakehouses on Delta Lake with SQL Analytics PrimerDatabricks
 
World Health Organisation - Knowledge Representation and Reasoning for Public...
World Health Organisation - Knowledge Representation and Reasoning for Public...World Health Organisation - Knowledge Representation and Reasoning for Public...
World Health Organisation - Knowledge Representation and Reasoning for Public...Neo4j
 
Big Data: Its Characteristics And Architecture Capabilities
Big Data: Its Characteristics And Architecture CapabilitiesBig Data: Its Characteristics And Architecture Capabilities
Big Data: Its Characteristics And Architecture CapabilitiesAshraf Uddin
 
A Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and HudiA Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and HudiDatabricks
 
The Graph Database Universe: Neo4j Overview
The Graph Database Universe: Neo4j OverviewThe Graph Database Universe: Neo4j Overview
The Graph Database Universe: Neo4j OverviewNeo4j
 
Exploring Levels of Data Literacy
Exploring Levels of Data LiteracyExploring Levels of Data Literacy
Exploring Levels of Data LiteracyDATAVERSITY
 
Workshop Introduction to Neo4j
Workshop Introduction to Neo4jWorkshop Introduction to Neo4j
Workshop Introduction to Neo4jNeo4j
 
Snowflake Automated Deployments / CI/CD Pipelines
Snowflake Automated Deployments / CI/CD PipelinesSnowflake Automated Deployments / CI/CD Pipelines
Snowflake Automated Deployments / CI/CD PipelinesDrew Hansen
 
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...Databricks
 
Managing your ML lifecycle with Azure Databricks and Azure ML
Managing your ML lifecycle with Azure Databricks and Azure MLManaging your ML lifecycle with Azure Databricks and Azure ML
Managing your ML lifecycle with Azure Databricks and Azure MLParashar Shah
 
Spark DataFrames and ML Pipelines
Spark DataFrames and ML PipelinesSpark DataFrames and ML Pipelines
Spark DataFrames and ML PipelinesDatabricks
 
Getting Started with Delta Lake on Databricks
Getting Started with Delta Lake on DatabricksGetting Started with Delta Lake on Databricks
Getting Started with Delta Lake on DatabricksKnoldus Inc.
 
Building the Rail Network Digital Twin at CSX
Building the Rail Network Digital Twin at CSXBuilding the Rail Network Digital Twin at CSX
Building the Rail Network Digital Twin at CSXNeo4j
 
Data Democratization for Faster Decision-making and Business Agility (ASEAN)
Data Democratization for Faster Decision-making and Business Agility (ASEAN)Data Democratization for Faster Decision-making and Business Agility (ASEAN)
Data Democratization for Faster Decision-making and Business Agility (ASEAN)Denodo
 
Sql vs NoSQL-Presentation
 Sql vs NoSQL-Presentation Sql vs NoSQL-Presentation
Sql vs NoSQL-PresentationShubham Tomar
 
Migrating on premises workload to azure sql database
Migrating on premises workload to azure sql databaseMigrating on premises workload to azure sql database
Migrating on premises workload to azure sql databasePARIKSHIT SAVJANI
 
Migrating with Debezium
Migrating with DebeziumMigrating with Debezium
Migrating with DebeziumMike Fowler
 
Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]
Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]
Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]Olivier Travers
 

What's hot (20)

Building Lakehouses on Delta Lake with SQL Analytics Primer
Building Lakehouses on Delta Lake with SQL Analytics PrimerBuilding Lakehouses on Delta Lake with SQL Analytics Primer
Building Lakehouses on Delta Lake with SQL Analytics Primer
 
World Health Organisation - Knowledge Representation and Reasoning for Public...
World Health Organisation - Knowledge Representation and Reasoning for Public...World Health Organisation - Knowledge Representation and Reasoning for Public...
World Health Organisation - Knowledge Representation and Reasoning for Public...
 
Big Data: Its Characteristics And Architecture Capabilities
Big Data: Its Characteristics And Architecture CapabilitiesBig Data: Its Characteristics And Architecture Capabilities
Big Data: Its Characteristics And Architecture Capabilities
 
A Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and HudiA Thorough Comparison of Delta Lake, Iceberg and Hudi
A Thorough Comparison of Delta Lake, Iceberg and Hudi
 
The Graph Database Universe: Neo4j Overview
The Graph Database Universe: Neo4j OverviewThe Graph Database Universe: Neo4j Overview
The Graph Database Universe: Neo4j Overview
 
Exploring Levels of Data Literacy
Exploring Levels of Data LiteracyExploring Levels of Data Literacy
Exploring Levels of Data Literacy
 
Data lake
Data lakeData lake
Data lake
 
Workshop Introduction to Neo4j
Workshop Introduction to Neo4jWorkshop Introduction to Neo4j
Workshop Introduction to Neo4j
 
Snowflake Automated Deployments / CI/CD Pipelines
Snowflake Automated Deployments / CI/CD PipelinesSnowflake Automated Deployments / CI/CD Pipelines
Snowflake Automated Deployments / CI/CD Pipelines
 
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
A Tale of Three Apache Spark APIs: RDDs, DataFrames, and Datasets with Jules ...
 
Data Domain-Driven Design
Data Domain-Driven DesignData Domain-Driven Design
Data Domain-Driven Design
 
Managing your ML lifecycle with Azure Databricks and Azure ML
Managing your ML lifecycle with Azure Databricks and Azure MLManaging your ML lifecycle with Azure Databricks and Azure ML
Managing your ML lifecycle with Azure Databricks and Azure ML
 
Spark DataFrames and ML Pipelines
Spark DataFrames and ML PipelinesSpark DataFrames and ML Pipelines
Spark DataFrames and ML Pipelines
 
Getting Started with Delta Lake on Databricks
Getting Started with Delta Lake on DatabricksGetting Started with Delta Lake on Databricks
Getting Started with Delta Lake on Databricks
 
Building the Rail Network Digital Twin at CSX
Building the Rail Network Digital Twin at CSXBuilding the Rail Network Digital Twin at CSX
Building the Rail Network Digital Twin at CSX
 
Data Democratization for Faster Decision-making and Business Agility (ASEAN)
Data Democratization for Faster Decision-making and Business Agility (ASEAN)Data Democratization for Faster Decision-making and Business Agility (ASEAN)
Data Democratization for Faster Decision-making and Business Agility (ASEAN)
 
Sql vs NoSQL-Presentation
 Sql vs NoSQL-Presentation Sql vs NoSQL-Presentation
Sql vs NoSQL-Presentation
 
Migrating on premises workload to azure sql database
Migrating on premises workload to azure sql databaseMigrating on premises workload to azure sql database
Migrating on premises workload to azure sql database
 
Migrating with Debezium
Migrating with DebeziumMigrating with Debezium
Migrating with Debezium
 
Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]
Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]
Microsoft Power Stack 2019 [Power BI, Excel, Azure & Friends]
 

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

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 

Recently uploaded (20)

AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 

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