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:



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

Chapter 2.1 V3.1 Napier University Dr Gordon Russell
BUSINESS DRIVEN TECHNOLOGY Plug-In T4 Designing Database Applications.
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.
ERD diagram Data Design - Mr. Ahmad Al-Ghoul
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
System Analysis - Data Modeling
Databases Revision.
Modeling Data The Entity Relationship Model (ER) For Database Design.
Entity-Relationship Model and Diagrams (continued)
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
System Analysis and Design
1 Data Modelling Which data to include in the database.
Chapter 2: Entity-Relationship Model (Continued)
Entity/Relationship Modelling
APPENDIX C DESIGNING DATABASES
Entity Relationship Model Chapter 6. Basic Elements of E-R Model Entity Object of the real world that stores data. Eg. Customer, State, Project, Supplier,
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Database Design Concepts
Web-Enabled Decision Support Systems
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
1 Chapter 1 Overview of Database Concepts. 2 Chapter Objectives Identify the purpose of a database management system (DBMS) Distinguish a field from a.
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
IS 325 Notes for Wednesday September 4, Syllabus Change I eliminated quizzes I increased the points allocated to homework assignments.
Chapter 6: ER – Entity Relationship Diagram
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
Concepts and Terminology Introduction to Database.
McGraw-Hill/Irwin © 2008 The McGraw-Hill Companies, All Rights Reserved Plug-In T5: Designing Database Applications Business Driven Technology.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
Chapters 15 &16 Conceptual and Logical Database Design Methodology.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Entity-Relationship Modeling Based on Chapter 12.
Chapter 1Introduction to Oracle9i: SQL1 Chapter 1 Overview of Database Concepts.
Chapter 12 Entity-Relationship Modeling Pearson Education © 2009.
1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.
Entity-Relationship Model Using High-Level Conceptual Data Models for Database Design Entity Types, Sets, Attributes and Keys Relationship Types, Sets,
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Computing & Information Sciences Kansas State University Wednesday, 24 Sep 2008CIS 560: Database System Concepts Lecture 12 of 42 Wednesday, 24 September.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Chapter 2 : Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping Constraints Keys E-R Diagram Extended E-R Features Design of.
Database Management Systems MIT Lesson 02 – Database Design (Entity Relationship Diagram) By S. Sabraz Nawaz.
ERD ( Conceptual data model From the statement of data requirements a conceptual data model is produced. This describes.
09/03/2009Lipyeow Lim -- University of Hawaii at Manoa 1 ICS 321 Fall 2009 Introduction to Database Design Asst. Prof. Lipyeow Lim Information & Computer.
Databases Illuminated Chapter 3 The Entity Relationship Model.
MIS 301 Information Systems in Organizations Dave Salisbury ( )
BSA206 Database Management Systems Lecture 2: Introduction to Oracle / Overview of Database Concepts.
1 DATABASE TECHNOLOGIES (Part 2) BUS Abdou Illia, Fall 2015 (September 9, 2015)
Lesson 4: The Relational Model. Lesson Overview Database Design Entities Relationships E-R Diagrams.
Copyright © 2013 by The McGraw-Hill Companies, Inc. All rights reserved. McGraw-Hill/Irwin APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Dr Gordon Russell, Napier University Data Analysis 1 - V2.0 1 Data Analysis 1 Unit 2.1.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
DBMS ER model-2 Week 6-7.
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
Database Design. Database Design Process Data Model Requirements Application 1 Database Requirements Application 2 Requirements Application 4 Requirements.
1 Entity Relationship Diagram. ER proposed by Peter Chen ER diagram is widely used in database design Represent conceptual level of a database.
LECTURE 1: Entity Relationship MODEL. Think before doing it! Like most of the software projects, you need to think before you do something. Before developing.
Chapter 2: Entity-Relationship Model. 3.2 Chapter 2: Entity-Relationship Model Design Process Modeling Constraints E-R Diagram Design Issues Weak Entity.
©Silberschatz, Korth and Sudarshan7.1Database System Concepts - 6 th Edition Chapter 7: Entity-Relationship Model.
Teanna Clarke 6aQ What is a Entity-Relationship Diagram?  An Entity-Relationship Diagram (ERD) is a tool that graphically shows the connections among.
Topic 3: ER – Entity Relationship Model (ERM) 6/12/
Entity Relationship Diagram ERD. Background Peter Chen developed ERDs in Charles Bachman and James Martin have added some slight refinements to.
DATA SCIENCE MIS0855 | Spring 2016 Designing Data
Database Designsemester Slide 1 Database Design Lecture 7 Entity-relationship modeling Text , 7.1.
COP Introduction to Database Structures
Entity-Relationship Modeling
Overview of Entity‐Relationship Model
Presentation transcript:

Entity-Relationship Modelling Introduced by Chen in 1976 The ER Model is used to construct the conceptual data model – independent of DBMS Most widely used techniques for modelling of business domains data requirements

Entity-Relationship Modelling R K Bhagat

Entity A ‘thing’ which can be distinctly identified A distinguishable object from the problem domain e.g. –STUDENT, UNIT, COURSE –EMPLOYEE, DEPARTMENT, COMPANY Real or abstract –Book, Author –Loan, Sale

Choosing Entities Usually ‘nouns’ from the problem domain – CUSTOMER, ORDER, SUPPLIER – AIRCRAFT, SEAT, FLIGHT, AIRLINE – Eliminate synonyms AIRCRAFT and PLANE are the same entity –Beware of roles that should be entities, e.g - MACHINIST should be EMPLOYEE DELIVERY VAN should be VEHICLE

Drawing Entities Entities are in UPPER CASE and singular - ‘EMPLOYEE’ not ‘employees’ Each entity instance must be uniquely identified by a primary key national_insurance_number EMPLOYEE

Attributes Attributes are details that identify, quantify or describe the entity Attributes take values from a domain e.g. month = {Jan, Feb, Mar, …. Dec} unit = {DBS1, BP, BITS1, ICT, ACC} Ensure that the attribute really describes the entity, e.g. shirt_colour is an attribute of TEAM, not PLAYER

Drawing Attributes Attributes appear below the entity that they describe in lower case Use underlining to denote the primary key department_number name location DEPARTMENT

Primary Key The primary key is the attribute, or set of attributes, that uniquely identifies all of the entity instances Ensure that the primary key uniquely identifies the instances, e.g – ‘student_id’ is unique, but ‘surname’ is not There are other types of key – foreign, composite, candidate

Relationships ‘An association among entities’ A named significant association A binary association that links two entities Drawn as the line on the diagram Cardinality –one to one –one to many –many to many

One-to-One Relationship A HUSBAND has one WIFE A WIFE has one HUSBAND

One-to-Many Relationship A DEPARTMENT has one or more EMPLOYEEs

Many-to-Many Relationship A STUDENT attends one or more UNITs A UNIT is taken by one or more STUDENTs

Checking for Redundant Relationships

Steps in Entity Relationship Modelling 1. Identify the entities. 2. Identify the relationships using a relationship grid. 3. Identify the relationship types 4. Draw the entity-relationship diagram. 5. Check for and remove redundant relationships

Steps in Entity Relationship Modelling 6. Remove many-to-many relationships. 7. Identify/create the primary key for each entity 8. Convert one-to-many relationships to foreign keys. 9. Identify/create additional attributes for each entity. 10. Define the relations corresponding to the entity- relationship model. 11. Create the relations in the Database Management System 12. Declare the primary keys and foreign keys.

The Scenario ‘CD-Direct’ is a new Internet Retailer that sells Compact Discs using the web. They require a relational database to store details of the orders placed by their customers. A customer can make one or more orders. For each order, an employee picks out the compact disc and sends them to the customer who placed the order. More than one disc can be ordered on the same order. The company requires that information about which employee dealt with each order be recorded in the database for management reasons. An invoice is sent to the customer with the ordered goods.

Check for and remove redundant relationships

Summary Identify the entities Identify relationships between entities Remove any redundant relationships Remove M:N relationships by adding an extra entity – many go on the extra entity Add primary keys and foreign keys –foreign keys are the primary keys from the one put into the many side of the relationship Add additional attributes Convert into a set of relations