1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.

Slides:



Advertisements
Similar presentations
Chapter 6: Entity-Relationship Model (part I)
Advertisements

BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
ISMT221 Information Systems Analysis and Design Entity-Relationship Diagram Lab 4 Tony Tam.
Database Design & Mapping
Entity-Relationship Model and Diagrams (continued)
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Entity-Relationship Modelling Introduced by Chen in 1976 The ER Model is used to construct the conceptual data model – independent of DBMS Most widely.
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
APPENDIX C DESIGNING DATABASES
Trisha Cummings.  Most people involved in application development follow some kind of methodology.  A methodology is a prescribed set of processes through.
Class Agenda – 04/04/2006 Discuss database modeling issues
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
the Entity-Relationship Model
Entity Relationship Modelling. What is Entity Relationship Modelling? The Entity-Relationship model is – ” “ a data model for high-level descriptions.
ICOM 5016 – Introduction to Database Systems Lecture 4 Dr. Manuel Rodriguez Department of Electrical and Computer Engineering University of Puerto Rico,
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.
Database Design Concepts
Irwin/McGraw-Hill Copyright © 2000 The McGraw-Hill Companies. All Rights reserved Whitten Bentley DittmanSYSTEMS ANALYSIS AND DESIGN METHODS5th Edition.
COMM 226 Practical tips for creating entity relationship diagrams (ERDs) Chitu Okoli Associate Professor in Business Technology Management John Molson.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
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.
IS 325 Notes for Wednesday September 4, Syllabus Change I eliminated quizzes I increased the points allocated to homework assignments.
The REA Model. The REA model provides structure for developing an accounting database It helps to identify It helps to The REA Model.
Principles of Database Design, Part II AIMS 2710 R. Nakatsu.
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
1 Relational Database Development Alison Taylder Consultant ITC-ILO, Turin 25 th November 2004.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
IS 475/675 - Introduction to Database Design
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Database Systems. Entity Relationship Diagram How to Develop an ERD? Typically you will start with a case study or perhaps a logical model of the system.
Next Back A-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All rights.
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:
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.
Chapter 2 : Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of.
IT 21103/41103 System Analysis & Design. Chapter 04 Data Modeling.
IFS310: Module 6 3/1/2007 Data Modeling and Entity-Relationship Diagrams.
Description and exemplification of entity-relationship modelling.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
UNIT_2 1 DATABASE MANAGEMENT SYSTEM[DBMS] [Unit: 2] Prepared By Lavlesh Pandit SPCE MCA, Visnagar.
Relational Theory and Design
INTRODUCTION TO DATABASE DESIGN. Definitions Database Models: Conceptual, Logical, Physical Conceptual: “big picture” overview of data and relationships.
Data Modeling Using the Entity-Relationship (ER) Data Model.
Understand Relational Database Management Systems Software Development Fundamentals LESSON 6.1.
Dr. Chaitali Basu Mukherji
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.
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 Sudarshan7.1Database System Concepts - 6 th Edition Chapter 7: Entity-Relationship Model.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 2: MODELING DATA.
Teanna Clarke 6aQ What is a Entity-Relationship Diagram?  An Entity-Relationship Diagram (ERD) is a tool that graphically shows the connections among.
Entity Relationship Diagram ERD. Background Peter Chen developed ERDs in Charles Bachman and James Martin have added some slight refinements to.
ENTITY RELATIONSHIP DIAGRAM. Objectives Define terms related to entity relationship modeling, including entity, entity instances, attribute, relationship.
IT 5433 LM3 Relational Data Model. Learning Objectives: List the 5 properties of relations List the properties of a candidate key, primary key and foreign.
Contents Design Process Modeling Constraints E-R Diagram Design Issues
Database Design Chapters 17 and 18.
Entity Relationship Model
Entity-Relationship Model
ERD’s REVIEW DBS201.
Entity-Relationship Diagram (ERD)
E.R. Examples.
Presentation transcript:

1 Entity-Relationship Diagram

2 Components of ERD: –Entity –Relationship –Cardinality –Attributes

3 Cardinality Notations

4

5

6

