Entity Relationship Diagrams

Slides:



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

Database Design The process of finding user requirement
Lecture plan Outline of DB design process Entity-relationship model
Modern Systems Analysis and Design Third Edition
Systems Development Life Cycle
System Analysis - Data Modeling
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
Systems Analysis Requirements structuring Process Modeling Logic Modeling Data Modeling  Represents the contents and structure of the DFD’s data flows.
Entity Relationship Diagrams Basic Elements and Rules.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
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
Slides adapted from A. Silberschatz et al. Database System Concepts, 5th Ed. Entity-Relationship Model Database Management Systems I Alex Coman, Winter.
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.
Modern Systems Analysis and Design Third Edition
Entity Relationship Diagrams
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas.
Data Modeling Using the Entity-Relationship Model
Copyright 2004 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Second Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Data Modeling Using the Entity-Relationship Model
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.
3.1 CSIS 3310 Chapter 3 The Entity-Relationship Model Conceptual Data Modeling.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
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.
Copyright © 2012 Pearson Education, Inc. Publishing as Prentice Hall 7.1.
CONCEPTS OF E-R MODEL. CONTENTS Entity Attributes Data Value Entity Types Types of Entity Types Relationships Relationship Constraints.
Data Modeling ERM ERD.
Dr. Mohamed Osman Hegaz1 Conceptual data base design: The conceptual models: The Entity Relationship Model.
Copyright 2001 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter 6 Structuring.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright 2006 Prentice-Hall, Inc. Essentials of Systems Analysis and Design Third Edition Joseph S. Valacich Joey F. George Jeffrey A. Hoffer Chapter.
Conceptual Data Modeling, Entity Relationship Diagrams
Chapter 3 Data Modeling Using the Entity- Relationship (ER) Model Dr. Bernard Chen Ph.D. University of Central Arkansas Fall 2008.
©Silberschatz, Korth and Sudarshan2.1Database System Concepts Chapter 2: Entity-Relationship Model Entity Sets Relationship Sets Design Issues Mapping.
Entity-Relationship Model Using High-Level Conceptual Data Models for Database Design Entity Types, Sets, Attributes and Keys Relationship Types, Sets,
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,
DeSiamorePowered by DeSiaMore1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
Data Modelling Using Entity-Relationship (ER) Model
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Data Modeling Using the Entity-Relationship (ER) Data Model.
Modern Systems Analysis and Design Third Edition
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
IS 4420 Database Fundamentals Chapter 3: Modeling Data in the Organization Leon Chen.
Data Modeling Using the Entity- Relationship (ER) Model
COP Introduction to Database Structures
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Business System Development
Data Modeling Using the Entity- Relationship (ER) Model
Entity- Relationship (ER) Model
ER model Ashima Wadhwa.
Entity-Relationship Model
Entity Relationship Model
Chapter 6 Structuring System Requirements: Conceptual Data Modeling
Entity-Relationship Model
بسم الله الرحمن الرحيم.
Entity Relationship Diagrams
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Review of Week 1 Database DBMS File systems vs. database systems
Entity-Relationship Diagram (ERD)
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Entity Relation Model Tingting Zhang.
Lecture 10 Structuring System Requirements: Conceptual Data Modeling
Presentation transcript:

Entity Relationship Diagrams 1. Basic Elements and Rules

Software Analysis & Design ER Model contains detailed descriptions of: What are the entities and relationships in the enterprise? What information about these entities and relationships should we store in the database? What are the integrity constraints or business rules that hold?

Data modelling(ERD) vs Process modelling(DFD) Process modelling (i.e. DFD) shows data stores, how, where, when data are used or changed in an IS Data modelling (i.e ER) shows definition, structure, and relationship within the data

Why data model is most important part of the statement of SW requirement? Characteristics of data captured during data modelling are crucial in design of DB, program, computer screen, and reports Data rather than processes are the most complex aspects of many modern IS so require a central role in structuring system requirement The characteristics of data (length, format, relationship) are reasonably permanen. The paths of data flow are quite dynamic. Structural information about data is essensial for automatic generation of programs

Conceptual Data Modeling and the E-R Diagram Goal Capture as much of the meaning of the data as possible A better design that is scalable and easier to maintain

Introduction to Entity-Relationship (E-R) Modeling Notation uses three main constructs Data entities Attributes Relationships Entity-Relationship (E-R) Diagram A detailed, logical representation of the entities, associations and data elements for an organization or business 10.6

Entity-Relationship (E-R) Modeling Key Terms A person, place, object, event or concept in the user environment about which the organization wishes to maintain data Represented by a rectangle in E-R diagrams Attribute A named property or characteristic of an entity that is of interest to an organization 10.7

