Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.

Slides:



Advertisements
Similar presentations
Data Modeling and the Entity-Relationship Model
Advertisements

Data Modeling and the Entity-Relationship Model
Database Lecture Notes Mapping ER Diagrams to Tables 2 Dr. Meg Murray
(wrapping up from last week)
Data Modeling and the Entity-Relationship Model
Database Design Chapter Five DATABASE CONCEPTS, 6th Edition
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
IT420: Database Management and Organization
Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
Data Modeling and 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.
© 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.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke Database Processing Tenth Edition Chapter 5 Data.
Chapter Five Data Modeling with the Entity-Relationship Model.
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 6-1 David M. Kroenke’s Chapter Six: Transforming Data Models into Database.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
Data Modeling Entity - Relationship Models. Models Used to represent unstructured problems A model is a representation of reality Logical models  show.
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.
Database Design Chapter Five DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 7 th Edition.
Database Design Chapter Five 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.
Chapter 4 Entity-Relationship modeling Transparencies © Pearson Education Limited 1995, 2005.
Chapter 3 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Importance of data modeling Importance of data modeling Write good.
Data Modeling and Entity- Relationship Model I IST2101.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
Entity-Relationship modeling Transparencies
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 © Prentice Hall, 2002 CMIS564: E/R Modeling Dr. Bordoloi Based on Chapter 3; Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott,
1 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
3.1 CSIS 3310 Chapter 3 The Entity-Relationship Model Conceptual Data Modeling.
Chapter 7 Data Modeling with Entity Relationship Diagrams Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 5-1 Chapter Objectives Learn how to transform E-R data models into relational.
Chapter 5 Entity–Relationship Modeling
Entity Relationship Diagrams Objectives s Learn the Elements of the E-R model (entities, attributes, and relationships) s Show how to apply the E-R model.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
+ Data Modeling (wrapping up from last week). + Homework Review Exercise 4.32 – Develop a data model of a genealogical diagram. Model only biological.
© Pearson Education Limited, Chapter 7 Entity-Relationship modeling Transparencies.
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.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
Database Design Chapter Five DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 4 ENTITY RELATIONSHIP (ER) MODELING Instructor Ms. Arwa Binsaleh 1.
Chapter 4 The Semantic Object Model David M. Kroenke Database Processing © 2000 Prentice Hall.
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 H: The Semantic Object Model.
Data Modeling and Entity-Relationship Model I
Chapter 10 Structuring System Requirements: Conceptual Data Modeling
Data Modeling and the Entity-Relationship Model
CSIS 115 Database Design and Applications for Business
Database Design Chapter Five DATABASE CONCEPTS, 4th Edition
Requirements Become the E-R Data Model
Chapter 7 Structuring System Requirements: Conceptual Data Modeling
Data Modeling and the Entity-Relationship Model
Database Processing: David M. Kroenke’s Chapter Six:
Chapter 1: The Database Environment
Chapter 3: Modeling Data in the Organization
Database Processing: David M. Kroenke’s Chapter Five:
Data Modeling and the Entity-Relationship Model
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Presentation transcript:

Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-2 Chapter Objectives Learn the basic stages of database development Understand the purpose and role of a data model Know the principal components of the E-R data model Understand how to interpret traditional E-R diagrams Learn to construct E-R diagrams Know how to represent 1:1, 1:N, N:M, and binary relationships with the E-R model

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-3 Chapter Objectives (Continued) Understand weak entities and know how to use them Know how to represent subtype entities with the E-R model Know how to represent recursive relationships with the E-R model Learn how to create an E-R diagram from source documents

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-4 Four Stages of Database Development Requirements Stage Design Stage Implementation Stage Maintenance

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-5 The Requirements Stage Sources of requirements –User Interviews –Forms –Reports –Queries –Use Cases –Business Rules

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-6 Requirements Become the E-R Data Model After the requirements have been gathered, they are transformed into an Entity Relationship (E-R) Data Model E-R Models consist of –Entities –Attributes –Identifiers –Relationships

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-7 Entity Class versus Entity Instance An entity class is a description of the structure and format of the occurrences of the entity An entity instance of a specific occurrence of an entity class

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-8 Entity Class and Entity Instance

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-9 Attributes Entities have attributes that describe the entity’s characteristics –ProjectName –StartDate –ProjectType –ProjectDescription Attributes have a data type and properties

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-10 Identifiers Entity instances have identifiers (keys) An identifier will identify a particular instance in the entity class –SocialSecurityNumber –StudentID –EmployeeID

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-11 Identifier Types Uniqueness –Identifiers may be unique or nonunique –If the identifier is unique, the data value for the identifier must be unique for all instances Composite –A composite identifier consists of 2 or more attributes E.g., OrderNumber & LineItemNumber are both required

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-12 Level of Entity Attribute Display

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-13 Relationships Entities can be associated with one another in relationships Relationship degree defines the number of entity classes participating in the relationship –Degree 2 is a binary relationship –Degree 3 is a ternary relationship

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-14 Degree 2 Relationship: Binary

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-15 Degree 3 Relationship: Ternary

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-16 One-to-One Binary Relationship 1:1 (one-to-one) –A single entity instance in one entity class is related to a single entity instance in another entity class An employee may have no more than one locker; and A locker may only be accessible by one employee

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-17 One-to-Many Binary Relationship 1:N (one-to-many) –A single entity instance in one entity class is related to many entity instances in another entity class An quotation is associated with only one item; and An item may have several quotations

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-18 Many-to-Many Binary Relationship N:M (many-to-many) –Many entity instances in one entity class is related to many entity instances in another entity class An supplier may supply several items; and A particular item may be supplied by several suppliers

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-19 Maximum Cardinality Relationships are named and classified by their cardinality, which is a word that means count Each of the three types of binary relationships shown above have different maximum cardinalities maximum cardinality is the maximum number of entity instances that may participate in a relationship instance— one, many or other some fixed number

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-20 Minimum Cardinality Minimum cardinality is the minimum number of entity instances that must participate in a relationship instance. These values typically assume a value of zero (optional) or one (mandatory)

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-21 Cardinality Example Maximum cardinality is many for both ITEM and SUPPLIER Minimum cardinality is zero (optional) for ITEM and one (mandatory) SUPPLIER –An SUPPLIER does not have to supply an ITEM –An ITEM must have a SUPPLIER

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-22 Entity-Relationship Diagrams The diagrams in previous slides are called entity-relationship diagrams –Entity classes are shown by rectangles –Relationships are shown by diamonds –The maximum cardinality of the relationship is shown inside the diamond –The minimum cardinality is shown by the oval or hash mark next to the entity –The name of the entity is shown inside the rectangle –The name of the relationship is shown near the diamond.

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-23 Weak Entity A weak entity is an entity that cannot exist in the database without the existence on another entity Any entity that is not a weak entity is called a strong entity.

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-24 Subtype Entities A subtype entity is a special case of another entity called its supertype. An attribute of the supertype may be included which indicates which of the subtypes is appropriate for a given instance—This attribute is called a discriminator. Subtypes can be exclusive or inclusive. – If exclusive, the supertype relates to at most one subtype. – If inclusive, the supertype can relate to one or more subtypes.

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-25 Subtype Entity Identifiers The relationships that connect supertypes and subtypes are called IS-A relationships because a subtype is the same entity as the supertype The identifier of a supertype and all of its subtypes is the same attribute

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-26 Subtype Entity Examples

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-27 Recursive Relationships It is possible for an entity to have a relationship to itself—this is called a recursive relationship

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-28 Developing an E-R Diagram Heather Sweeney Designs will be used as on ongoing example throughout Chapters 4, 5, 6 and 7. –Heather Sweeney is an interior designer who specializes in home kitchen design –She offers a variety of free seminars at home shows, kitchen and appliance stores, and other public locations –She earns revenue by selling books and videos that instruct people on kitchen design –She also offers custom-design consulting services

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-29 Heather Sweeney Designs: The Seminar Customer List

KROENKE and AUER - DATABASE CONCEPTS (3 rd Edition) © 2008 Pearson Prentice Hall 4-30 Heather Sweeney Designs: Business Rules and Model Validation Business rules may constrain the model and need to be recorded –Heather Sweeney Designs has a business rule that no more than one form letter or per day is to be sent to a customer After the data model has been completed, it needs to be validated –Prototyping is commonly used to validate forms and reports

Data Modeling and the Entity-Relationship Model End of Presentation on Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition