Agenda & Objectives Agenda ▫Overview where data modeling fits within SDLC ▫Define data modeling components ▫Write business rules ▫Practice modeling various.

Slides:



Advertisements
Similar presentations
Entity-Relationship (ER) Modeling
Advertisements

Entity Relationship (ER) Modeling
Concepts of Database Management Seventh Edition Chapter 6 Database Design : ERD Model.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Entity Relationship (ER) Modeling
Systems Development Life Cycle
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
Modeling the Data: Conceptual and Logical Data Modeling
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 7.1.
Database Design & Mapping
System Analysis - Data Modeling
Systems Analysis Requirements structuring Process Modeling Logic Modeling Data Modeling  Represents the contents and structure of the DFD’s data flows.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Entity Relationship Diagrams
Chapter 3: Modeling Data in the Organization
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 7.1.
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 8 Structuring System Data Requirements
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Chapter 3 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Importance of data modeling Importance of data modeling Write good.
Modern Systems Analysis and Design Third Edition
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
Entity Relationship Modeling Objectives: To illustrate how relationships between entities are defined and refined. To know how relationships are incorporated.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
1 © Prentice Hall, 2002 CMIS564: E/R Modeling Dr. Bordoloi Based on Chapter 3; Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
Computer System Analysis Chapter 10 Structuring System Requirements: Conceptual Data Modeling Dr. Sana’a Wafa Al-Sayegh 1 st quadmaster University of Palestine.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 7.1.
Chapter 3: Modeling Data in the Organization
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter 6 Structuring.
BIS 360 – Lecture Six (Part 2) Conceptual Data Modeling (Chapter 10 and partial Chapter 12)
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Essentials of Systems Analysis and Design Fourth Edition Joseph S. Valacich Joey F.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Chapter 8 Structuring System Data Requirements
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Chapter 7 Structuring System Requirements: Conceptual Data Modeling 7.1.
Conceptual Data Modeling. What Is a Conceptual Data Model? A detailed model that shows the overall structure of organizational data A detailed model.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 4 ENTITY RELATIONSHIP (ER) MODELING Instructor Ms. Arwa Binsaleh 1.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 3: Modeling Data in the Organization Modern Database Management 9 th Edition Jeffrey.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
McGraw-Hill/Irwin Copyright © 2006 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 6 Modeling the Data: Conceptual and Logical Data Modeling.
ERD :: 19 / 1 / Entity-Relationship (ER) Modeling. ER Modeling is a top-down approach to database design. Entity Relationship (ER) Diagram –A.
C_ITIP211 LECTURER: E.DONDO. Unit 4 : DATA MODELING.
Entity Relationship Modeling
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Business System Development
Chapter 6 Structuring System Requirements: Conceptual Data Modeling
Tables and Their Characteristics
ERD :: 19 / 1 / Entity-Relationship (ER) Modeling. ER Modeling is a top-down approach to database design. Entity Relationship (ER) Diagram –A.
Chapter 7 Structuring System Requirements: Conceptual Data Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Chapter 3: Modeling Data in the Organization
Chapter 7 Structuring System Requirements: Conceptual Data Modeling
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Chapter # 4 Entity Relationship (ER) Modeling.
Lecture 10 Structuring System Requirements: Conceptual Data Modeling
Presentation transcript:

Agenda & Objectives Agenda ▫Overview where data modeling fits within SDLC ▫Define data modeling components ▫Write business rules ▫Practice modeling various relationships Objective ▫Given an existing entity relationship diagram (ERD), you will be able to create the corresponding business rules. ▫Given an existing entity relationship diagram, you will be able to describe the business process. Resource ▫BusRules_InterpretingERD.pptx

STRUCTURING SYSTEM REQUIREMENTS: CONCEPTUAL DATA MODELING IS 310 Dr. Jean A. Pratt Text/visual support from Valacich, George, Hoffer (© 2006 Prentice-Hall, Inc. ); Dennis, Wixom, Roth (© 2006 John Wiley & Sons, Inc.); Dr. Bruce Lo

Data Modeling

