Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques

Slides:



Advertisements
Similar presentations
Entity Relationship (ER) Modeling
Advertisements

Entity Relationship (E-R) Modeling
1
Chapter 9 Structuring System Data Requirements
Chapter 7 System Models.
Copyright © 2003 Pearson Education, Inc. Slide 1 Computer Systems Organization & Architecture Chapters 8-12 John D. Carpinelli.
Copyright © 2011, Elsevier Inc. All rights reserved. Chapter 6 Author: Julia Richards and R. Scott Hawley.
Author: Julia Richards and R. Scott Hawley
David Burdett May 11, 2004 Package Binding for WS CDL.
1 RA I Sub-Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Casablanca, Morocco, 20 – 22 December 2005 Status of observing programmes in RA I.
Custom Statutory Programs Chapter 3. Customary Statutory Programs and Titles 3-2 Objectives Add Local Statutory Programs Create Customer Application For.
Conceptual / semantic modelling
Programming Language Concepts
Week 2 The Object-Oriented Approach to Requirements
Turing Machines.
PP Test Review Sections 6-1 to 6-6
Database Design Process
Bellwork Do the following problem on a ½ sheet of paper and turn in.
Exarte Bezoek aan de Mediacampus Bachelor in de grafische en digitale media April 2014.
Copyright © 2012, Elsevier Inc. All rights Reserved. 1 Chapter 7 Modeling Structure with Blocks.
1 RA III - Regional Training Seminar on CLIMAT&CLIMAT TEMP Reporting Buenos Aires, Argentina, 25 – 27 October 2006 Status of observing programmes in RA.
Basel-ICU-Journal Challenge18/20/ Basel-ICU-Journal Challenge8/20/2014.
1..
the Entity-Relationship (ER) Model
CONTROL VISION Set-up. Step 1 Step 2 Step 3 Step 5 Step 4.
Adding Up In Chunks.
Lecture plan Outline of DB design process Entity-relationship model
Chapter 6: ER – Entity Relationship Diagram
1 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt 10 pt 15 pt 20 pt 25 pt 5 pt Synthetic.
Analyzing Genes and Genomes
©Brooks/Cole, 2001 Chapter 12 Derived Types-- Enumerated, Structure and Union.
McGraw-Hill/Irwin Copyright © 2007 by The McGraw-Hill Companies, Inc. All rights reserved. Chapter 12 View Design and Integration.
Essential Cell Biology
Intracellular Compartments and Transport
PSSA Preparation.
Essential Cell Biology
14 Databases Foundations of Computer Science ã Cengage Learning.
Immunobiology: The Immune System in Health & Disease Sixth Edition
Physics for Scientists & Engineers, 3rd Edition
Energy Generation in Mitochondria and Chlorplasts
1 Decidability continued…. 2 Theorem: For a recursively enumerable language it is undecidable to determine whether is finite Proof: We will reduce the.
© Copyright 2011 John Wiley & Sons, Inc.
Enhanced/Extended Relationship-Diagram
Data Modeling and the Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
IT420: Database Management and Organization
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 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.
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 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.
Entity-Relationship Model
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 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
Database Processing: Fundamentals, Design and Implementation, 9/e by David M. KroenkeChapter 2/1 Copyright © 2004 Please……. No Food Or Drink in the class.
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.
Fundamentals, Design, and Implementation, 9/e Appendix B The Semantic Object Model.
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.
BBY 464 Semantic Information Management (Spring 2016) Data and Metadata Management Yaşar Tonta & Orçun Madran [yasartonta, Hacettepe.
Requirements Become the E-R Data Model
IDEF1X Standard IDEF1X (Integrated Definition 1, Extended) was announced as a national standard in 1993 It defines entities, relationships, and attributes.
Chapter 4 Entity Relationship (ER) Modeling
Database Processing: David M. Kroenke’s Chapter Five:
Data Modeling and the Entity-Relationship Model
Presentation transcript:

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques

Three Schema Model ANSI/SPARC introduced the three schema model in 1975 It provides a framework describing the role and purpose of data modeling Copyright © 2004

Three Schema Model (cont.) External schema or user view Representation of how users view the database Conceptual schema A logical view of the database containing a description of all the data and relationships Independent of any particular means of storing the data One conceptual schema usually contains many different external schemas Internal schema A representation of a conceptual schema as physically stored on a particular product A conceptual schema can be represented by many different internal schemas Copyright © 2004

E-R Model Entity-Relationship model is a set of concepts and graphical symbols that can be used to create conceptual schemas Four versions Original E-R model by Peter Chen (1976) Extended E-R model: the most widely used model Information Engineering (IE) by James Martin (1990) IDEF1X national standard by the National Institute of Standards and Technology Unified Modeling Language (UML) supporting object-oriented methodology Copyright © 2004

The Extended E-R Model Copyright © 2004

Example: E-R Diagram Copyright © 2004

Entities Something that can be identified and the users want to track Entity class is a collection of entities described by the entity format in that class Entity instance is the representation of a particular entity There are usually many instances of an entity in an entity class Copyright © 2004

Example: Entity Copyright © 2004

Attributes Description of the entity’s characteristics All instances of a given entity class have the same attributes Composite attribute: attribute consisting of the group of attributes Multi-value attributes: attribute with more than one possible value Copyright © 2004

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 An identifier may be either unique or non-unique Unique identifier: the value identifies one and only one entity instance Non-unique identifier: the value identifies a set of instances Composite identifiers: Identifiers that consist of two or more attributes Copyright © 2004

Relationships Entities can be associated with one another in relationships Relationship classes: associations among entity classes Relationship instances: associations among entity instances Relationships can have attributes A relationship class can involve many entity classes Degree of the relationship is the number of entity classes in the relationship Copyright © 2004

Example: Degree of the relationship Relationships of degree 2 are very common and are often referred to by the term binary relationships Copyright © 2004

Binary Relationships 1:1 1:N N:M Copyright © 2004

Recursive Relationship Recursive relationships are relationships among entities of a single class Copyright © 2004

Cardinality Maximum cardinality indicates the maximum number of entities that can be involved in a relationship Minimum cardinality indicate that there may or may not be an entity in a relationship Copyright © 2004

Weak Entities Weak entities are those that must logically depend on another entity Weak entities cannot exist in the database unless another type of entity (strong entity) also exists in the database ID-dependent entity: the identifier of one entity includes the identifier of another entity Copyright © 2004

Example: Weak Entities Copyright © 2004

Example: Weak Entities Copyright © 2004

Subtype Entities Subtype entity is an entity that represents a special case of another entity, called supertype Sometimes called an IS-A relationship Entities with an IS-A relationship should have the same identifier Copyright © 2004

Example: Subtype Entities Copyright © 2004

Example: Subtype Entities Copyright © 2004

Example: Subtype Entities Copyright © 2004

IDEF1X Standard IDEF1X (Integrated Definition 1, Extended) was announced as a national standard in 1993 It defines entities, relationships, and attributes in more specific meanings It changed some of the E-R graphical symbols It includes definition of domains, a component not present in the extended E-R model Four Relationship Types Non-Identifying Connection Relationships Identifying Connection Relationships Non-Specific Relationships Categorization Relationships Products supporting IDEF1X: ERWin, Visio, Design/2000 Copyright © 2004

Example: IDEF1X Copyright © 2004

Example: IDEF1X Copyright © 2004

Example: IDEF1X Copyright © 2004

Non-Identifying Connection Relationships Represent relationship with a dashed line from a parent to a child entity Default cardinality is 1:N with a mandatory parent and an optional child 1 indicates exactly one child is required Z indicates zero or one children Copyright © 2004

Non-Identifying Connection Relationships Copyright © 2004

Identifying Connection Relationships Same as ID-dependent relationships in the extended E-R model Parent’s identifier is always part of the child’s identifier Relationship are indicated with solid lines, child entities are shown with rounded corners (ID-dependent entities only) Copyright © 2004

Identifying Connection Relationships Copyright © 2004

Non-Specific Relationships Simply a many-to-many relationship Relationships are shown with a filled-in circle on each end of the solid relationship line Cannot set minimum cardinalities of a non-specific relationship Copyright © 2004

Non-Specific Relationships Copyright © 2004

Categorization Relationships A relationship between a generic entity and another entity called a category entity Called specialization of generalization/subtype relationships (IS-A relationships) in the extended E-R model Within category clusters, category entities are mutually exclusive Two types of category clusters: Complete: every possible type of category for the cluster is shown (denoted by two horizontal lines with a gap in-between) Incomplete: at least one category is missing (denoted by placing the category cluster circle on top of a single line, no gap between horizontal lines) Copyright © 2004

Example: Categorization Relationships Copyright © 2004

Example: IDEF1X Model With Relationship Names Normally, a name consists of a verb or verb phrase expressed from the standpoint of the parent in the relationship, followed by a slash, and followed by the verb phrase expressed from the standpoint of the child. Copyright © 2004

Example: IDEF1X Model With Relationship Names Normally, a name consists of a verb or verb phrase expressed from the standpoint of the parent in the relationship, followed by a slash, and followed by the verb phrase expressed from the standpoint of the child. Copyright © 2004

Domains A domain is a named set of values that an attribute can have It can be a specific list of values or a pre-defined data characteristic, e.g. character string of length less than 75 Domains reduce ambiguity in data modeling and are practically useful Two types of domains Base domain: have a data type and possibly a value list or range definition Type domain: a subset of a base domain or a subset of another type domain Copyright © 2004

Example: Domain Hierarchy Copyright © 2004

UML-style E-R Diagrams The Unified Modeling Language (UML) is a set of structures and techniques for modeling and designing object-oriented programs (OOP) and applications The concept of UML entities, relationships, and attributes are very similar to those of the extended E-R model Several OOP constructs are added: <Persistent> indicates that the entity class exist in the database UML allows entity class attributes UML supports visibility of attributes and methods UML entities specify constraints and methods in the third segment of the entity classes Currently, the object-oriented notation is of limited practical value Copyright © 2004

Example: UML Each entity is represented by an entity class, which is shown as a rectangle with three segments. The top segment shows the name of the entity and other data that we will discuss. The second segment lists the names of the attributes in the entity, and the third documents constraints and lists methods (program procedures) that belong to the entity. Relationships are shown with a line between two entities. Cardinalities are represented in the format x..y, where x is the minimum required and y is the maximum allowed. Copyright © 2004

Example: UML Each entity is represented by an entity class, which is shown as a rectangle with three segments. The top segment shows the name of the entity and other data that we will discuss. The second segment lists the names of the attributes in the entity, and the third documents constraints and lists methods (program procedures) that belong to the entity. Relationships are shown with a line between two entities. Cardinalities are represented in the format x..y, where x is the minimum required and y is the maximum allowed. Copyright © 2004

Example: UML Each entity is represented by an entity class, which is shown as a rectangle with three segments. The top segment shows the name of the entity and other data that we will discuss. The second segment lists the names of the attributes in the entity, and the third documents constraints and lists methods (program procedures) that belong to the entity. Relationships are shown with a line between two entities. Cardinalities are represented in the format x..y, where x is the minimum required and y is the maximum allowed. Copyright © 2004

UML: Weak Entities A filled-in diamond is placed on the line to the parent of the weak entity (the entity on which the weak entity depends). Figure 2-28(a) shows a weak entity that is not an ID-dependent entity. It is denoted by the expression <non-identifying> on the PATIENT-PRESCRIPTION relationship. Figure 2-28(b) shows a weak entity that is ID-dependent. It is denoted with the label <identifying>. Copyright © 2004

UML: Subtypes A filled-in diamond is placed on the line to the parent of the weak entity (the entity on which the weak entity depends). Figure 2-28(a) shows a weak entity that is not an ID-dependent entity. It is denoted by the expression <non-identifying> on the PATIENT-PRESCRIPTION relationship. Figure 2-28(b) shows a weak entity that is ID-dependent. It is denoted with the label <identifying>. Copyright © 2004

Chapter 2 Entity-Relationship Data Modeling: Tools and Techniques