Carnegie Mellon University ©2006 - 2011 Robert T. Monroe 70-451 Management Information Systems Data Modeling II – Relationships 70-451 Management Information.

Slides:



Advertisements
Similar presentations
Entity-Relationship Model
Advertisements

Data Modeling and the Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
Systems Development Life Cycle
Data Modeling is an Analysis Activity
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
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.
Chapter 3: Modeling Data in the Organization
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
Entity Relationship Diagrams
Chapter 3: Modeling Data in the Organization
Database Design Chapter 2. Goal of all Information Systems  To add value –Reduce costs –Increase sales or revenue –Provide a competitive advantage.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
Entity-Relationship Model
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
Chapter 3 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Importance of data modeling Importance of data modeling Write good.
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 7th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred R.
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.
3.1 CSIS 3310 Chapter 3 The Entity-Relationship Model Conceptual Data Modeling.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 7.1.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 2: Modeling Data in the Organization Modern Database Management 10 th Edition Jeffrey.
Chapter 3: Modeling Data in the Organization
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.
Copyright © 2009 Pearson Education, Inc. Publishing as Prentice Hall Essentials of Systems Analysis and Design Fourth Edition Joseph S. Valacich Joey F.
Chapter 2: Modeling Data in the Organization
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
IS 325 Notes for Wednesday September 4, Syllabus Change I eliminated quizzes I increased the points allocated to homework assignments.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Copyright (c) 2014 Pearson Education, Inc. Introduction to Databases.
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 2: Modeling Data in the Organization.
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Entity-Relationship Modeling Based on Chapter 12.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-1 David M. Kroenke’s, 10 th ed. Chapter.
Data Modeling IST210 Class Lecture.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
Chapter 2 © 2013 Pearson Education, Inc. Publishing as Prentice Hall Chapter 2: Modeling Data in the Organization Modern Database Management 11 th Edition.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Carnegie Mellon University © Robert T. Monroe Management Information Systems Data Modeling Management Information Systems Robert.
Entity Relationship Modeling
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.
1 © Prentice Hall, 2002 ITD1312 Database Principles Chapter 4B: Logical Design for Relational Systems -- Transforming ER Diagrams into Relations Modern.
CMIS 450 Database Design Dr. Bijoy Bordoloi Entity Relationship (E-R) Modeling: Additional Notes.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 2: MODELING DATA.
© 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.
Pree Thiengburanathum, CAMT, Chiang Mai University 1 Database System Modeling Data in the Organization October 31, 2009 Software Park, Bangkok Thailand.
Chapter 2: Modeling Data in the Organization
IS 4420 Database Fundamentals Chapter 3: Modeling Data in the Organization Leon Chen.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Lecture 3: Modeling Data in the Organization Modern Database Management 9 th Edition Jeffrey.
Business System Development
Overview of Entity‐Relationship Model
Entity – Relationship Model
Chapter 3: Modeling Data in the Organization
Presentation transcript:

Carnegie Mellon University © Robert T. Monroe Management Information Systems Data Modeling II – Relationships Management Information Systems Robert Monroe October 25, 2011

Carnegie Mellon University © Robert T. Monroe Management Information Systems Goals For Today By the end of today's class you should be able to: –Identify basic relationships between entities –Apply the concept of degree of relationships (unary, binary, ternary) to your ER models –Apply the concept of cardinality constraints in relationships (one-to-one, one-to-many, many-to-many) to your ER models –Use associative entities in your ER models appropriately

Carnegie Mellon University © Robert T. Monroe Management Information Systems Entity-Relationship (ER) Data Modeling

Carnegie Mellon University © Robert T. Monroe Management Information Systems Quick Review: ER Modeling Core Elements Entity A person, place, object, event, concept in the user environment about which the organization wishes to maintain data. Attribute A property or characteristic of an entity that is of interest to the organization. Relationship A meaningful association between, or among, entities. Entity Attribute … PersonCar owns Source: [HPM09]

Carnegie Mellon University © Robert T. Monroe Management Information Systems Quick Review: E-R Diagram Notation Entity symbols A special entity that is also a relationship Relationship symbols Attribute symbols Relationship cardinalities specify how many of each entity type is allowed Relationship degrees specify number of entity types involved Source: [HPM09]

Carnegie Mellon University © Robert T. Monroe Management Information Systems Relationships A relationship defines a meaningful association between, or among, entities –Modeled as a line drawn between entities Relationships can have attributes –These describe features pertaining to the association between the entities in the relationship. Two entities can have more than one type of relationship between them (multiple relationships)

Carnegie Mellon University © Robert T. Monroe Management Information Systems Degree of Relationship Defines the number of entity types that participate in it Unary Relationship –One entity type related to itself Binary Relationship –Two entity types related to each other Ternary Relationship –Three entity types related to each other It is possible, but unusual, to have relationship types of larger than 3 entities

Carnegie Mellon University © Robert T. Monroe Management Information Systems Defines the number of entity instances that participate in it One-to-One –Each entity in the relationship will have exactly one related entity One-to-Many –An entity on one side of the relationship can have many related entities, but an entity on the other side will have a maximum of one related entity Many-to-Many –Entities on both sides of the relationship can have many related entities on the other side Cardinality of Relationships

Carnegie Mellon University © Robert T. Monroe Management Information Systems Cardinality Constraints The number of instances of one entity that can or must be associated with each instance of another entity –Mandatory one –Mandatory many –Optional one –Optional many

Carnegie Mellon University © Robert T. Monroe Management Information Systems Example: Unary Degree Relationship Employee Name Title Ahmed CEO Maha VP, Sales Roula Sales Associate Noor Sales Associate James CFO Yassar COO Roberto Facilities Mgr Fatima Operations Mgr ReportsTo ER Relationship: Employee ReportsTo Employee Organizational chart showing employee Reporting relationships in a company Note: This is NOT an ER Diagram!

Carnegie Mellon University © Robert T. Monroe Management Information Systems Example: Binary Relationships Source: [HPM09]

Carnegie Mellon University © Robert T. Monroe Management Information Systems Example: Binary Relationship With An Attribute The Date_Completed attribute pertains specifically to the employee’s completion of a course It is an attribute of the relationship, not either entity in isolation Source: [HPM09]

Carnegie Mellon University © Robert T. Monroe Management Information Systems Example: Ternary Relationship With Attributes Source: [HPM09]

Carnegie Mellon University © Robert T. Monroe Management Information Systems Exercises: Describe Relationship Degree and Cardinality Website: Qatar MOI Traffic Violations Entities: Vehicle and Violation Relationship: a Vehicle is charged with a Violation Degree: Binary (2 entity types – Vehicle and Violation) Cardinality: One to Many (Vehicle to Violation)

Carnegie Mellon University © Robert T. Monroe Management Information Systems Exercises: Describe Relationship Degree and Cardinality Website: Blackboard Entities: Courses and Students Relationship: Degree: Cardinality:

Carnegie Mellon University © Robert T. Monroe Management Information Systems Exercises: Describe Relationship Degree and Cardinality Website: Qatar National Bank (QNB) Entities: Customer and Account Relationship: Degree: Cardinality:

Carnegie Mellon University © Robert T. Monroe Management Information Systems Exercises: Describe Relationship Degree and Cardinality Website: Facebook Entities: Friends and Messages Relationship: Degree: Cardinality:

Carnegie Mellon University © Robert T. Monroe Management Information Systems Exercises: Describe Relationship Degree and Cardinality Website: Flickr Entities: Picture, User, Portfolio Relationship(s): Degree: Cardinality:

Carnegie Mellon University © Robert T. Monroe Management Information Systems Associative Entities It’s an entity – it has attributes AND it’s a relationship – it links entities together When should a relationship with attributes instead be an associative entity? –All relationships for the associative entity should be many –The associative entity could have meaning independent of the other entities –The associative entity preferably has a unique identifier, and should also have other attributes –The associative entity may participate in other relationships other than the entities of the associated relationship –Ternary relationships should generally be converted to associative entities

Carnegie Mellon University © Robert T. Monroe Management Information Systems Example: Associative Entity Associative entity are represented as a rectangle with rounded corners Note that the many-to-many cardinality symbols face toward the associative entity and not toward the other entities Source: [HPM09]

Carnegie Mellon University © Robert T. Monroe Management Information Systems Flickr Exercise: Repeat with Associative Entity Website: Flickr Entities: Picture, User, Portfolio Relationship(s): Degree: Cardinality:

Carnegie Mellon University © Robert T. Monroe Management Information Systems In-Class Exercise (Part III) – Create E-R Diagram Produce an E-R diagram capturing –Entities –Attributes –Relationships Source: [HPM09]

Carnegie Mellon University © Robert T. Monroe Management Information Systems In-Class Exercise: Create E-R Diagram CoolClothes Inc. sells many different products in their retail stores. Basic ER Model: The retail stores are organized geographically. Each store is classified by the city, country, and region in which it is located. CoolClothes would like to be able to track the quantity of each product are in stock at each store. –Each product is uniquely identified by its SKU number, or Stock Keeping Unit –Each SKU can represent a product that is available in multiple sizes and multiple colors (but all colors and sizes have the same SKU) –CoolClothes wants to track the quantity of each item in each size and color, at each store location. More Advanced: Update the model to allow tracking the current asking price for each product, the original asking price, and whether it is currently on sale. Each retail store decides independently which items will be put on sale.

Carnegie Mellon University © Robert T. Monroe Management Information Systems Administrivia: Adjustment To Data Management Classes Sunday, October 30: Relational Data Model Tuesday, November 1: “Big Data”, Data Warehousing Sunday, November 13: Business Analytics Tools

Carnegie Mellon University © Robert T. Monroe Management Information Systems References [HPM09] Jeffrey Hoffer, Mary Prescott, Fred McFadden, Modern Database Management, 9 th Ed., Pearson - Prentice Hall, 2009, ISBN: