Download presentation
Presentation is loading. Please wait.
1
Tutorial 3 Data Modelling
2
Why do data modelling? Conceptual Logical view of data structures & attributes required in inter-process flows Documented Observations/Meetings/Interviews Other Work Documents of all sorts eg Policies, Procedural Guides Read, comprehend & translate Business Process Modelling Logical Data Modelling using UML Notations Data Modelling Eg using BPMN notations Physical Data Modelling using MS Access Entity Relationship Diagram Notations Selected Database System Implementation view of data structures & attributes required in inter-process flows
3
Data Modelling Paradigms
Database organisation concepts: ICT Terms Excel or Access Terms Data files Data tables Data fields/attributes Data table columns Records (groups of fields) Data table rows Database Groups of Data Files stored in a server machine Data File / Table Database – Interlinking Data Files/Tables Column 1 (Field 1) ….. …… Column N (Field N) Row 1 (Record 1) Data …….. Row N (Record N) Column 1 (Field 1) ….. …… Column N (Field N) Row 1 (Record 1) Data …….. Row N (Record N) Column 1 (Field 1) ….. …… Column N (Field N) Row 1 (Record 1) Data …….. Row N (Record N) Column 1 (Field 1) ….. …… Column N (Field N) Row 1 (Record 1) Data …….. Row N (Record N) Column 1 (Field 1) ….. …… Column N (Field N) Row 1 (Record 1) Data …….. Row N (Record N) Column 1 (Field 1) ….. …… Column N (Field N) Row 1 (Record 1) Data …….. Row N (Record N) Column 1 (Field 1) ….. …… Column N (Field N) Row 1 (Record 1) Data …….. Row N (Record N)
4
Logical Data Modelling using UML Notations
Data File / Table Database – Interlinking Data Files/Tables Column 1 (Field 1) ….. …… Column N (Field N) Row 1 (Record 1) Data …….. Row N (Record N) Column 1 (Field 1) ….. …… Column N (Field N) Row 1 (Record 1) Data …….. Row N (Record N) Column 1 (Field 1) ….. …… Column N (Field N) Row 1 (Record 1) Data …….. Row N (Record N) Column 1 (Field 1) ….. …… Column N (Field N) Row 1 (Record 1) Data …….. Row N (Record N) Column 1 (Field 1) ….. …… Column N (Field N) Row 1 (Record 1) Data …….. Row N (Record N) Column 1 (Field 1) ….. …… Column N (Field N) Row 1 (Record 1) Data …….. Row N (Record N) Column 1 (Field 1) ….. …… Column N (Field N) Row 1 (Record 1) Data …….. Row N (Record N) We visually describe their relationships using data modelling languages Some fields are primary or foreign keys of data files/tables Logical Data Modelling using UML Notations Physical Data Modelling using MS Access Entity Relationship Diagram Notations Metaphor example: Cantonese dialect Eg Mandarin dialect
5
Physical Data Modelling MS Access Entity Relationship Diagram Modelling
The work you did for Part 2 sets up the data tables (ie data entities), and the keys and relationships and model them in the MS Access Relationship Screen
6
Review Tutorial Tasks
7
Tutorial Activity 3 Bunnings has operations in every Australian State. Each department can employ multiple employees (or no employee), but each employee must be assigned to one department only. Every sales order made must be assigned to one employee, and each employee can generate multiple sales orders (but it is possible that an employee will have no sales at all). Each sales order must include at least one product, and each product type can be sold many times. Which org perspective are you modelling? A Bunning’s state operation’s data model Identify NOUNS and linking VERBS List of NOUNS Data Files List of VERBS Data Files’ Relationship-lines/links Data entities are interlinked by relationship lines, described in terms of an explanation label and multiplicities From the 2 lists, draw the data entity boxes and link them by using the: verbs to label/describe their relationship-lines and descriptive quantities to label the multiplicities Relationship List: Employs or Assigns – links department & employee Generates – links employee & sales orders Includes – links sale orders and products {Classifies} – links product & product type Data Entities List: Department Employee Sales Order Product Product Type
8
Bunnings has operations in every Australian State
Bunnings has operations in every Australian State. Each department can employ multiple employees (or no employee), but each employee must be assigned to one department only. Every sales order made must be assigned to one employee, and each employee can generate multiple sales orders (but it is possible that an employee will have no sales at all). Each sales order must include at least one product, and each product type can be sold many times. classifies 1..* 1..1 Product Product Type 1..* Includes 1..1 generates 0..* 1..1 Sales Order Employee Relationship List: Employs or Assigns – links department & employee Generates – links employee & sales orders Includes – links sale orders and products {Classifies} – links product & product type 0..* Employs/assigns Data Entities List: Department Employee Sales Order Product Product Type 1..1 Department
9
Tips One PRODUCT TYPE classifies one to many PRODUCT/S
One PRODUCT is classified by one PRODUCT TYPE classifies 1..* 1..1 Product Product Type 1..* One SALES ORDER includes one to many PRODUCT/S One PRODUCT is included in one SALE ORDER Includes 1..1 generates 0..* 1..1 Sales Order Employee 0..* One EMPLOYEE generates zero to many SALE ORDER/S One SALES ORDER is generated by one EMPLOYEE Employs/assigns 1..1 Department One DEPARTMENT employs zero to many EMPLOYEE/S One EMPLOYEE is employed by one DEPARTMENT Or One DEPARTMENT assigns zero to many EMPLOYEE/S One EMPLOYEE is assigned by one Tips Active Voice Vs Passive Voice descriptions for relationships Always start with One
10
Given Answer classifies 1..* 1..1 Product Product Type 1..*
Example for the GIVEN ANSWER Product Types Products Apple Fiji, Gala, Granny Smiths, etc Orange Navel, Valencia, etc Berry Strawberry, blueberry, etc A sales order includes various apples & oranges only (no berries). Hence PRODUCT TYPE of “Berry” is NOT included in the sales order - that is why One PRODUCT (TYPE) may NOT be included in a SALES ORDER 1..* 1..1 Product Product Type 1..* Includes 1..1 generates 0..* 1..1 Sales Order Employee Same meanings 0..* Given Answer Employs/assigns 1..1 (Type) Department
11
Tutorial Activity 4 Dr Franklin runs a small medical clinic specializing in family practice She has many patients. Patients are established in the database prior to the first patient visit. When the patients visit the clinic, she may perform several tests to diagnose their conditions. She bills the patient one amount for the visit plus additional amounts for each test. Assume a patient visit could take place without any diagnostic tests and that the tests are established in the database before they are used by Dr Franklin. Which org perspective you are data modelling? Dr Franklin’s Medical Clinic’s data requirements List of key Nouns identified: Patient Patient Visit (medical consultation, which is like ERP sales transaction) Diagnostic Test List of Relationship descriptors Visits (attends or comes to) - links patients and consultation Takes place (involves or includes) – links consultations & tests
12
Tutorial Activity 4 Dr Franklin runs a small medical clinic specializing in family practice She has many patients. Patients are established in the database prior to the first patient visit. When the patients visit the clinic, she may perform several tests to diagnose their conditions. She bills the patient one amount for the visit plus additional amounts for each test. Assume a patient visit could take place without any diagnostic tests and that the tests are established in the database before they are used by Dr Franklin. Patient 1..1 Attends / comes to 0..* Medical Consultation (Patient Visit) 0..* List of key Nouns identified: Patient Patient Visit (medical consultation, which is like ERP sales transaction) Diagnostic Test List of Relationship descriptors Visits (attends or comes to) - links patients and consultation Takes place (involves or includes) – links consultations & tests Involves/Includes 0..* Diagnostic Test
13
Tutorial Activity 4 Dr Franklin runs a small medical clinic specializing in family practice She has many patients. Patients are established in the database prior to the first patient visit. When the patients visit the clinic, she may perform several tests to diagnose their conditions. She bills the patient one amount for the visit plus additional amounts for each test. Assume a patient visit could take place without any diagnostic tests and that the tests are established in the database before they are used by Dr Franklin. Patient 1..1 Attends / comes to 0..* Medical Consultation (Patient Visit) 0..* Involves/Includes One PATIENT attends zero to many CONSULTATION/S One CONSULTATION is attended by one PATIENT One CONSULTATION involves zero to many TEST/S One TEST is involved in zero to many CONSULTATION/S 0..* Diagnostic Test
14
Tutorial Activity 4 Given Answer Patient 1..1 Attends / comes to
0..* Medical Consultation (Patient Visit) 0..* Involves/Includes 0..* Diagnostic Test Given Answer
15
Tutorial Activity 5: More ERP events explicit
Which organisation perspective are you data modelling? Joe’s Ice Cream Sales Ordering & Fulfilment processes List of Nouns: Customers Sales Transaction Sales/Cash Receipts Products {Product Type} – Ice-cream cones, sundaes or shakes {Employee} – one selling the products and another depositing sales receipts (the cash monies) List of Relationships (note many are implicit (ie you have to define yourself using ERP knowledge) {Serves} - links employees & sales transactions {Buys} – links customers & sales transactions Pays – links customers & cash receipts {Receives} – links employees and sales/cash receipts {Leads to/results} – links sales and sale/cash receipts Deposits – links sales/cash receipts & Cash (Bank Account) Includes – links Sales transactions & products {Classified} – links products and implied product types Joe’s is a small ice-cream shop located near the local university’s football ground. Joe’s serves walk-in customers only. The shop carries 26 flavours of ice cream. Customers can buy cones, sundaes or shakes. When a customer pays for an individual purchase, a sales transaction usually includes just one item. When a customer pays for a family or group purchase, however, a single sales transaction includes many different items. All sales must be paid for at the time the ice cream is served. Joe’s maintains several banking accounts but deposits all sales receipts into its main checking account
16
Tutorial Activity 5: More ERP events explicit
Joe’s is a small ice-cream shop located near the local university’s football ground. Joe’s serves walk-in customers only. The shop carries 26 flavours of ice cream. Customers can buy cones, sundaes or shakes. When a customer pays for an individual purchase, a sales transaction usually includes just one item. When a customer pays for a family or group purchase, however, a single sales transaction includes many different items. All sales must be paid for at the time the ice cream is served. Joe’s maintains several banking accounts but deposits all sales receipts into its main checking account Product Type 1..1 Classifies ↓ 1..* serves includes Product Sales (Order) Transaction (Sales) Employee 1..1 0..* 1..* 0..* 1..1 transacts/buys Customer Results in /leads to ↓ 1..1 pays One PRODUCT TYPE (eg cones, sundaes, milkshakes) classifies one to many PRODUCTS (eg vanilla, strawberry ice-cream cones, etc) One PRODUCT is classified by one PRODUCT TYPE One SALES includes one to many PRODUCT/S One PRODUCT is included zero (unsold ice-cream products) to many SALE/S One SALES leads to/results in only one CASH RECEIPT One CASH RECEIPT is a result of only one SALES One CASH BANK ACCOUNT receives deposits of zero to many CASH RECEIPTS One CASH RECEIPT can only be deposited in only one CASH Bank Account One (Sales) EMPLOYEE serves zero to many SALES One SALES is served by one (sales) EMPLOYEE One CUSTOMER transacts zero to many SALES One SALES is transacted by one CUSTOMER (at a time) One CUSTOMER pays zero to many CASH RECEIPT/S One CASH RECEIPT is paid by one CUSTOMER (at a time) One (Payment Admin) EMPLOYEE receives zero to many CASH RECEIPT/S One CASH RECEIPT is received by one EMPLOYEE (at a time) 1..1 Cash (Bank Account) 1..1 0..* Cash Receipts (Monies) (Payment Admin) Employee 0..* 1..1 deposits receives (See relationship descriptions in NOTES sections of this slide)
17
REA – Resource, Events & Agents Formatted Data Models
See Text books for these definitions REA is a diagram formatting technique for guiding new data modellers to organise and format their data models by grouping: Resource entities on your Left Hand Side Event entities in the middle Agent entities on your Right Hand Side Of your drawing page Experienced data models don’t necessarily use this formatting guideline, especially when modelling more complex data models REA formatted Data Model EXAMPLE RESOURCES EVENTS AGENTS
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.