Entity Relationship (ER) Modeling

Slides:



Advertisements
Similar presentations
Entity Relationship (ER) Modeling
Advertisements

Chapter # 4 BIS Database Systems
Entity Relationship (E-R) Modeling
Entity Relationship (E-R) Modeling Hachim Haddouti
Entity Relationship (ER) Modeling
Chapter 4 Entity Relationship (E-R) Modeling
4 4 Chapter 4 Entity Relationship (E-R) Modeling Database Systems: Design, Implementation, and Management 4th Edition Peter Rob & Carlos Coronel.
Chapter 4 Entity Relationship (ER) Modeling
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Chapter 4 Entity Relationship (E-R) Modeling
Entity Relationship (ER) Modeling
Entity Relationship (ER) Modeling
Entity Relationship (E-R) Modeling
LIS 557 Database Design and Management William Voon Michael Cole Spring '04.
Chapter 4 ENTITY-RELATIONSHIP MODELLING.
Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 1 Data Models: Degrees of Data Abstraction l Modified ANSI/SPARC Framework.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 4 Entity Relationship (E-R) Modeling
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
BTM 382 Database Management Chapter 4: Entity Relationship (ER) Modeling Chitu Okoli Associate Professor in Business Technology Management John Molson.
Entity-Relationship modeling Transparencies
3 Chapter 3 Entity Relationship (E-R) Modeling Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
1. 2 Data Modeling 3 Process of creating a logical representation of the structure of the database The most important task in database development E-R.
Entity-relationship Modeling Transparencies 1. ©Pearson Education 2009 Objectives How to use ER modeling in database design. The basic concepts of an.
Chapter 7 Data Modeling with Entity Relationship Diagrams Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
ITEC 3220M Using and Designing Database Systems Instructor: Prof. Z.Yang Course Website: 3220m.htm
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Chapter 5 Entity Relationship (ER) Modelling
Chapter 5 Entity–Relationship Modeling
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
Entity-Relationship Modeling Based on Chapter 12.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 4 Entity Relationship (ER) Modeling.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Relationship Degree Indicates number of entities or participants.
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
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.
Chapter 7 Data Modeling with Entity Relationship Diagrams
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
3 & 4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys Consists of one or more attributes that determine other.
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 4 ENTITY RELATIONSHIP (ER) MODELING Instructor Ms. Arwa Binsaleh 1.
Database Design – Lecture 4 Conceptual Data Modeling.
The Entity-Relationship Model, P. I R. Nakatsu. Data Modeling A data model is the relatively simple representation, usually graphic, of the structure.
Chapter 4 Entity Relationship (E-R) Modeling
Entity-Relationship Modeling. 2 Entity Type u Entity type –Group of objects with same properties, identified by enterprise as having an independent existence.
Chapter 8 Entity-Relationship Modeling Pearson Education © 2009.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
Entity Relationship (E-R) Model
TMC2034 Database Concept and Design
Chen’s Type Guidance.
Entity Relationship (E-R) Modeling
Entity Relationship (E-R) Modeling
Tables and Their Characteristics
Database Design – Lecture 4
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Database Systems Instructor Name: Lecture-9.
Review of Week 1 Database DBMS File systems vs. database systems
Chapter 4 Entity Relationship (ER) Modeling
ER MODELING Instructor: SAMIA ARSHAD
Entity Relationship (ER) Modeling
Chapter # 4 Entity Relationship (ER) Modeling.
Presentation transcript:

Entity Relationship (ER) Modeling

In this chapter, you will learn: The main characteristics of entity relationship components How relationships between entities are defined and refined and how those relationships are incorporated into the database design process How ERD components affect database design and implementation That real-world database design often requires the reconciliation of conflicting goals

The Entity Relationship (ER) Model ER model forms the basis of an ER diagram ERD represents conceptual database as viewed by end user ERDs depict database’s main components: Entities Attributes Relationships

Entities Refers to entity set and not to single entity occurrence Corresponds to table and not to row in relational environment In both Chen and Crow’s Foot models, entity is represented by rectangle containing entity’s name Entity name, a noun, is usually written in capital letters

Attributes Characteristics of entities In Chen model, attributes are represented by ovals and are connected to entity rectangle with a line Each oval contains the name of attribute it represents In Crow’s Foot model, attributes are written in attribute box below entity rectangle

Attributes (continued)

Domains Attributes have domain Attributes may share a domain Domain is attribute’s set of possible values Attributes may share a domain

Identifiers (Primary Keys) Underlined in the ERD Key attributes are also underlined in frequently used table structure shorthand

Composite Primary Keys Primary keys ideally composed of only single attribute Possible to use a composite key Primary key composed of more than one attribute

Composite and Simple Attributes Composite attribute can be subdivided Simple attribute cannot be subdivided Single-value attribute can have only a single value Multivalued attributes can have many values

