Chapter Five Data Modeling with the Entity-Relationship Model.

Slides:



Advertisements
Similar presentations
Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques
Advertisements

Data Modeling and the Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
Entity Relationship (ER) Modeling
Database Processing: Fundamentals, Design, and Implementation, 9/e by David M. KroenkeChapter 5/1 Copyright © 2004 Please……. No Food Or Drink in the class.
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.
IT420: Database Management and Organization
Entity-Relationship Model
Entity-Relationship (E-R) modeling: constructing a conceptual schema (Chapter 5) Due to course constraints I have to defer other modeling issues (normalization.
Data Modeling and the Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 3 The Entity- Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 8.
System Analysis - Data Modeling
Fundamentals, Design, and Implementation, 9/e Chapter 5 Database Design.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke Database Processing Tenth Edition Chapter 5 Data.
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 3 The Entity- Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 8.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
Fundamentals, Design, and Implementation, 9/e COS 346 Day 2.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 5 th Edition.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Entity-Relationship Model
Chapter Five Data Modeling with the Entity-Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 7.
CSCI 242 Relational Data Modeling Copyright 2011, David C. Roberts, all rights reserved.
Modern Systems Analysis and Design Third Edition
Ch5: ER Diagrams - Part 2 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the Entity-Relationship.
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.
Chapter 7 Data Modeling with Entity Relationship Diagrams Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Seventh Edition, Rob and Coronel.
Chapter 5 Entity–Relationship Modeling
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Copyright (c) 2014 Pearson Education, Inc. Introduction to Databases.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Component 4: Introduction to Information and Computer Science Unit 6: Databases and SQL Lecture 2 This material was developed by Oregon Health & Science.
1 5 Modeling Techniques A line manager states, “I know the Chinese say one picture is worth 1,000 words but these diagrams, there are so many that I’d.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-1 David M. Kroenke’s, 10 th ed. Chapter.
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 
Data Modeling IST210 Class Lecture.
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
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)
Component 4/Unit 6b Topic II Relational Databases Keys and relationships Data modeling Database acquisition Database Management System (DBMS) Database.
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.
1 6 Concepts of Database Management, 5 th Edition, Pratt & Adamski Chapter 6 Database Design 2: Design Methodology Spring 2006.
The Entity-Relationship Model, P. I R. Nakatsu. Data Modeling A data model is the relatively simple representation, usually graphic, of the structure.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall, modified by Dr. Lyn Mathis 5-1 David M. Kroenke’s, 10 th ed. Chapter.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Appendix C: E-R Diagrams and The IDEF1X Standard.
Department of Mathematics Computer and Information Science1 CS 351: Database Management Systems Christopher I. G. Lanclos Chapter 4.
CSIS 115 Database Design and Applications for Business
Requirements Become the E-R Data Model
Database Design – Lecture 4
IDEF1X Standard IDEF1X (Integrated Definition 1, Extended) was announced as a national standard in 1993 It defines entities, relationships, and attributes.
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 4 Entity Relationship (ER) Modeling
Database Processing: David M. Kroenke’s Chapter Five:
Entity Relationship (ER) Modeling
Presentation transcript:

Chapter Five Data Modeling with the Entity-Relationship Model

The Data Model A data model is a plan, or blueprint, for a database design. It is more generalized & abstract than a database design. It is easier to change a conceptual data model than it is to change an implemented database design. Modeling is not easy You must abstract the important details of an organization.

Entity-Relationship Model The ER model consists of a set of graphical symbols that are used to create conceptual models of databases. There are several versions Original E-R model — Chen (1976). Extended E-R model — Chen model extensions. Information Engineering (IE) — Martin (1990); it uses “crow’s foot” notation. IDEF1X — A national standard developed by the National Institute of Standards and Technology. Unified Modeling Language (UML) — The Object Management Group; it supports object-oriented methodology.