Entity-Relationship (E-R) Modeling Key Terms Candidate keys and identifiers Attribute (or combination of attributes) that uniquely identifies each instance of an entity type

Notation Guide ENTITY WEAK ENTITY TYPE RELATIONSHIP TYPE IDENTIFYING RELATIONSHIP TYPE

… Notation Guide . . . ATTRIBUTE KEY ATTRIBUTE MULTIVALUED ATTRIBUTE DERIVED ATTRIBUTE COMPOSITE ATTRIBUTE _____ . . .

… Notation Guide 1:N FOR E1:E2 IN R 1 N E1 R E2

ER Diagram Basics Entity Relationship Attributes Product Keeps Store descrip qty price pname manager Locations sname Relationship Attributes

Entity Real-world object distinguishable from other objects (e.g a student, car, job, subject, building ...) An entity is described using a set of attributes The same entity may have different prominence in different scenario – In the Company database, an employee’s car is of lesser importance – In the Department of Transportation’s registration database, cars may be the most important concept – In both cases, cars will be represented as entities; but with different levels of detail

Attributes Key Attributes Value Sets of Attributes Null Valued Attributes Attribute Types – Composite Vs. Simple Attributes – Single-valued Vs. Multi-valued Attributes – Derived Vs. Stored Attributes Notation

Key Attributes Key (or uniqueness) constraints are applied to entity types Key attribute’s values are distinct for each individual entity. A key attribute has its name underlined inside the oval Multiple keys are possible SSN EMPLOYEE

Null Valued Attributes A particular entity may not have an applicable value for an attribute Type of Null Values – Not Applicable – Unknown – Missing

Composite Vs. Simple Attributes Composite attributes can be divided into smaller parts which represent simple attributes with independent meaning Simple Attribute: Aircraft-Type Complex Attribute: Aircraft-Location which is comprised of : Aircraft-Latitude Aircraft-Longitude Aircraft-Altitude Notation

Single Vs. Multivalued Attributes Simple attributes can either be single-valued or multi-valued Single-valued: Gender = F Notation Multi-valued: Degree = {BSc, MTech}

Derived Vs. Stored Attributes Some attribute values can be derived from related attribute values: Age ® Date - B-day Y-Sal ® 12 * M-Sal Notation Age M-sal B-days Y-sal EMPLOYEE

Derived Vs. Stored Attributes Order Item price qty Total-Value Some attribute values can be derived from attributed values of related entities total-value = sum (qty * price)

Representing Attributes Parenthesis ( ) for composite attributes Brackets { } for multi-valued attributes Assume a person can have more than one residence and each residence can have multiple telephones {AddressPhone ({ Phone ( AreaCode,PhoneNum ) }, Address (StreetAddresss (Number, Street, AptNo), City,State,PostalCode) ) }

Entity-Relationship (E-R) Modeling Key Terms An association between the instances of one or more entities that is of interest to the organization Relationships are always labeled with verb phrases

Naming and Defining Relationships Relationship name is a verb phrase Avoid vague names Guidelines for defining relationships Definition explains what action is being taken and why it is important Give examples to clarify the action Optional participation should be explained Explain reasons for any explicit maximum cardinality

Relationship Degree Departments The degree of a relationship type is the number of participating entity types – 2 entities: Binary Relationship 3 entities: Ternary Relationship – Same entity type could participate in multiple relationship types Works_In Binary Employees Multiple Supply Assigned_to Supplier Project Ternary Part

Entity Roles Each entity type that participates in a relationship Employees Works_In Departments employer worker Role Names Each entity type that participates in a relationship type plays a particular role in the relationship type The role name signifies the role that a participating entity from the entity type plays in each relationship instance, i.e. it explains what the relationship means

Relationship Constraints What are Relationship Constraints ? Constraints on the relationship type limit the possible combination of entities that may participate in the corresponding relationship set

Possible Relations . . . . 1–to-1 (1 : 1) – Both entities can participate in only one relationship instance 1-to-Many, Many-to-1 (1 : N, N : 1) – One entity can participate in many relationship instances Many-to-Many (N: M) – Both entities can participate in many relationship instance . Many - to - 1 . . 1- to - Many . Many-to-Many

Example Cardinality Constraints How many Employees can work in a Department? One employee can work in only one department How many Employees can be employed by a Department? One department can employ many employees How many managers can a department have? One department can have only one manager How many departments can an employee manage? One employee can have manage only one department

Representing Relations 1 Employees Works_In Departments Manages One employee can work in only one department One department can employ many employees One department can have only one manager One employee can manage only one department