IMS 6217: Relationships 1 Dr. Lawrence West, MIS Dept., University of Central Florida Database Design--Topics DB Design Steps Identify.

Slides:



Advertisements
Similar presentations
Entity-Relationship (ER) Modeling
Advertisements

ERD diagram Data Design - Mr. Ahmad Al-Ghoul
Entity-Relationship Model
Copyright © 2015 Pearson Education, Inc. Database Design Chapters 17 and
1 MIS 340: Data Modeling 2 Yong Choi School of Business CSUB.
Agenda for Week 1/31 & 2/2 Learn about database design
Entity Relationship Modeling BUS112 Professor Kwan.
Information Resources Management January 30, 2001.
System Analysis and Design
CHAPTER 2: MODELING DATA IN THE ORGANIZATION © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey.
Entity-Relationship Model
Database Management COP4540, SCS, FIU Database Modeling Using the Entity-Relationship Model (Chapter 3)
MIS2502: Data Analytics Relational Data Modeling
Introduction to Databases
Practical tips for creating entity relationship diagrams (ERDs) Chitu Okoli Associate Professor in Business Technology Management John Molson School of.
Entity Relationship Modeling Objectives: To illustrate how relationships between entities are defined and refined. To know how relationships are incorporated.
Ch5: ER Diagrams - Part 2 Much of the material presented in these slides was developed by Dr. Ramon Lawrence at the University of Iowa.
Entity-Relationship Modeling I The cautious seldom err. Confucius.
© 2007 by Prentice Hall (Hoffer, Prescott & McFadden) 1 Entity Relationship Diagrams (ERDs)
Chapter 3 Data Modeling Using the Entity-Relationship (ER) Model.
Chapter 5 1 © Prentice Hall, 2002 Chapter 5: Transforming EER Diagrams into Relations Mapping Regular Entities to Relations 1. Simple attributes: E-R attributes.
Chapter 3: Modeling Data in the Organization
1 Data Modeling 2 Yong Choi School of Business CSUB.
Module Title? Data Base Design 30/6/2007 Entity Relationship Diagrams (ERDs)
Chapter 5 Entity–Relationship Modeling
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
DATABASEMODELSDATABASEMODELS  A database model ◦ defines the logical design of data. ◦ Describes the relationships between different parts of data.
MIS 3053 Database Design & Applications The University of Tulsa Professor: Akhilesh Bajaj ER Model Lecture 1 © Akhilesh Bajaj, 2000, 2002, 2003, 2004.
© 2011 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 2: Modeling Data in the Organization.
IMS 4212: Introduction to Data Modeling 1 Dr. Lawrence West, Management Dept., University of Central Florida Introduction to Data Modeling—Topics.
1 Relational Databases and SQL. Learning Objectives Understand techniques to model complex accounting phenomena in an E-R diagram Develop E-R diagrams.
IMS 4212: Data Modeling—Attributes 1 Dr. Lawrence West, Management Dept., University of Central Florida Attributes and Domains Nonkey.
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.
Databases : Data Modeling 2007, Fall Pusan National University Ki-Joune Li.
1 Entity-Relationship Diagram. 2 Components of ERD: –Entity –Relationship –Cardinality –Attributes.
Next Back A-1 Management Information Systems for the Information Age Second Canadian Edition Copyright 2004 The McGraw-Hill Companies, Inc. All rights.
C-1 Management Information Systems for the Information Age Copyright 2004 The McGraw-Hill Companies, Inc. All rights reserved Extended Learning Module.
CS 370 Database Systems Lecture 9 The Relational model.
IMS 4212: Data Modeling—More Relationships 1 Dr. Lawrence West, Management Dept., University of Central Florida Data Modeling—Topics.
Lecture 4 Conceptual Data Modeling. Objectives Define terms related to entity relationship modeling, including entity, entity instance, attribute, relationship,
Entity – Relationship Model (E-R Model)
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
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.
Entity Relationship Diagrams. Entities An entity is something about which the system/business needs to store data. Entities are drawn as rectangles The.
Chapter 3: Modeling Data in the Organization. Business Rules Statements that define or constrain some aspect of the business Assert business structure.
1 © Prentice Hall, 2002 ITD1312 Database Principles Chapter 4B: Logical Design for Relational Systems -- Transforming ER Diagrams into Relations Modern.
IMS 6217: Relational Data Model 1 Dr. Lawrence West, MIS Dept., University of Central Florida Introduction to Databases—Topics Information.
Database Design. Database Design Process Data Model Requirements Application 1 Database Requirements Application 2 Requirements Application 4 Requirements.
Chapter 8 Entity-Relationship Modeling Pearson Education © 2009.
IMS 6217: Database Design & Entities 1 Dr. Lawrence West, MIS Dept., University of Central Florida Database Design--Topics DB Design.
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.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 3: Modeling Data in the Organization Modern Database Management 9 th Edition Jeffrey.
IMS 4212: Normalization 1 Dr. Lawrence West, Management Dept., University of Central Florida Normalization—Topics Functional Dependency.
ERD :: 19 / 1 / Entity-Relationship (ER) Modeling. ER Modeling is a top-down approach to database design. Entity Relationship (ER) Diagram –A.
IMS 6217: Introduction to Data Modeling 1 Dr. Lawrence West, MIS Department, University of Central Florida Introduction to Data Modeling—Topics.
Entity Relationship Modeling
MIS2502: Data Analytics Relational Data Modeling
Database Systems Instructor Name: Lecture-9.
Database Modeling using Entity Relationship Model (E-R Model)
Relationships—Topics
Relationships—Topics
Entity-Relationship Diagram (ERD)
Relationship Problems—Topics
Relationships—Topics
Presentation transcript:

IMS 6217: Relationships 1 Dr. Lawrence West, MIS Dept., University of Central Florida Database Design--Topics DB Design Steps Identify Relationships M:M Relationships

IMS 6217: Relationships 2 Dr. Lawrence West, MIS Dept., University of Central Florida 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

IMS 6217: Relationships 3 Dr. Lawrence West, MIS Dept., University of Central Florida Relationships "A meaningful association between (or among) entities" What in the world does this mean? Relationships indicate how entities interact from the organization's perspective Relationships will end up defining paths through the database along which data will be retrieved –The paths usually mirror real world associations between entities

IMS 6217: Relationships 4 Dr. Lawrence West, MIS Dept., University of Central Florida Relationships (cont.) While entities are nouns relationships are verbs –Buys, teaches, sells, owns, … –Is a –Has Relationship verb describes how two entities interact with each other If two entities do not interact (from the organization’s official viewpoint) then there is no relationship between them –Professor ?? Football_Play ‘Direction’ of verb is not very important Important special cases

IMS 6217: Relationships 5 Dr. Lawrence West, MIS Dept., University of Central Florida Relationships Exercise Connect all Related Entities From our List and Name the Relationships (do not apply cardinalities)

IMS 6217: Relationships 6 Dr. Lawrence West, MIS Dept., University of Central Florida 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

IMS 6217: Relationships 7 Dr. Lawrence West, MIS Dept., University of Central Florida Cardinality (cont.) The cardinality at each end of a relationship specifies two elements –A maximum number of related records One (at most one) Many (an unconstrained number more than one) –A minimum number of related records Mandatory (at least one related record is required) Optional (no related record is required though one or many may exist)

IMS 6217: Relationships 8 Dr. Lawrence West, MIS Dept., University of Central Florida Cardinality Notation 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

IMS 6217: Relationships 9 Dr. Lawrence West, MIS Dept., University of Central Florida Cardinality Notation (cont.) Interpret these cardinalities

IMS 6217: Relationships 10 Dr. Lawrence West, MIS Dept., University of Central Florida 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?

IMS 6217: Relationships 11 Dr. Lawrence West, MIS Dept., University of Central Florida Cardinality Notation (cont.) The graphical layout of a relationship is purely arbitrary

IMS 6217: Relationships 12 Dr. Lawrence West, MIS Dept., University of Central Florida Organization Policy and Cardinality Business policies (or regulations) may affect cardinality Identify legitimate business policies that support each of the different cardinality combinations reflected here

IMS 6217: Relationships 13 Dr. Lawrence West, MIS Dept., University of Central Florida Cardinality Exercise Apply Cardinalities to Each Relationship Identified in the Prior Step

IMS 6217: Relationships 14 Dr. Lawrence West, MIS Dept., University of Central Florida Foreign Keys Relationships are established when the Primary Key attribute(s) of one entity is/are found in another entity These attributes are called Foreign Keys in the other entity Foreign Keys

IMS 6217: Relationships 15 Dr. Lawrence West, MIS Dept., University of Central Florida Many-to-Many Relationships Many-to-Many (M:N) relationships must be decomposed into a new entity and two relationships Carefully examine the cardinality of the two new relationships

IMS 6217: Relationships 16 Dr. Lawrence West, MIS Dept., University of Central Florida M:M Relationship Exercise Decompose M:M Relationships From the Previous Exercise

IMS 6217: Relationships 17 Dr. Lawrence West, MIS Dept., University of Central Florida Foreign Key Exercise Place Appropriate Foreign Keys In All Child Entities Found in the Previous Exercise

IMS 6217: Relationships 18 Dr. Lawrence West, MIS Dept., University of Central Florida Other Problems Exercise Fix Other Problems Found in the Previous Exercise Ternary or n-ary relationships Attributes on relationships (probably none yet) Unary M:M relationships