DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke Database Processing Tenth Edition Chapter 5 Data.

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
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.
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.
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.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 2 Introduction to Database Development.
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 2 Introduction to Database Development.
Fundamentals, Design, and Implementation, 9/e Chapter 5 Database Design.
Chapter Five Data Modeling with the Entity-Relationship Model.
© 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.
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.
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.
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.
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.
Component 4/Unit 6b Topic II Relational Databases Keys and relationships Data modeling Database acquisition Database Management System (DBMS) Database.
Concepts of Database Management, Fifth Edition Chapter 6: Database Design 2: Design Methodology.
Chapter 3 The Entity-Relationship Model David M. Kroenke Database Processing © 2000 Prentice Hall.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
Databases Illuminated Chapter 3 The Entity Relationship Model.
AL-MAAREFA COLLEGE FOR SCIENCE AND TECHNOLOGY INFO 232: DATABASE SYSTEMS CHAPTER 4 ENTITY RELATIONSHIP (ER) MODELING Instructor Ms. Arwa Binsaleh 1.
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.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
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.
Copyright © 2014 Pearson Canada Inc. 5-1 Copyright © 2014 Pearson Canada Inc. Application Extension 5a Database Design Part 2: Using Information Technology.
CSIS 115 Database Design and Applications for Business
Requirements Become the E-R Data Model
Database Design – Lecture 4
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
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:

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke Database Processing Tenth Edition Chapter 5 Data Modeling ER Model

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-2 Database Development Approaches Top-down development Prototype Bottom-up development

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-3 Top-down Development General requirements to specific requirements A global perspective

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-4 Systems Development Life Cycle Project Identification and Selection Project Initiation and Planning Analysis Physical Design Implementation Maintenance Logical Design

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-5 Database Development Activities During SDLC 1.Project Id/Selection 2.Initiation/Planning 3.Analysis 4.Logical Design 5.Physical Design 6.Implementation 7.Maintenance 1.Enterprise Data Modeling 2.Conceptual Data Modeling 3.Logical DB Design 4.Physical DB Design 5.DB Implementation 6.Maintenance

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Project ID/Selection Enterprise Modeling Analyze current DP Justify need for new DB

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Project Initiation/Planning & Analysis Conceptual Data Modeling ID scope of DB requirements Analyze overall data requirements Develop preliminary data model

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Logical Design Logical Database Design Detail transactions, applications, views etc required by DB system ID security, backup, concurrency issues Create stable, well-defined structure (normalization)

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Physical Design Physical Database Design Define DB to DBMS Develop DB applications

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Implementation Physical Implementation Load data Install & test DB applications Complete documentation & training

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall Maintenance DB Maintenance Ensure DB meeting needs/reqs Performance tuning Backup/Recovery

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-12 Prototype Development Develop portions of the database and submit to users for feedback, refinement, and enhancement

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-13 ID Problem Develop Prototype Implement Prototype Revise Prototype Prototype Development Convert to Production Prototype Development

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-14 Bottom-up Development Specific requirements to general requirements Typically faster and less risky

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-15 Data Modeling Creation Interviewing users Documenting requirements Building a data model Building a database prototype A process of inference –Working backwards

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-16 The Data Model A data model is a plan, or blueprint, for a database design. A data model defines and graphically depicts the data structure and relationships among the data A data model is more generalized and abstract than a database design.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-17 E-R Model Entity-Relationship model is a set of concepts and graphical symbols that can be used to create conceptual schemas. Versions –Original E-R model — Peter Chen (1976). –Extended E-R model — Extensions to the Chen model. –Information Engineering (IE) — James Martin (1990); it uses “crow’s foot” notation, is easier to understand and we will use it. –IDEF1X — A national standard developed by the National Institute of Standards and Technology [see Appendix B] –Unified Modeling Language (UML) — The Object Management Group; it supports object-oriented methodology [see Appendix C]

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-18 Entities Something that can be identified and the users want to track –Entity class — a collection of entities of a given type –Entity instance — the occurence of a particular entity There are usually many instances of an entity in an entity class.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-19 CUSTOMER: The Entity Class and Two Entity Instances

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-20 Attributes Attributes describe an entity’s characteristics. All entity instances of a given entity class have the same attributes, but vary in the values of those attributes. Originally shown in data models as ellipses. Data modeling products today commonly show attributes in rectangular form.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-21 EMPLOYEE: Attributes in Ellipses

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-22 EMPLOYEE: Attributes in Entity Rectangle

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-23 Identifiers Identifiers are attributes that name, or identify, entity instances. The identifier of an entity instance consists of one or more of the entity’s attributes. Composite identifiers: Identifiers that consist of two or more attributes Identifiers in data models become keys in database designs: –Entities have identifiers. –Tables (or relations) have keys.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-24 Entity Attribute Display in Data Models

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-25 Relationships Entities can be associated with one another in relationships: –Relationship classes: associations among entity classes –Relationship instances: associations among entity instances In the original E-R model, relationships could have attributes but today this is no longer done. –Really an issue of semantics A relationship class can involve two or more entity classes.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-26 Degree of the Relationship The degree of the relationship is the number of entity classes in the relationship: –Two entities have a binary relationship of degree two. –Three entities have a ternary relationship of degree three.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-27 Binary Relationship

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-28 Ternary Relationship

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-29 Entities and Tables The principle difference between an entity and a table (relation) is that you can express a relationship between entities without using foreign keys. This makes it easier to work with entities in the early design process where the very existence of entities and the relationships between them is uncertain.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-30 Cardinality Cardinality means “count,” and is expressed as a number. Maximum cardinality is the maximum number of entity instances that can participate in a relationship. Minimum cardinality is the minimum number of entity instances that must participate in a relationship.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-31 Maximum Cardinality Maximum cardinality is the maximum number of entity instances that can participate in a relationship. There are three types of maximum cardinality: –One-to-One [1:1] –One-to-Many [1:N] –Many-to-Many [N:M]

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-32 The Three Types of Maximum Cardinality

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-33 Parent and Child Entities In a one-to-many relationship: –The entity on the one side of the relationship is called the parent entity or just the parent. –The entity on the many side of the relationship is called the child entity or just the child. In the figure below, EMPLOYEE is the parent and COMPUTER is the child:

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-34 HAS-A Relationships The relationships we have been discussing are known as HAS-A relationships: –Each entity instance has a relationship with another entity instance: An EMPLOYEE has one or more COMPUTERs. A COMPUTER has an assigned EMPLOYEE.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-35 Minimum Cardinality Minimum cardinality is the minimum number of entity instances that must participate in a relationship. Minimums are generally stated as either zero or one: –IF zero [0] THEN participation in the relationship by the entity is optional, and no entity instance must participate in the relationship. –IF one [1] THEN participation in the relationship by the entity is mandatory, and at least one entity instance must participate in the relationship.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-36 Indicating Minimum Cardinality As shown in the examples in a following slide: –Minimum cardinality of zero [0] indicating optional participation is indicated by placing an oval next to the optional entity. –Minimum cardinality of one [1] indicating mandatory (required) participation is indicated by placing a vertical hash mark next to the required entity.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-37 Reading Minimum Cardinality Look toward the entity in question: –IF you see an oval THEN that entity is optional (minimum cardinality of zero [0]). –IF you see a vertical hash mark THEN that entity is mandatory (required) (minimum cardinality of one [1]).

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-38 The Three Types of Minimum Cardinality

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-39 ID-Dependent Entities An ID-dependent entity is an entity (child) whose identifier includes the identifier of another entity (parent). The ID-dependent entity is a logical extension or sub-unit of the parent: –BUILDING : APARTMENT –PAINTING : PRINT The minimum cardinality from the ID-dependent entity to the parent is always one.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-40 ID-Dependent Entities A solid line indicates an identifying relationship

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-41 Weak Entities A weak entity is an entity whose existence depends upon another entity. All ID-Dependent entities are considered weak. Weak entities not necessarily ID- Dependent. –The identifier of the parent does not appear in the identifier of the weak child entity.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-42 Weak Entities (Continued) A dashed line indicates a nonidentifying relationship Weak entities must be indicated by an accompanying text box in Erwin – There is no specific notation for a nonidentifying but weak entity relationship

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-43 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.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-44 Subtypes with a Discriminator

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-45 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.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-46 Subtypes: Exclusive or Inclusive (Continued)

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-47 Subtypes: IS-A relationships Relationships connecting supertypes and subtypes are called IS-A relationships, because a subtype IS A supertype. The identifier 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.

DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-48 Unified Modeling Language (UML) The Unified Modeling Language is a set of structures and techniques for modeling and designing object-oriented programs (OOP). A primary difference between UML and E-R diagrams is that UML includes information about object constraints and methods. Conversion between E-R and UML – Figure C-1(b) in Appendix C has a mistake