UML

Unified Modeling Language

Source — https://www.conceptdraw.com/

Type

  1. Behavioral UML Diagram
  2. Structural UML Diagram

Behavioral UML Diagram

Use case Diagram

  • What are going to be different feature in my system
  • Who will use those feature
Source — https://en.wikipedia.org/wiki/Use_case_diagram

Structural UML Diagram

Class diagrams

  • fields and methods in class
Class diagram — https://www.javatpoint.com/uml-class-diagram

Component diagrams

  • what are different component of software system and how do they interact
Component Diagram. Source — https://sparxsystems.com/enterprise_architect_user_guide/15.2/model_domains/componentdiagram.html

Use case Diagram

Key components

  • Actor — Someone who is going to be a client of the software systems
  • Use cases (diff features of the system)
  • System Boundary — Contains everything that is a responsibility of the system
  • Includes
Source — https://binaryterms.com/use-case-relationship.html
  • Extends — extension
Source — https://binaryterms.com/use-case-relationship.htmls

Steps to create a use case diagram

  1. Create system boundary
  2. Identify the actors of the system
  3. Start identifying the feature that have to be exposed
  4. Represent who is going to use what feature
Source — https://binaryterms.com/use-case-relationship.html
Sample Ecommerce app use case diagram

Class diagrams

  • represent blue print of whole software systems
    → classes
    → interfaces
    → abstract classes
    → relationship between classes
  • Access modifier representation: + = public, — = private , * = protected
  • Relationships:
    IS-A/Inheritance[Implementation of interface, Inheritance] — simple arrow
    HAS-A/Association [Composition, Aggregation] — arrow with diamond head
  • Aggregation (to collect)— object of child(City) can exist event without an associated parent(Human). [Human → City]
  • Composition (I have created/composed them) — cannot exist.
    [House → Room]
Source — https://www.cs.unc.edu/~stotts/COMP145/CRC/class.html
Source — https://www.geeksforgeeks.org/unified-modeling-language-uml-class-diagrams/

Schema Design

  • Persistence → Database [SQL | NoSQL (Schema less)]
  • Assume SQL DB

How to approach schema design

  • Find out all the entities in the system
  • For every entity create a table.
  • Cardinality — 1:1, 1:m, m:1, m:m
  • Whenever we have a relationship of 1:m or m:1, they can be represented in schema design by having the id of the 1 side (Batch) in the table of the m (Student) side.
  • For m:m relationship, always have a separate mapping table
    → for this kind of mapping table, we will have to handle constraint on application side.
  • Keep DB as light a possible [ keep constraints on app side, eases when we want to change DB]
  • For every relationship we might have attribute with respect to relationship
    → put info in mapping table itself

--

--

No responses yet