3 Chapter 3 Entity Relationship (E-R) Modeling Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel.

Slides:



Advertisements
Similar presentations
Chapter # 4 BIS Database Systems
Advertisements

Entity Relationship (E-R) Modeling
Entity Relationship (E-R) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Entity Relationship (E-R) Modeling Hachim Haddouti
Advanced Data Modeling
Entity Relationship (ER) Modeling
Chapter 4 Entity Relationship (E-R) Modeling
Entity Relationship (ER) Modeling
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
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 6 Advanced Data Modeling.
Entity Relationship (E-R) Modeling
Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
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
BTM 382 Database Management Chapter 4: Entity Relationship (ER) Modeling Chitu Okoli Associate Professor in Business Technology Management John Molson.
Data Modeling 1 Yong Choi School of Business CSUB.
Chapter 4 Entity Relationship (E-R) Modeling
2 1 Chapter 2 Data Model Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
DeSiamorewww.desiamore.com/ifm1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
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.
2 1 Chapter 2 Data Models Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Database Systems: Design, Implementation, and Management Ninth Edition
Chapter 5 Entity Relationship (ER) Modelling
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
9/10/2012ISC 329 Isabelle Bichindaritz1 Entity Relationship (E-R) 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 (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 9: Logical Database Design and the Relational Model (ERD Mapping)
Msigwaemhttp//:msigwaem.ueuo.com/1 Database Management Systems (DBMS)  B. Computer Science and BSc IT Year 1.
1 A Demo of Logical Database Design. 2 Aim of the demo To develop an understanding of the logical view of data and the importance of the relational model.
3 & 4 1 Database Systems: Design, Implementation, & Management, 7 th Edition, Rob & Coronel Keys Consists of one or more attributes that determine other.
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.
Entity Relationship Modeling
Database Design – Lecture 4 Conceptual Data Modeling.
Entity-Relation Model. E-R Model The Entity-Relationship (ER) model was originally proposed by Peter in 1976 ER model is a conceptual data model that.
Data Modeling Yong Choi School of Business CSUB. Part # 2 2 Study Objectives Understand concepts of data modeling and its purpose Learn how relationships.
Entity Relationship Model: E-R Modeling 1 Database Design.
1 Database Systems Entity Relationship (E-R) Modeling.
Chapter 4 Entity Relationship (E-R) Modeling
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
Entity Relationship Modeling
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
Review of Week 1 Database DBMS File systems vs. database systems
Chapter 4 Entity Relationship (ER) Modeling
Entity Relationship (ER) Modeling
Chapter # 4 Entity Relationship (ER) Modeling.
Presentation transcript:

3 Chapter 3 Entity Relationship (E-R) Modeling Database Systems: Design, Implementation, and Management, Fifth Edition, Rob and Coronel

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 2 In this chapter, you will learn: What a conceptual model is and what its purpose is The difference between internal and external models How internal and external models serve the database design process How relationships between entities are defined and refined, and how such relationships are incorporated into the database design process How ERD components affect database design and implementation How to interpret the modeling symbols for the four most popular E-R modeling tools That real-world database design often requires you to reconcile conflicting goals

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 3 Basic Modeling Concepts Art and science Good judgment coupled with powerful design tools Models –“Description or analogy used to visualize something that cannot be directly observed” Webster’s Dictionary Data Model –Relatively simple representation of complex real- world data structures

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 4 Data Models: Degrees of Data Abstraction Figure 3.1

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 5 Degrees of Abstraction Conceptual –Global view of data –Basis for identification and description of main data items –ERD used to represent conceptual data model –Hardware and software independent

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 6

3 7

3 8 Degrees of Abstraction (con’t.) Internal –Representation of database as seen by DBMS –Adapts conceptual model to specific DBMS –Software dependent

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 9

3 10 Degrees of Abstraction (con’t.) External –Users’ views of data environment –Provides subsets of internal view –Makes application program development easier –Facilitates designers’ tasks –Ensures adequacy of conceptual model –Ensures security constraints in design

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 11

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 12 Degrees of Abstraction (con’t.) Physical –Lowest level of abstraction –Software and hardware dependent –Requires definition of physical storage devices and access methods

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 13 The Entity Relationship (E-R) Model Represents conceptual view Main Components –Entities Corresponds to entire table, not row Represented by rectangle –Attributes –Relationships

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 14 Attributes Characteristics of entities Domain is set of possible values Primary keys underlined Figure 3.6

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 15

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 16 Attributes (con’t.) Simple –Cannot be subdivided –Age, sex, marital status Composite –Can be subdivided into additional attributes –Address into street, city, zip Single-valued –Can have only a single value –Person has one social security number Multi-valued –Can have many values –Person may have several college degrees Derived –Can be derived with algorithm –Age can be derived from date of birth

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 17

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 18

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 19

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 20

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 21 Relationships Association between entities Connected entities are called participants Operate in both directions Connectivity describes relationship classification –1:1, 1:M, M:N Cardinality –Expresses number of entity occurrences associated with one occurrence of related entity

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 22 Connectivity and Cardinality in an ERD Figure 3.12

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 23 Relationship Strength Existence dependence –Entity’s existence depends on existence of related entities –Existence-independent entities can exist apart from related entities –EMPLOYEE claims DEPENDENT Weak (non-identifying) –One entity is existence-independent on another –PK of related entity doesn’t contain PK component of parent entity Strong (identifying) –One entity is existence-dependent on another –PK of related entity contains PK component of parent entity

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 24

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 25

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 26

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 27 Relationship Participation Optional –Entity occurrence does not require a corresponding occurrence in related entity –Shown by drawing a small circle on side of optional entity on ERD Mandatory –Entity occurrence requires corresponding occurrence in related entity –If no optionality symbol is shown on ERD, it is mandatory

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 28

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 29

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 30

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 31 Weak Entity Existence-dependent on another entity Has primary key that is partially or totally derived from parent entity

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 32

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 33

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 34 Relationship Degree Indicates number of associated entities Unary –Single entity –Recursive –Exists between occurrences of same entity set Binary –Two entities associated Ternary –Three entities associated

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 35

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 36 Recursive Relationships

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 37

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 38

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 39

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 40

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 41

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 42

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 43 Composite Entities Used to ‘bridge’ between M:N relationships Bridge entities composed of primary keys of each entity needing connection

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 44

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 45

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 46

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 47 Entity Supertypes and Subtypes Generalization hierarchy –Depicts relationships between higher-level supertype and lower-level subtype entities –Supertype has shared attributes –Subtypes have unique attributes –Disjoint relationships Unique subtypes Non-overlapping Indicated with a ‘G’ –Overlapping subtypes use ‘Gs’ Symbol

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 48

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 49

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 50 Comparison of E-R Modeling Symbols Alternate styles developed to enable easier use of CASE tools Chen –Moved conceptual design into practical database design arena Crow’s Foot –Cannot detail all cardinalities Rein85 –Similar to Crow’s Foot –Operates at higher level of abstraction IDEF1X –Derivative of ICAM studies in the late 1970’s –Uses fewer symbols

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 51 Comparison of E-R Modeling Symbols Figure 3.36

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 52

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 53

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 54

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 55

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 56 Developing an E-R Diagram Iterative Process –Step1: General narrative of organizational operations developed –Step2: Basic E-R Model graphically depicted and reviewed –Step3: Modifications made to incorporate newly discovered E-R components Repeat process until designers and users agree E-R Diagram complete

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 57

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 58

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 59 First ERD Segment Established Figure 3.43

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 60 Second and Third ERD Segments Established Figures 3.44 & 3.45

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 61 Fourth and Fifth ERD Segments Established Figures 3.46 & 3.47

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 62 Sixth and Seventh ERD Segments Established Figures 3.48 & 3.49

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 63 Eighth ERD Segment Established Figures 3.50

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 64 Ninth ERD Segment Established Figures 3.51

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 65 Components of E-R Model Table 3.2

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 66 Completed ERD Figure 3.52

3 Database Systems: Design, Implementation, & Management, 5 th Edition, Rob & Coronel 67 Challenge of Database Design: Conflicting Goals Database must be designed to conform to design standards High-speed processing may require design compromises Quest for timely information may be the focus of database design Other concerns –Security –Performance –Shared access –Integrity