COMM 226 Practical tips for creating entity relationship diagrams (ERDs) Chitu Okoli Associate Professor in Business Technology Management John Molson.

Slides:



Advertisements
Similar presentations
More Diagramming & Practice with Relationship Modeling
Advertisements

ENTITY RELATIONSHIP MODELLING
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
L ECTURE 11 – D ATA M ODELLING Data Dictionaries Entity Relationship Diagram for Data Modelling Steps to Construct Entity Relationship Diagrams Validation.
Revised by Ivor Perry Sept Introduction to Data Modelling.
FIS 431/631 Financial Information Systems: Analysis and Design REA Modeling Joe Callaghan Oakland University Department of Accounting & Finance.
ISMT221 Information Systems Analysis and Design Entity-Relationship Diagram Lab 4 Tony Tam.
1 MIS 340: Data Modeling 2 Yong Choi School of Business CSUB.
PowerPoint Presentation for Dennis & Haley Wixom, Systems Analysis and Design Copyright 2000 © John Wiley & Sons, Inc. All rights reserved. Slide 1 Data.
Entity-Relationship Model and Diagrams (continued)
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
1 The Accounting REA Model as an Information Engineering Interaction Model Slides 5.
Entity-Relationship Modelling Introduced by Chen in 1976 The ER Model is used to construct the conceptual data model – independent of DBMS Most widely.
A Quick Review of Analysis Stages of the Systems Development Life Cycle Planning Analysis Design Construction.
Lecture 3 :Database Analysis and Design (II)
Concepts of Database Management Seventh Edition
COMM 226 ERD case: School of Business
1 Data Modelling Which data to include in the database.
Systems Analysis I Data Flow Diagrams
Entity/Relationship Modelling
Data Modeling and Entity- Relationship Model I IST2101.
Logical Database Design Nazife Dimililer. II - Logical Database Design Two stages –Building and validating local logical model –Building and validating.
Mapping ERM to relational database
Practical tips for creating entity relationship diagrams (ERDs) Chitu Okoli Associate Professor in Business Technology Management John Molson School of.
Entity Relationship Modeling Objectives: To illustrate how relationships between entities are defined and refined. To know how relationships are incorporated.
Entity-Relationship Modeling I The cautious seldom err. Confucius.
Data Modeling ERM ERD.
Bite sized training sessions: Data Modelling – Part 1 of 2 Data Model Diagrams Feb 2011 Prepared by Guy Beauchamp Group Projects & IT.
DATA MODELING AND DATABASE DESIGN
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Conceptual Design Lecture - 2 Database Development.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Data Modelling – ERD Entity Relationship Diagram’s Entity Relationship Diagrams and how to create them. 1.
The REA Model. The REA model provides structure for developing an accounting database It helps to identify It helps to The REA Model.
1 Relational Database Development Alison Taylder Consultant ITC-ILO, Turin 25 th November 2004.
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Rob and Coronel Adapted for INFS-3200.
1 n 1 n 1 1 n n Schema for part of a business application relational database.
Domain Modeling Part1: Entity Relationship Diagram Chapter 4 pp part 1 1.
Concepts of Database Management Sixth Edition Chapter 6 Database Design 2: Design Method.
1. Objectives At the end of this chapter you should be able to:  Discuss the use and features of a data model  Define the terms entity and attribute.
1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.
 R EVIEW M ORE ON ERD’ S DBS201. Why ERDs What is an ERD What is represented by boxes What is the connection between boxes called.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
IT 21103/41103 System Analysis & Design. Chapter 04 Data Modeling.
Description and exemplification of entity-relationship modelling.
Database Design – Lecture 6 Moving to a Logical Model.
Database Basics BCIS 3680 Enterprise Programming.
Entity/Relationship Modelling. Entity Relationship Modelling In This Lecture Entity/Relationship models Entities and Attributes Relationships Attributes.
DBMS ER model-2 Week 6-7.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
Database Design Slide 1 Database Design Lecture 7 part 2 Mapping ERD to Tables.
EntityRelationshipDiagrams. Entity Relationship Models The E-R (entity-relationship) data model views the real world as a set of basic objects (entities)
Database Design. Database Design Process Data Model Requirements Application 1 Database Requirements Application 2 Requirements Application 4 Requirements.
ERD case: School of Business Chitu Okoli Associate Professor in Business Technology Management John Molson School of Business, Concordia University, Montréal.
Teanna Clarke 6aQ What is a Entity-Relationship Diagram?  An Entity-Relationship Diagram (ERD) is a tool that graphically shows the connections among.
Data Modeling and Entity-Relationship Model I
ERD :: 19 / 1 / Entity-Relationship (ER) Modeling. ER Modeling is a top-down approach to database design. Entity Relationship (ER) Diagram –A.
Entity Relationship Diagram ERD. Background Peter Chen developed ERDs in Charles Bachman and James Martin have added some slight refinements to.
BTM 382 Database Management Chapter 5: Advanced Data Modeling
Copyright © 2014 Pearson Canada Inc. 5-1 Copyright © 2014 Pearson Canada Inc. Application Extension 5a Database Design Part 2: Using Information Technology.
Database Design Chapters 17 and 18.
Entity/Relationship Modelling
Databases Chapter 9 Asfia Rahman.
Case Studies: Data Modeling
Data Modelling Chapter 7
Database Design Chapters 17 and 18.
Practical tips for creating entity relationship diagrams (ERDs)
Presentation transcript:

COMM 226 Practical tips for creating entity relationship diagrams (ERDs) Chitu Okoli Associate Professor in Business Technology Management John Molson School of Business, Concordia University, Montréal 1

What is an ENTITY in a business case? An entity is a noun (person, place, thing or event) that contains details (the details will be attributes) The organization that owns the database is NEVER modeled as an entity within the database –However, its customers, suppliers, and other organizations for which it stores data will be modeled In general, a form or a report is NOT an entity –However, the EVENT associated with a form or report is often an entity E.g. An order form is not an entity, but an Order event is an entity E.g. A job application form is not an entity, but the JobApplication event is an entity –Notable exception: An Invoice is often expressed as an entity, with InvoiceLine as a bridge entity (M:M) connecting the invoice to products 2

What kind of RELATIONSHIP is it? To accurately determine a relationship, you must always test each side in turn. For each side, you must ask: –One instance of EntityA can have zero/one or one/many instance(s) of EntityB? –One instance of EntityB can have zero/one or one/many instance(s) of EntityA? Examples: –One department can have zero or many employees; one employee can have one and only one department 1:M: One ( II ) on the department side, many ( O< ) on the employee side –One department can have zero or one managers; one manager can manage zero or one departments 1:1: One ( OI ) on the department side, one ( OI ) on the manager side –One project can have zero or many employees; one employee can have zero or many projects M:M: Many ( O< ) on the project side, many ( O< ) on the employee side 3

How common are various kinds of RELATIONSHIP? One-to-many (1:M) is the most common Many-to-many (M:M) is quite common, but in the ERD, it must always be decomposed into two 1:M relationships One-to-one (1:1) is actually rather rare –Most of the time when you think it’s 1:1, you’ve done something wrong –Verify with the instructor or tutor to make sure –Most common valid 1:1 cases: IS-A: A person is a specific type of person. E.g. an Employee is an Accountant, a Doctor is a Specialist, a Student is an Employee, etc. Boss, where you can only have one boss. E.g. Employee manages a Department, Student is president of a Club, etc. 4

Naming conventions Entities and attributes –Be consistent in your naming style –No spaces allowed in names Use either CamelCaseForAllWords or underscores_between_all_words –Entity and attribute names are always a singular noun, not plural –Bridge/associative entities from M:M relationships, two choices: Be creative in forming a noun from the verb of the relationship. E.g. for Employee and Project, name the bridge entity “Assignment” Simply form a name by merging the two constituent entity names. E.g. for Employee and Project, name it EmployeeProject or ProjectEmployee Relationships –Relationship names are always verbs, usually lower case; spaces are allowed –Relationships are named from the one side to the many side For 1:1 relationships, they are named from the side with the PK to the side with the FK 5

Major stages for designing an ERD 1.Identify the entities, attributes and relationships from the business case description (paper draft) 2.Verify the attributes and add primary keys and foreign keys (paper draft) 3.Draw the ERD using modeling software 6

Designing an ERD: Stage 1 (paper draft) Identify entities, attributes and relationships 1.Identify entities (main nouns) and attributes (nouns that are details of entities) –Analyze the case top-down first (entities, then attributes) –Analyze again, this time bottom-up (attributes, then entities) –Each attribute must apply specifically and only to its own entity –Don't worry about primary keys and foreign keys at this stage 2.Identify relationships between entities –It is never the case that all entities are related to all relationships. You must make sure that the relationship exists. –For a relationship to exist, the description must mention the entities involved together in the same sentence. Otherwise, there is no relationship. –Use the two-step procedure for verifying 1:M, M:M or 1:1 (first verify one side of the relationship, and then the other side) –Verify minimum and maximum cardinalities for each relationship (e.g. minimum 0, maximum many; minimum 1, maximum 1 3.Convert any M:M relationships into two 1:M relationships 7

Designing an ERD: Stage 2 (paper draft) Verify attributes, add PKs and FKs 1.Populate all your entities with attributes 2.Review and revise attributes –In particular, verify if some of the attributes identified earlier might actually belong in the new bridge entities created for M:M 3.Decide on the primary keys (PK, unique identifiers) for each entity 4.Add any appropriate foreign keys (FK) to all entities –In a 1:M relationship (including bridge entities), the PK from the one side must be added to the many side as a FK –In a 1:1 relationship, add the FK to only one of the sides that has mimimum 0, maximum 1 cardinality 8

Designing an ERD: Stage 3 (software) Draw the ERD 1.Draw the final ERD using software –Stages 1 and 2 are paper drafts; you don’t touch the software until you’ve got your paper drafts polished –If you draw something in software at the beginning, it is much harder to see and correct your errors 9