Entities Things that can be identified and that users want to track Entity class — a collection of entities of a given type Entity instance — the occurrence of a particular entity There are usually many instances of an entity in an entity class. Entities translate into database tables.

CUSTOMER: The Entity Class and Two Entity Instances

Attributes Attributes are an entity’s characteristics. All entity instances of a given entity class have the same attributes, but vary in the values of those attributes. Shown in Chen data models as ellipses. In crow’s foot model, they’re listed within a rectangular form.

EMPLOYEE: Attributes in Chen

EMPLOYEE: Attributes in Crow’s Foot

Identifiers Identifiers are attributes that uniquely identify entity instances. May be simple or composite. Identifiers in data models become keys in database implementations: Entities have identifiers. Tables (or relations) have keys. We often use the terms interchangeably.

Relationships Entities are associated with one another in relationships: Relationship classes: associations among entity classes Relationship instances: associations among entity instances A relationship class can involve two or more entity classes. If two, it’s binary If three, it’s ternary

Binary Relationship

Ternary Relationship PRESCRIPTION DOCTOR MEDICINE PATIENT

Relationship Cardinality The maximum cardinality is the maximum number of entity instances that can participate in a relationship. The minimum cardinality is the minimum number of entity instances that must participate in a relationship.

Maximum Cardinality Maximum cardinality is the maximum number of entity instances that can participate in a relationship. Three categories: One-to-One [1:1] One-to-Many [1:N] Many-to-Many [N:M]

The Three Types of Maximum Cardinality

Minimum Cardinality Minimum cardinality is the minimum number of entity instances that must participate in a relationship. Minimums are generally stated as either 0 or 1: If 0, participation in the relationship by the entity is optional Ie, no entity instance must participate in the relationship. If 1, participation in the relationship by the entity is mandatory Ie, at least one entity instance must participate in the relationship.

The Three Types of Minimum Cardinality

Data Modeling Notation

Data Modeling Notation: ERwin

Data Modeling Notation: N:M and O-M Note that: (1) ERwin cannot indicate true minimum cardinalities on N:M relationships (2) Visio introduces the intersection table instead of using a true N:M model

ID-Dependent Entities An ID-dependent entity is an entity whose identifier includes the identifier of another entity. The ID-dependent entity is a logical extension of the independent entity: BUILDING : APARTMENT PAINTING : PRINT The minimum cardinality from the ID-dependent entity is always one.

ID-Dependent Entities A solid line indicates an identifying relationship

Weak Entities A weak entity is an entity whose existence depends upon another entity. All ID-Dependent entities are weak. But not all weak entities are ID-Dependent. The identifier of the parent does not appear in the identifier of the weak child entity.

Weak Entities (Continued) Weak entities must be indicated by an accompanying text box in Erwin – There is no specific notation for a nonidentifying but weak entity relationship A dashed line indicates a nonidentifying relationship

ID-Dependent and Weak Entities

Subtype Entities A subtype entity is a special case of a supertype entity: STUDENT : UNDERGRADUATE or GRADUATE The supertype contains all common attributes, while the subtypes contain specific attributes. The supertype may have a discriminator attribute that indicates the subtype.

Subtypes with a Discriminator

Subtypes: Exclusive or Inclusive If subtypes are exclusive, one supertype relates to at most one subtype. If subtypes are inclusive, one supertype can relate to one or more subtypes.

Subtypes: Exclusive or Inclusive (Continued)

Subtypes: IS-A relationships Relationships connecting supertypes and subtypes are called IS-A relationships, because a subtype IS A supertype. The identifer of the supertype and all of its subtypes must be identical, i.e., the identifier of the supertype becomes the identifier of the related subtype(s). Subtypes are used to avoid value-inappropriate nulls.

ERwin Symbol Summary

ERwin Symbol Summary (Continued)

David M. Kroenke’s Database Processing Fundamentals, Design, and Implementation (10th Edition) End of Presentation: Chapter Five Part One