Data Modeling with ER Diagrams What is an Entity-Relationship Model? How is an E-R model represented as an E-R diagram? How can a video store be modeled.

Slides:



Advertisements
Similar presentations
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Advertisements

IT420: Database Management and Organization
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
Text-Book Chapters (7 and 8) Entity-Relationship Model
Chapter 12 Information Systems Chapter Goals Define the role of general information systems Explain how spreadsheets are organized Create spreadsheets.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
Chapter 6 Methodology Logical Database Design for the Relational Model Transparencies © Pearson Education Limited 1995, 2005.
Databases Revision.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
ER Modeling An E-R model is a conceptual (or logical) data model that includes –Entity (classes) –Attributes of each entity –Relationship types between.
CIT 381 More ER Modeling - review one-to-many - one-to-one - recursive relationships.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke Database Processing Tenth Edition Chapter 5 Data.
Modeling Data The Entity Relationship Model (ER) For Database Design.
Copyright © 2003 Addison-Wesley Your name here. Copyright © 2003 Addison-Wesley Data Modeling with ER Diagrams What is an Entity-Relationship Model? How.
Chapter Five Data Modeling with the Entity-Relationship Model.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 3 The Entity- Relationship Model.
Chapter 12 Information Systems Nell Dale John Lewis.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
Database Systems: Design, Implementation, and Management Tenth Edition
Example BigHit Video Inc. wants to create an information system for online sales of movies in both DVD and videotape format. People will be allowed to.
1 Data Modelling Which data to include in the database.
Chapter 2: Entity-Relationship Model (Continued)
Entity-Relationship (E-R) Model
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
Chapter 12 Information Systems. 2 Chapter Goals Define the role of general information systems Explain how spreadsheets are organized Create spreadsheets.
Ch5: ER Diagrams - Part 2 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
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.
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
Chapter 7 Data Modeling with Entity Relationship Diagrams Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
Copyright © 2003 Addison-Wesley Jesper Rosholm Tørresø.
CS411 Database Systems Kazuhiro Minami 02: The Entity-Relationship Model.
Principles of Database Systems With Internet and Java Applications Today’s Topic Chapter 2: Representing Information with Data Models The lecture notes.
Information Systems: Databases Define the role of general information systems Describe the elements of a database management system (DBMS) Describe the.
Entity-Relationship Model Ch. 3
Copyright (c) 2014 Pearson Education, Inc. Introduction to Databases.
ER to Relational Translation COMSATS INSTITUTE OF INFORMATION TECHNOLOGY, VEHARI.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts UML UML: Unified Modeling Language UML has many components to graphically model different.
1 Chapter 11 Entity-Relationship Modeling Transparencies Last Updated: 25 April 2011 By M. Arief
1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.
C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
Initial Design of Entity Types for the COMPANY Database Schema Based on the requirements, we can identify four initial entity types in the COMPANY database:
Copyright © 2003 Addison-Wesley Sree Nilakanta. Copyright © 2003 Addison-Wesley Developing Relational Models What is the relational model and what is.
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
Entity Relationship Diagram. Introduction Definition: Entity-relationship diagram is a data-modeling technique that visualises entities, the attributes.
 Entity-relationship models (ERM) Entity-relationship models (ERM)  Simple E-R Diagram Simple E-R Diagram  Weak Entity Weak Entity  Strong Entity.
Description and exemplification of entity-relationship modelling.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
Database Design – Lecture 4 Conceptual Data Modeling.
Lecture 03 Entity-Relationship Diagram. Chapter Outline.
Slide 1 Chapter 05 – Part 2 Data Modeling with the Entity-Relationship Model.
EntityRelationshipDiagrams. Entity Relationship Models The E-R (entity-relationship) data model views the real world as a set of basic objects (entities)
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Mapping Constraints Keys.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship.
Tutorial on E-R Diagrams 1.Learn basic terminology and symbols –See next four slides; refer to as needed in steps 2-4 below 2.Learn the basics of E-R diagramming.
Methodology - Logical Database Design. 2 Step 2 Build and Validate Local Logical Data Model To build a local logical data model from a local conceptual.
1 CS 430 Database Theory Winter 2005 Lecture 3: A Fifty Minute Introduction to Data Modeling.
Modeling Data in the Organization Muhammad Nasir
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
Database -Entity-Relationship Model 2012/03/05.
Entity Relationship Diagram ERD. Background Peter Chen developed ERDs in Charles Bachman and James Martin have added some slight refinements to.
Chapter 12 Information Systems.
ER MODEL Lecture 3.
Entity – Relationship Model
Databases and Structured Files: What is a database?
Initial Design of Entity Types: EMPLOYEE, DEPARTMENT, PROJECT, DEPENDENT Gender.
Entity-Relationship Diagram (ERD)
Presentation transcript:

Data Modeling with ER Diagrams What is an Entity-Relationship Model? How is an E-R model represented as an E-R diagram? How can a video store be modeled as an E-R diagram? What is a role in a relationship type? How can we record the history of video rentals? How are cardinalities and related to roles? How can we represent purchase orders? How can we represent time cards and pay statements?

Entity-Relationship Modeling An E-R model is a data model that includes  Entity classes  Attributes of each class  Relationship types between classes  Constraints Types of attributes Designation of key attributes Cardinalities of relationship types An E-R Model is typically represented graphically –E-R diagram, the technique we use  UML diagram, an emerging standard for specifying E-R models and software design

Entity Relationship Diagrams Sample diagram for entity class Customer

E-R Diagram for Class Video Sample diagram for entity class Video

Relationship Types Example of representing relationship type Owns between classes Store and Video

Constraints on Relationship Types Example of cardinality and participation constraints

Modeling Video Rentals Examples of current rentals and previous rentals Differences are in cardinalities and attribute names

Modeling Video Rentals as an Entity Class Diagram shows entity class Rental and its relationship types with Customer and Video Note cardinalities and participation constraints  A Rental entity cannot exist without being related to both a customer and a video Problem occurs because Rental has no key attribute

Weak Entity Classes A weak entity class is  An entity class with no key of its own  An entity class whose entities cannot exist without being related to other entities An identifying relationship type is  A relationship type that determines the keys of the weak entities

Roles in Relationship Types Each entity in a relationship plays a specific role in it Roles are particularly important in relationship types that relate an entity class to itself  Each person in an IsChildOf relationship is either a parent or a child

Employee Roles and Cardinalities Is this an accurate model of the relationships between employees and stores? For example, does this diagram answer these questions correctly?  Does a store have to have a manager?  Can an employee be the manager of more than one store?  What other questions can you ask about roles and cardinalities?

Purchase Orders What does the diagram below mean?  How do we buy many copies of a single movie?  Does each video have its own videoId before it is received?  What does it mean for an order of a video to have a quantity? The problem with the diagram is with class Video The diagram fails to distinguish between a movie and a copy of a movie (a video) We need to revise the diagram to show Movie as an entity class

Modeling Videos and Movies This diagram more accurately specifies the true nature of Video and Movie  It also has an accurate specification of PurchaseOrder

Time Cards and Pay Statements Classes TimeCard and PayStatement are weak Does this diagram show the correct identifying relationships and discriminators?  For example, can an employee have 2 time cards that begin at the same time but are at different stores?