Unit 3: Entity-Relationship Modeling

Slides:



Advertisements
Similar presentations
Developing ER-Diagram
Advertisements

Entity-Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 3 Data Modeling Copyright © 2014 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent.
Ch5: ER Diagrams - Part 1 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Text-Book Chapters (7 and 8) Entity-Relationship Model
Chapter 4: Enhanced Entity-Relationship (EER) Modeling
System Analysis - Data Modeling
Copyright © 2007 Ramez Elmasri and Shamkant B. Navathe Slide 4- 1.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 8 The Enhanced Entity- Relationship (EER) Model.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Conceptual Data Modeling Using Entities and Relationships.
Entity-Relationship Model and Diagrams (continued)
ENTITY RELATIONSHIP DATA MODEL ELIZABETH GEORGE. INTRODUCTION Architect Aeronautical engineers Computer architects Traffic engineers.
Chapter 8 Structuring System Data Requirements
1 Data Modelling Which data to include in the database.
Class Number – CS 304 Class Name - DBMS Instructor – Sanjay Madria Instructor – Sanjay Madria Lesson Title – ER Model.
Modern Systems Analysis and Design Third Edition
Chapter 4 The Enhanced Entity-Relationship (EER) Model
Database Design & ER Diagrams
Entity-Relationship Design
Chapter 41 Enhanced Entity-Relationship and Object Modeling.
Entity Relationship Modeling Objectives: To illustrate how relationships between entities are defined and refined. To know how relationships are incorporated.
1 Web-Enabled Decision Support Systems Entity-Relationship Modeling Prof. Name Position (123) University Name.
CSE314 Database Systems Data Modeling Using the Entity- Relationship (ER) Model Doç. Dr. Mehmet Göktürk src: Elmasri & Navanthe 6E Pearson Ed Slide Set.
the Entity-Relationship Model
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.
Entities and Attributes
1 Data Modeling : ER Model Lecture Why We Model  We build models of complex systems because we cannot comprehend any such system in its entirety.
Database. Basic Definitions Database: A collection of related data. Database Management System (DBMS): A software package/ system to facilitate the creation.
Phase 2: Systems Analysis
Database Systems: Design, Implementation, and Management Ninth Edition
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Chapter 10 – Database Creation1 IT238: Data Modeling and Database Design Unit 6: Database Creation Instructor: Qing Yan, M.D., Ph.D.
Unit 5: Normal Forms Based on Functional Dependencies
Database Systems: Enhanced Entity-Relationship Modeling Dr. Taysir Hassan Abdel Hamid.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
Data modeling using the entity-relationship model Chapter 3 Objectives How entities, tuples, attributes and relationships among entities are represented.
IT 21103/41103 System Analysis & Design. Chapter 04 Data Modeling.
UNIT_2 1 DATABASE MANAGEMENT SYSTEM[DBMS] [Unit: 2] Prepared By Lavlesh Pandit SPCE MCA, Visnagar.
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
Enhanced Entity-Relationship (EER) Modeling. Slide 4- 2 Chapter Outline EER stands for Enhanced ER or Extended ER EER Model Concepts Includes all modeling.
Data Modelling Using Entity-Relationship (ER) Model
IS6125 Database Analysis and Design Lecture 4: Conceptual Data Modelling 2: ER Modelling and Beyond the Presentation Layer Rob Gleasure
IS6145 Database Analysis and Design Lecture 4: Fine-Granular Design-Specific ER Modelling Rob Gleasure
Information Access Mgt09/12/971 Entity-Relationship Design Information Level Design.
DatabaseIM ISU1 Fundamentals of Database Systems Chapter 3 Data Modeling Using Entity-Relationship Model.
Chapter 4 Extended Entity-Relationship (EER)Model Incorporates Set-subset Relationships Incorporates Generalization Hierarchies Constraints: Coverage Constraints:
IS6145 Database Analysis and Design Lecture 5: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
Copyright © 2011 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 7 Data Modeling Using the Entity- Relationship (ER) Model.
CSE 412/598 DATABASE MANAGEMENT COURSE NOTES 3. ENTITY-RELATIONSHIP CONCEPTUAL MODELING Department of Computer Science & Engineering Arizona State University.
Enhanced Entity-Relationship and UML Modeling. 2.
Copyright © 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Slide 4- 1.
Lecture # 14 Chapter # 5 The Relational Data Model and Relational Database Constraints Database Systems.
Chapter 11 – Data Manipulation: Relational Algebra and SQL1 Unit 9: Data Manipulation: Relational Algebra and SQL IT238: Data Modeling and Database Design.
Data Modeling Using the Entity- Relationship (ER) Model
Databases (CS507) CHAPTER 7.
IS6125 Database Analysis and Design Lecture 7: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
Enhanced Entity-Relationship (EER) Model
Enhanced Entity-Relationship and Object Modeling Objectives
Conceptual Design & ERD Modelling
IS6125 Database Analysis and Design Lecture 5: Conceptual Data Modelling 2: ER Modelling and Beyond the Presentation Layer Rob Gleasure
IS6145 Database Analysis and Design Lecture 5: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
IS6145 Database Analysis and Design Lecture 5: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
IS6145 Database Analysis and Design Lecture 3: Conceptual Data Modelling 2: ER Modelling and Beyond the Presentation Layer Rob Gleasure
IS6125 Database Analysis and Design Lecture 7: Enhanced Entity-Relationship (EER) Modeling Rob Gleasure
CHAPTER 2 - Database Requirements and ER Modeling
Chapter 7: Entity-Relationship Model
Presentation transcript:

Unit 3: Entity-Relationship Modeling IT238: Data Modeling and Database Design Unit 3: Entity-Relationship Modeling Instructor: Qing Yan, M.D., Ph.D.

Unit 3 Objectives Demonstrate how to develop a Presentation Layer ER model Demonstrate how to progress from the Presentation layer to the Design-specific ER Model Chapter 1 – Database Systems: Architecture and Components

Unit 3 To-Do List Complete the reading Textbook and Web Participate in the discussion board 30 points Attend the introductory seminar or complete FLA quiz 20 points Complete the unit assignment 50 points Chapter 1 – Database Systems: Architecture and Components

Assignment rubric 1. specified unique identifiers 10 2. specified relationship types that exist among various entity types 20 3. captured business rules within ERD 15 4. list semantic integrity constraints where business rule could not be captured in the ERD 5 Total (Sum of all points) 50 Chapter 3 – Entity-Relationship Modeling

The storyline The factory has several departments. A department may have many employees, but at least three. Every employee works for one and only one department. Every department has a manager – only one manager per department. Clearly, a manager is an employee of the company; but, all employees are not managers. Chapter 3 – Entity-Relationship Modeling

The storyline A department may have many machines, and every machine is assigned to a specific department. A machine may go for maintenance numerous times. Maintenance is done on a machine only once on a given day. Some machines are so new that they may not have gone for maintenance yet. Chapter 3 – Entity-Relationship Modeling

The storyline Products are produced on machines. A product can be an assembly of several different components or a single piece. Every product/component goes through one or more machines for appropriate production operations. Likewise, several products may go through a particular machine for some standard process. Chapter 3 – Entity-Relationship Modeling

The storyline Designers design the products. Some well qualified designers may design more than one product. All designers are employees of the factory. Operators, who are also employees of the factory, operate these machines. Due to multiple shifts, several operators operate the same machine. All operators are routinely assigned to work on only one machine and no operator is kept idle. A machine is never kept idle either, except when it is out for maintenance. Chapter 3 – Entity-Relationship Modeling

The requirements The database should capture an employee’s name, which would include first name, last name, and middle initial. It must also capture gender, address, and salary. An employee’s salary cannot exceed his/her manager’s salary. Social Security number (SSN) uniquely identifies an employee. Likewise, department number, department name, type, and location, must be captured. The department number and department name are both unique identifiers of a department. Chapter 3 – Entity-Relationship Modeling

The requirements Every machine will have a unique machine number. It will also consist of other details like name of machine, type, and vendor’s name. When a machine goes for maintenance, maintenance date for that machine needs to be captured. A product is identified by its component ID. Component name and description must also be recorded. It should be possible to compute the number of components in a product. Chapter 3 – Entity-Relationship Modeling

The requirements When a component goes through machining, the starting time, completion time, and hours of machining for each product on every machine must be captured. The information about a designer includes his/her qualification, specialization field, and experience in years. Operators, who are responsible for operating the machines, belong to a labor union and have certain skill sets associated with them. Chapter 3 – Entity-Relationship Modeling

Notation for drawing the ER diagram Figure 3.2 Summary of Presentation Layer ER diagram notation From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Notation (continued) Figure 3.2 Summary of Presentation Layer ER diagram notation (continued) From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Key Concepts Entity-relationship (ER) diagram (ERD) The part of an ER model that portrays entity types, attributes for each entity types, and relationships among the entity types.  Presentation Layer ER model/schema An entity-relationship modeling tool that serves as a communications device between the analyst and the end-user community; consists of a Presentation Layer ER diagram and semantic integrity constraints   Chapter 1 – Database Systems: Architecture and Components

Key Concepts Synthesis approach A bottom-up approach for developing an ER diagram where attributes are grouped into entity types based on apparent commonalities among the attributes.   Analysis approach A top-down approach for developing an ER diagram that begins by identifying entity types and then focuses on gathering attributes that appear to belong to individual entity types. Chapter 3 – Entity-Relationship Modeling

Vocabulary Exclusive arc-Indicates that two or more relationship types are mandatorily exclusive Inclusive arc-Indicates that two or more relationship types are mandatorily inclusive Noninclusive arc-Indicates that two or more relationship types are optionally inclusive Chapter 3 – Entity-Relationship Modeling

Vocabulary Restrict rule-A deletion rule where the deletion of a parent entity in a relationship is restricted if all child entities related to the parent in the relationship should not be deleted. Cascade rule-A deletion rule where the deletion of a parent entity in a relationship also causes all child entities related to the parent in the relationship to be deleted. Chapter 3 – Entity-Relationship Modeling

Vocabulary Superclass (SC)-A generic class of entity that includes one or more entity type occurrences. Subclass (sc)-An entity type that is a member of a superclass. Chapter 3 – Entity-Relationship Modeling

Vocabulary Generalization-A process that crystallizes the common properties (attributes) shared by a set of entity types into a generic entity type (SC). Defining attribute-The attribute in the superclass used to define the predicate in an attribute defined specialization. Chapter 3 – Entity-Relationship Modeling

Vocabulary Aggregation-A construct that allows modeling a “whole/part” association as an “Is-a-part-of” relationship between a superclass and a subclass. Chapter 3 – Entity-Relationship Modeling

Application of ER Modeling Grammar to the Conceptual Modeling Process The ER model for conceptual modeling serves two major purposes As a communication/presentation device used by an analyst to interact with the end-user community (i.e., the Presentation Layer ER Model/Schema) As a design tool at the highest level of abstraction to convey a deeper level of understanding to the database designer (i.e., the Design-Specific ER Model/Schema) From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

The ER Model The ER model includes: An ER diagram (ERD) portraying entity types, attributes for each entity type, and relationships among entity types Semantic integrity constraints that reflect the business rules about data not captured in the ER diagram. From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

The ER Model (continued) From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Notation Figure 3.2 Summary of Presentation Layer ER diagram notation From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Notation (continued) Figure 3.2 Summary of Presentation Layer ER diagram notation (continued) From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Presentation Layer ER Model (An End-User Communication/Presentation Device) Not a Science ! Art? Engineering? - Artistic engineering or Engineered art ! Heuristic (Intuitive), iterative process Recursive incremental refinement Target Audience: End-user community Technology-independent From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

The Synthesis Approach to Generate an Initial Set of Entity Types and Attributes List all discernable data elements and treat them as attributes Group these attributes based on apparent commonalities Designate each cluster of attributes as an entity type Review leftover data elements and investigate the possibility that some of them serve as links among the entity types previously identified Designate these links as relationship types From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

The Analysis Approach to Generate an Initial Set of Entity Types and Attributes Begin by searching for things that can be labeled by singular nouns and call these things entity types Gather properties that appear to belong to individual entity types and label them as attributes of a particular entity type Be sensitive throughout the process to the identification of relationships among the various entity types From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Bearcat, Incorporated Initial Set of Entity Types Read through the vignette on pages 75-77 Identify entity types Plant - Company ? Project - Manager ? Employee - Supervisor ? Dependent Credit Union Account Hobby From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Bearcat, Incorporated Revised Set of Entity Types Read through the vignette on pages 75-77 Identify entity types Plant - Company x Project - Manager x Employee - Supervisor x Dependent Credit Union Account Hobby From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Development of Presentation Layer ER Model Divide story into meaningful “chunks” and identify relationship(s) among entity types Version 0 of ER diagram results: a punctuated equilibrium Go back and read the story (strike out story lines already captured if need be) and refine entity types and relationship types of the ER diagram based on additional facts discerned From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Development of Presentation Layer ER Model Gather business rules that can’t be captured in the ERD into a list of Semantic Integrity Constraints, a supplement to the ERD Repeat last two steps (as many times as necessary) until all aspects of the story (i.e., the business rules) have been accounted for in the ER model From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Development of Presentation Layer ER Model (continued) Note: The relationship shown models the italicized text From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Development of Presentation Layer ER Model (continued) From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Presentation Layer ER Diagram From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Presentation Layer Semantic Integrity Constraints Semantic integrity constraints are grouped into the following categories: Attribute level business rules Entity level business rules Business rules governing entity deletion Miscellaneous business rules From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Design-Specific ER Model (Technology-Independent Design Tool) Not a Science ! Art? Engineering? Not an Art anymore; more of an Engineering Systematic process Target Audience: Database Designer/Administrator Coarse granularity Fine granularity From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Coarse-granular Design-Specific ER Model Tasks Collect additional attribute characteristics relevant to design/implementation (e.g., data type, size) and prepare an updated list of Semantic Integrity Constraints Introduce a technically more precise notation, viz., (min, max) notation, for expressing the structural constraints of a relationship type Map deletion rules to the ER diagram From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Deletion Constraints Restrict Rule (R): If a parent entity in a relationship is deleted and if all child entities related to this parent in this relationship should not be deleted, then the deletion of the parent should be disallowed Cascade Rule (C): If a parent entity in a relationship is deleted and if all child entities related to this parent in this relationship should also be deleted, the cascade rule applies Note: Conventionally, when a deletion constraint is not specified, the restrict rule is implied by default From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Deletion Constraints (continued) Set Null Rule (N): If a parent entity in a relationship is deleted and if all child entities related to this parent in this relationship should be retained but no longer referenced to this parent, the ‘set null’ rule applies Set Default Rule (D): If a parent entity in a relationship is deleted and if all child entities related to this parent in this relationship should be retained but no longer referenced to this parent but should be referenced to a predefined default parent, the ‘set default’ rule applies From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Fine-granular Design-Specific ER Model Tasks Map the additional attribute characteristics to the ER diagram Decompose ER constructs preparatory to logical model mapping Decomposition of multi-valued attribute Decomposition of m:n cardinality constraint (ratio) Generate an updated list of Semantic Integrity Constraints From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Summary Presentation Layer ER Model Diagram + Integrity Constraints Coarse-Granular ER Model Fine-Granular ER Model From: Umanath, N.S., & Scamell, R. (2007). Data Modeling and Database Design. Boston: Thomson Course Technology. Chapter 3 – Entity-Relationship Modeling

Q & A Questions?