Relationships—Topics

Slides:



Advertisements
Similar presentations
Information System Analysis Lab 7. ERD entity-relationship diagram is a data modeling technique that creates a graphical representation of the entities,
Advertisements

Entity Relationship (ER) Modeling
Entity Relationship (ER) Modeling
Entity-Relationship Model
Slide 1 Chapter 05 – Part 1 Data Modeling with the Entity-Relationship Model.
MIS2502: Data Analytics Relational Data Modeling
Ch5: ER Diagrams - Part 2 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Chapter 5 Entity Relationship (ER) Modelling
Conceptual Design Lecture - 2 Database Development.
IMS 6217: Relationships 1 Dr. Lawrence West, MIS Dept., University of Central Florida Database Design--Topics DB Design Steps Identify.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
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.
1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.
CS 370 Database Systems Lecture 9 The Relational model.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
IT 21103/41103 System Analysis & Design. Chapter 04 Data Modeling.
IMS 4212: Introduction to Data Modeling—Relationships 1 Dr. Lawrence West, Management Dept., University of Central Florida Relationships—Topics.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
Entity Relationship Diagram (ERD). Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship.
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 2: MODELING DATA.
ENTITY RELATIONSHIP DIAGRAM. Objectives Define terms related to entity relationship modeling, including entity, entity instances, attribute, relationship.
Entity Relationship (E-R) Model
Database Design Chapters 17 and 18.
Entity Relationship Modeling
Data Modeling Using the ERD
Let try to identify the conectivity of these entity relationship
Data Modeling and the Entity-Relationship Model
CHAPTER 2 - Database Requirements and ER Modeling
Entity Relationship Model
Chapter 4: Logical Database Design and the Relational Model
Chapter 4: Part B Logical Database Design and the Relational Model
MIS2502: Data Analytics Relational Data Modeling
Requirements Become the E-R Data Model
© The McGraw-Hill Companies, All Rights Reserved APPENDIX C DESIGNING DATABASES APPENDIX C DESIGNING DATABASES.
Implementing an REA Model in a Relational Database
Tables and Their Characteristics
Database Design – Lecture 4
Chapter 7 Entity-Relationship Model
Primary Keys—Topics Uniqueness of Table Rows
ER MODEL Lecture 3.
Implementing an REA Model in a Relational Database
ERD’s REVIEW DBS201.
Practice of ER modeling
Overview of Entity‐Relationship Model
MIS2502: Data Analytics Relational Data Modeling
Technical Module A Data Modeling Definitions
Entity-Relation Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
MIS2502: Data Analytics Relational Data Modeling
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Database Systems Instructor Name: Lecture-9.
Database Modeling using Entity Relationship Model (E-R Model)
Database Systems Instructor Name: Lecture-10.
Review of Week 1 Database DBMS File systems vs. database systems
Entities Things about which you need to store data. One entity for each different thing. At least two attributes At least two occurrences Not a property.
Relationships—Topics
CHAPTER 2 - Database Requirements and ER Modeling
Database Processing: David M. Kroenke’s Chapter Five:
Guide to Modeling Keys to E-R diagrams.
Relationship Problems—Topics
MIS2502: Data Analytics Relational Data Modeling 2
Database Management system
Database Management system
Guide to Modeling Keys to E-R diagrams.
Entity-Relationship (E-R) Modeling
Entity Relationship (ER) Modeling
Conceptual Data Modeling
Relationships—Topics
Entity-Relationship Design
Presentation transcript:

Relationships—Topics Relationship Cardinality & Notation Policy and Cardinality

Identify “Information Elements” Identify Entities Database Design Steps Identify “Information Elements” Identify Entities Identify Primary Keys Identify Relationships Fix Relationship Problems Identify Non-Key Attributes Fix Attribute Problems Address Performance Issues Build Application Objects (stored procedures, views) Design Reports List is not strictly sequential Some steps performed recursively Some steps require returning to previous steps

Cardinality Understanding “Cardinality” is one of the most fundamentally important concepts in DB design Cardinality indicates how many occurrences of an entity must or may be allowed in the relationship with any one occurrence in the other entity Cardinality goes in each direction One student may/must take ? Classes One class must/may be taken by ? Students

Relationship Cardinality (cont.) The measure of cardinality has two components at each end of the relationship: A maximum (usually either 1 or an unconstrained number greater than one, referred to as “many”) A minimum (usually either 0 or 1 but other values are possible, though rare) Relationship is mandatory if at least one matching record is required (minimum is 1) Relationship is optional if a matching record is not required (minimum is 0)

Cardinality Notation Entity Entity Entity Entity Mandatory One One professor must have exactly one phone number Mandatory Many A customer must have at least one purchase to be a customer but may have many Optional One One professor may have as few as zero reserved parking spaces but may have only one at most Optional Many One student may take as few as zero classes but may take more than one class Entity Entity Entity

Cardinality Notation (cont.) Interpret these cardinalities

Cardinality Notation (cont.) Relationship cardinality is governed by the number of related occurrences you could have If a student could have two majors then relationship is ‘Many’ on the Major side May a car or house have more than one owner? May an Employee be assigned to more than one job title at a time? Will you record a Supplier if you do not currently carry any of their products? Will you enter an Employee without assigning them to a position?

Cardinality Notation (cont.) Two Common Beginner Problems Historical Data: Moment of Creation Test:

Cardinality Notation (cont.) Commonly used verbal shorthand ignores the minimum component of a relationship 1:M (one-to-many) 1:1 (one-to-one) M:M (or M:N) (many-to-many)

Cardinality Notation (cont.) The graphical layout of a relationship is purely arbitrary

Organization Policy and Cardinality Business policies (or regulations) may affect cardinality

Exercise Refer back to your entity diagram you created in Module 1 (Exercise #3) Identify the cardinalities at both ends of each relationship in the exercise Minimum cardinality Maximum cardinality