Multivalued Attributes (continued)

Resolving Multivalued Attribute Problems Although conceptual model can handle M:N relationships and multivalued attributes, you should not implement them in relational DBMS Within original entity, create several new attributes, one for each of the original multivalued attribute’s components Can lead to major structural problems in table Create new entity composed of original multivalued attribute’s components

Resolving Multivalued Attribute Problems (continued)

Resolving Multivalued Attribute Problems (continued)

Resolving Multivalued Attribute Problems (continued)

Derived Attributes Attribute whose value may be calculated (derived) from other attributes Need not be physically stored within database Can be derived by using an algorithm

Derived Attributes (continued)

Derived Attributes (continued)

Relationships Association between entities Participants are entities that participate in a relationship Relationships between entities always operate in both directions Relationship can be classified as 1:M Relationship classification is difficult to establish if know only one side of the relationship

Connectivity and Cardinality Used to describe the relationship classification Cardinality Expresses minimum and maximum number of entity occurrences associated with one occurrence of related entity Established by very concise statements known as business rules

Connectivity and Cardinality (continued)

Existence Dependence Existence dependence Existence independence Exist in database only when it is associated with another related entity occurrence Existence independence Entity can exist apart from one or more related entities Sometimes refers to such an entity as strong or regular entity

Relationship Strength Weak (non-identifying) relationships Exists if PK of related entity does not contain PK component of parent entity Strong (Identifying) Relationships Exists when PK of related entity contains PK component of parent entity

Weak (Non-Identifying) Relationships

Weak (Non-Identifying) Relationships (continued)

Strong (Identifying) Relationships

Weak Entities Weak entity meets two conditions Existence-dependent Cannot exist without entity with which it has a relationship Has primary key that is partially or totally derived from parent entity in relationship Database designer usually determines whether an entity can be described as weak based on business rules

Weak Entities (continued)

Weak Entities (continued)

Relationship Participation Optional participation One entity occurrence does not require corresponding entity occurrence in particular relationship Mandatory participation One entity occurrence requires corresponding entity occurrence in particular relationship

Relationship Participation (continued)

Relationship Participation (continued)

Relationship Participation (continued)

Relationship Participation (continued)

Relationship Degree Indicates number of entities or participants associated with a relationship Unary relationship Association is maintained within single entity Binary relationship Two entities are associated Ternary relationship Three entities are associated

Relationship Degree (continued)

Relationship Degree (continued)

Recursive Relationships Relationship can exist between occurrences of the same entity set Naturally found within unary relationship

Recursive Relationships (continued)

Recursive Relationships (continued)

Recursive Relationships (continued)

Recursive Relationships (continued)

Recursive Relationships (continued)

Recursive Relationships (continued)

Composite Entities Also known as bridge entities Composed of primary keys of each of the entities to be connected May also contain additional attributes that play no role in connective process

Composite Entities (continued)

Composite Entities (continued)

Composite Entities (continued)

Developing an ER Diagram Database design is iterative rather than linear or sequential process Iterative process Based on repetition of processes and procedures

Developing an ER Diagram (continued) Building an ERD usually involves the following activities: Create detailed narrative of organization’s description of operations Identify business rules based on description of operations Identify main entities and relationships from business rules Develop initial ERD Identify attributes and primary keys that adequately describe entities Revise and review ERD

Developing an ER Diagram (continued) Tiny College Tiny College is divided into several schools Each school is composed of several departments Each department may offer courses Each department may have many professors assigned to it Each professor may teach up to four classes; each class is section of course Student may enroll in several classes, but (s)he takes each class only once during any given enrollment period

Developing an ER Diagram (continued) Tiny College (continued) Each department has several students Each student has only a single major and is associated with a single department Each student has an advisor in his or her department Each advisor counsels several students The relationship between class is taught in a room and the room in the building

Developing an ER Diagram (continued)

Developing an ER Diagram (continued)

Developing an ER Diagram (continued)

Developing an ER Diagram (continued)

Developing an ER Diagram (continued)

Developing an ER Diagram (continued)

Developing an ER Diagram (continued)

Developing an ER Diagram (continued)

Developing an ER Diagram (continued)

Developing an ER Diagram (continued)

Developing an ER Diagram (continued)

Database Design Challenges: Conflicting Goals Database design must conform to design standards High processing speeds are often a top priority in database design Quest for timely information might be focus of database design

Database Design Challenges: Conflicting Goals (continued)

Summary Entity relationship (ER) model Uses ERD to represent conceptual database as viewed by end user ERM’s main components: Entities Relationships Attributes Includes connectivity and cardinality notations

Summary (continued) Connectivities and cardinalities are based on business rules In ERM, M:N relationship is valid at conceptual level ERDs may be based on many different ERMs Database designers are often forced to make design compromises