bite sized training sessions data modelling part 1 of 2 data model diagrams l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Bite sized training sessions: Data Modelling – Part 1 of 2 Data Model Diagrams PowerPoint Presentation
Download Presentation
Bite sized training sessions: Data Modelling – Part 1 of 2 Data Model Diagrams

Loading in 2 Seconds...

play fullscreen
1 / 24

Bite sized training sessions: Data Modelling – Part 1 of 2 Data Model Diagrams - PowerPoint PPT Presentation


  • 242 Views
  • Uploaded on

Bite sized training sessions: Data Modelling – Part 1 of 2 Data Model Diagrams. Feb 2011 Prepared by Guy Beauchamp Group Projects & IT. Objectives. To understand What is a data model … and what it is not! Why do data modelling To be able to Read a data model Build a data model

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Bite sized training sessions: Data Modelling – Part 1 of 2 Data Model Diagrams' - hayes


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
bite sized training sessions data modelling part 1 of 2 data model diagrams
Bite sized training sessions:Data Modelling – Part 1 of 2Data Model Diagrams

Feb 2011

Prepared by Guy Beauchamp

Group Projects & IT

objectives
Objectives

To understand

What is a data model … and what it is not!

Why do data modelling

To be able to

Read a data model

Build a data model

Critically review a data model

what is a data model
What is a data model?

Specification of the data that is required in order for

The solution to meet it’s objectives

Processes to be able to run

A data model comprises:

A diagram showing the requireddata dependencies

A set of data definitions required foreach attribute on the diagram

Also referred to as:

Logical Data Model (LDM)

Entity Model

Entity Relationship Diagram (ERD)

Data Dictionary

Object Model

Class Diagram

Data Structure

…etc!

what a data model is not
What a data model is not

A physical design for storing data

A database design

Database table definitions

Object specification

why do data modelling
Why do data modelling?

Data & Process Requirements

Designed

As

Designed

As

Designed

As

Designed

As

Physical data Specs

Manual Procedures

Manipulate

Database

Designs

System Specs

Manipulate

Solution Specification

data model components
Data Model Components

Entity A real world thing or an interaction between 2 or more real world things.

Relationship How and why entities depend on each other (the relationship) and what that relationship is (the cardinality of the relationship).

Attribute The atomic pieces of information that we need to know about entities.

entity
Entity

“A real world thing or an interaction between 2 or more real world things.”

  • A real world thing
    • E.g. Customer, Product
  • An event between 2 or more entities
    • E.g. Sale
type entities
‘Type’ Entities
  • Categorises other entities
  • Holds information that applies to sets of other entities
  • Very common
  • Typical relationship cardinality is mandatory 1:M
  • Relationship names add little value
relationships
Relationships

“How entities depend on each other in terms of why the entities depend on each other (the relationship) and what that relationship is (the cardinality of the relationship).”

There are dependency business rules between two entities – can be shown as:

NB: there are other notations.

relationship names
Relationship Names

Always name relationships in at least one direction (except for those involving Type entities)

Especially useful when there is more than one relationship between two entities:

reading relationships
Reading relationships

One Customer (entity)may (cardinality) purchase (relationship name)one or more (cardinality) SALEs (entity)

One SALE must be purchased by one CUSTOMER

Tip – start with the word “One”, never “MANY”

attributes
Attributes

“The atomic pieces of information that we need to know about entities”

Customer(entity)

Sale

Product

primary keys
Primary Keys
  • A special kind of attribute, set of attributes and/or relationships
  • Is the way for the business to identify 1 unique instance of an entity
  • Certain rules apply to a primary key:
    • Must not be repeated within an entity
    • Once assigned can never be updated (only deleted)
    • Must be the way that the business uniquely identify an instance of an entity

Customer(entity)

Which attribute makes the best primary key?

Why?

slide14

Primary Keys are the navigation method for relationships

Customer(entity)

Purchased

Sale

Discussion:

What is the PK of Sale?

Do PKs need to be shown at the ‘FK’ end of a relationship?

Purchased via

Product

5 data modelling no no s
5 Data Modelling “No-No”s
  • No repeating attributes on entities
    • E.g. On a Customer entity “1st child name”, “2nd child name”…
  • No attributes on entities that do not depend on the primary key
    • E.g. On Customer entity “order date”
  • No “Many to Many”s between entities
    • E.g. Product ordered by many customers, a customer orders many products
  • No “one to one”s between entities (usually)
    • E.g. Customer has one Membership Card and a Membership Card is for one Customer
  • No circular relationships between entities (usually)
    • E.g. next slide
circular relationships17
Circular relationships

How do we fix this circular relationship?

process for producing a data model diagram
Process for producing a data model diagram
  • identify candidate entities
  • select a central candidate entity
  • define the primary key
  • work through the rest of the candidate entities
      • consider whether it is in scope
        • define the primary key
        • define the relationship(s) between the candidate entity and all other candidate entities on the diagram
        • create description entities as needed
        • fully express the cardinality of the relationship(s)
        • name the relationship(s) as needed
  • validate everything with the user
  • review and refine.
minor exercise
Minor Exercise

I own a florist’s shop called My Florist.

I want to start emailing reminders to customers when special occasions are due for which they have brought flowers in the past – for example a spouse’s birthday.

Let’s draw up a data model to support that process.

major exercise
Major Exercise
  • You are business analysts working for a company called re-Evolution Coffee Houses Ltd
  • You have been given a piece of work – ref handouts
  • Produce a data model showing
    • Entities
    • Primary Keys
    • Relationships
  • Suggestion: follow the process for producing a data model diagram 4 slides previously
  • The business users will be available for questions
slide23

Major Exercise

  • If you need to make an assumption about business requirements or anything else then document it
  • Time allowed: 1 hour
  • Deliverable:
    • Flip chart data model
    • Flip chart assumptions
  • Be prepared to present your data model to the other team
  • Don’t worry about completing the exercise
  • Do worry about the quality of what you get through
and finally
…and finally
  • Any questions?
  • Further resources…
  • Feedback
  • Thank-you!