7 One Methodology for Developing ERD 1. Identify Entities Identify the roles, events, locations, tangible things or concepts about which the end-users want to store data. 2. Find Relationships Find the natural associations between pairs of entities using a relationship matrix. 3. Draw Rough ERD Put entities in rectangles and relationships on line segments connecting the entities. 4. Fill in Cardinality Determine the number of occurrences of one entity for a single occurrence of the related entity. 5. Define Primary Keys Identify the data attribute(s) that uniquely identify one and only one occurrence of each entity.

8 6. Draw Key-Based ERD Eliminate Many-to-Many relationships and include primary and foreign keys in each entity. 7. Identify Attributes Name the information details (fields) which are essential to the system under development. 8. Map Attributes For each attribute, match it with exactly one entity that it describes. 9. Draw fully attributed ERD Adjust the ERD from step 6 to account for entities or relationships discovered in step Check Results Does the final Entity Relationship Diagram accurately depict the system data?

9 Example1 A company has several departments. Each department has a supervisor and at least one employee. Employees must be assigned to at least one, but Possibly more departments. At least one employee is assigned to a project, but an employee may be on vacation and not assigned to any projects. The Important data fields are the names of the departments, projects, supervisors and employees, as well as the supervisor and employee number and a unique project number.

10 1. Identify Entities A company has several departments. Each department has a supervisor and at least one employee. Employees must be assigned to at least one, But possibly more departments. At least one employee is assigned to a project, But an employee may be on vacation and not assigned to any projects. The important data fields are the names of the departments, projects, Supervisors and employees, as well as the supervisor and employee number and a unique project number.

11 2. Find Relationships A Department is assigned an employee A Department is run by a supervisor An employee belongs to a department An employee works on a project A supervisor runs a department A project uses an employee

12 3. Draw Rough ERD

13 4. Fill in Cardinality In this step we're aiming to identify the number of occurrences of one entity for a single occurrence of the related entity. For example, how many supervisors can there be for a single department? How many departments can a single supervisor be associated with? To answer this you can loop through each entity from our rough diagram and ask the question "how many of this entity?" for a single instance of each related entity?

14 Supervisor –Each department has one supervisor. Department –Each supervisor has one department. –Each employee can belong to one or more departments Employee –Each department must have one or more employees –Each project must have one or more employees Project –Each employee can have 0 or more projects. The cardinality of a relationship can only have the following values –One and only one –One or more –Zero or more –Zero or one

15

16 5. Define Primary Keys You identify primary keys by examining and evaluating the information about the system. In this example, the following are specified as unique identifiers: Department Name, Supervisor Number, Employee Number and Project Number.

17 6. Draw Key-Based ERD This step cleans up some of the shortcomings of the ERD created so far. In particular, it involves –Eliminating many-to-many relationships, and –Adding Primary and Foreign keys for each entity (a task I started in the last step) Why are many-to-many relationships bad? Two of the reasons why many-to-many relationships are bad and should be removed from an ERD include: –They can't be represented in relational databases. –You often wish to record information about a many-to-many relationship. For example, you may wish to record when an employee starts working on a project. With the current ERD you wouldn't be able to store this information. It is not information that belongs in either the Employee or the Project entity.

18

19 Is Assigned The cardinality on both sides of the relationship is indicated by an "arrow" with a single line. This means that it is a "one or more“ cardinality. The "more" is the same as "many". So both cardinalities include "many". There is a "many" cardinality on both sides of the relationship. This is a many-to-many relationship.

20 Works on Using Figure 3 you should be able to work out that one cardinality is "one or more" and the other is "zero or more". Both sides contain "more" which is the same as "many" and so this is a many-to-many relationship.

21 7. Identify Attributes The only attributes indicated are the names of the departments, projects, supervisors and employees, as well as the supervisor and employee NUMBER and a unique project number. 8. Map Attributes

22 9. Draw fully attributed ERD

23 1. Consider the Insurance database given below. The primary keys are underlined and the data types are specified: PERSON (driver-id:string,name:string,address:string) CAR (Regno:string,model:string,year:int) ACCIDINT (report-number:int,date:date,location:string) OWNS (driver-id:string,regno:string) PARTICIPATED (driver-id:string,regno:string,report-number:int,damage- amount:int)

24 Movie Rental Database