Outline 1.Overview of data modeling 1.Deliverables of data modeling 2.Questions to ask when gathering information 3.Where data modeling maps to process modeling 2.Elements of ERD 3.Cardinality, participation 4.Degree of relationships 5.Identifying or non-identifying PK?

Overview of Data Modeling A model that captures the overall structure of organizational data, independent of DBMS and without implementation details Deliverable ▫Entity Relationship Diagram

Gathering Information Questions for Data Modeling 1.What are subjects/objects of the business? *Entities 2.What unique characteristic distinguishes each object from other objects of the same type? *Primary key 3.What characteristics describe each object? *Attributes 4.How do you use this data? * Reports (via queries) * Security controls (e.g., login requirements)

Questions (cont’d…) 5.How many instances of one entity participate with another entity? *Cardinality 6.Is participation between entities required or optional? * Participation 7.What events occur that imply associations between various objects? *Relationships 8.Is each activity or event always handled the same way or are there special circumstances? *Integrity rules and triggers

Outline 1.Overview of data modeling 2.Elements of ERD 1.Entity 2.Attribute 3.Identifier/Primary Key 4.Relationships and Business Rules 5.ERD Notations: Chen and Crow’s Foot 3.Cardinality, participation 4.Degree of relationships 5.Identifying or non-identifying PK?

Entity A person, place, object, event or concept in user environment about which the organization wishes to maintain data  E.g., employee, student, warehouse, car, sale, booking, account, course Note the difference ▫Entity ▫Entity instance

Attribute A property or characteristic of an entity of interest to the organization ▫Many CASE tools do not include attributes on the ERD to avoid cluttering the diagram, but define them in the repository ▫E.g., STUDENT (Stud_Id, Stud_name, Address, Phone) ▫E.g., AUTOMOBILE (Vehicle_Id, Color, Horsepower, Year) Candidate Key ▫An attribute (or combination of attributes) that uniquely identifies each entity instance Identifier/Primary Key ▫A candidate key that has been selected to index the entity

Relationship An association between entity instances in one or more entities Defined by business rules

Business Rules Business Rules rule How things work here Start with a single instance of each entity Always stated in pairs—define relationship from perspective of each related entity Become the verbs in the relationships Determine cardinality and participation The basis for stored procedures and triggers

Examples: Business Rules Each customer can place many orders. Each order is placed by one and only one customer. A department employs one or more employees. An employee is assigned to one department. A customer may purchase multiple products. A product may be purchased by multiple customers. A student may enroll for many classes. A class may have many students enrolled in it. Identify the entities, cardinality and participation indicated in the above business rules.

ERD Notations Entity-relationship data model ▫Expressed as entity-relationship diagrams (ERD) Different notations ▫Chen P, 1976, The entity-relationship model-toward a unified view of data, ACM Transactions on Database Systems, Vol 1 (March) pp ▫Teorey, Yang & Fry, 1986, Computing Survey, 18 (2) ▫Storey, 1991, Data and Knowledge Engineering, 7 p47 We use the “Crow’s foot” notation

ERD Notation: Chen Entity Relationships Attribute Identifier/PK Multivalued attribute Associative entity Cardinality and Participation: ▫0..1 ▫0..n or 0..* ▫1..n or 1..*

Final E-R Diagram for Hoosier Burger’s Inventory Control System: Chen

ERD Notation: Crow’s Foot Entity Unique Identifier Attribute Relationship Cardinality & Participation

Outline 1.Overview of data modeling 2.Elements of ERD 3.Cardinality, participation 4.Degree of relationships 5.Identifying or non-identifying PK?

Cardinalities in Relationships Cardinality = the number of instances of entity B that can (or must) be associated with each instance of entity A. Cardinality: one or many | or Cardinality is the maximum number (0, 1 or Many) of records in one file that are linked to a single record in another file and vice versa. Department:Employee A department has one or more employees. An employee is assigned to one department.

Cardinality Implemented: 1:M DEPARTMENT Dept IDDept NameDept Phone 1000Information Systems Accounting Finance Marketing EMPLOYEE Emp IDEmp First NameEmp Last NameDept ID 10JoeBrown JillSmith BobJohnson MaryJohansen MaxineBrown GuySchmidt BobBlack1000

Cardinality Implemented: 1:1 EMPLOYEE Emp IDEmp First NameEmp Last NameDept ID 10JoeBrown JillSmith BobJohnson MaryJohansen MaxineBrown GuySchmidt BobBlack1000 SECURITY BADGE Emp IDBadge #Date Assigned 10A501/02/ A1701/02/ B305/01/ C108/01/ A706/01/ D2312/15/ B402/15/2008 FK

Participation in Relationships Participation: whether or not every instance of one entity must participate in a relationship with another entity (i.e., whether every PK from Entity 1 is a FK in Entity 2); whether or not the FK is required or can be null. Participation: optional or requiredO or | Optional participation ▫Minimum cardinality is zero Required participation ▫Minimum cardinality is one Participation and Minimum/Maximum Cardinality ▫If the minimum cardinality is zero, then participation is optional ▫If the minimum cardinality is one, then participation is required ▫Maximum cardinality has no effect on participation

Relationship: Crow’s Foot AB verb BA BA AB AB AB

What are the business rules?

Outline 1.Overview of data modeling 2.Elements of ERD 3.Cardinality, participation 4.Degree of relationships 1.Unary 2.Binary 3.Ternary 5.Identifying or non-identifying PK?

Degree of Relationships Degree of a relationship ▫The number of entities that participate in a relationship Three main types of degrees ▫Unary relationship: involves only 1 entity ▫Binary relationship (most common): involves 2 entities ▫Ternary relationship: involves 3+ entities ▫Higher is possible but rarely implemented

Relationships of Different Degrees: Unary Relationships—1 Entity Employee:Manager—a 1:M Recursive Relationship Notice both effects of the optional participation Employee_IDFirst NameManager 1Heather 2Lisa1 3Maxine1 4Gertrude1

A Unary 1:1 Recursive Relationship What are the business rules?

Unary 1:1 Recursive Relationship Module_IDModule NameTraining TimePrerequisite Module ABeginning Database1 BIntermediate Database1.5A CAdvanced Database3B DBeginning Modeling1 EIntermediate Modeling1D FAdvanced Modeling3E GBeginning SQL2 HIntermediate SQL5G

Relationships of Different Degrees: Binary Relationship—2 Entities

Binary 1:M Relationship What are the business rules?

Binary 1:M Relationship What are the business rules?

Binary 1:M Relationship Module_IDModule NameTraining TimePrerequisite ModuleProgram ID ABeginning Database11 BIntermediate Database1.5A1 CAdvanced Database3B1 DBeginning Modeling12 EIntermediate Modeling1D2 FAdvanced Modeling3E2 GBeginning SQL23 HIntermediate SQL5G3

Binary M:M Relationship What are the business rules?

Demo: Binary M:M Relationship Product:Part A part may be used in multiple products. A product uses multiple parts.

Binary M:M Relationship Product_IDPart_IDQty Used

Ternary Relationships What are the business rules?

Ternary Relationships Ternary Relationships: 3 Entities What are the business rules?

Outline 1.Overview of data modeling 2.Elements of ERD 3.Cardinality, participation 4.Degree of relationships 5.Identifying or non-identifying PK?

Identifying/Non-identifying PK? Purpose of the Primary Key is to uniquely identify each row in the table. Rules for creating PK: ▫Must uniquely identify each row ▫Value will not change ▫Will not have a NULL value ▫Is the least amount of fields that will satisfy the above Identifying relationship ▫PK of one entity includes the PK of another entity Non-identifying relationship ▫PK of an entity is independent of other entities

Identifying/Non-identifying PK? Which entity is strong/independent/non- identifying? Which entity is weak/dependent/identifying?

Identifying/Non-identifying PK? Although technically correct, what is an inherent problem in identifying relationships?

Review: What you Know How data modeling fits with process modeling How to define and identify each element in a data model How to interpret unary, binary and ternary relationships in data models How to avoid data modeling problems