IS 475/675 - Introduction to Database Design

Slides:



Advertisements
Similar presentations
THE EXTENDED ENTITY RELATIONSHIP MODEL (EERM)
Advertisements

Chapter 3: The Enhanced E-R Model
Basic notation for supertype/subtype relationships
Enhanced Entity-Relationship Modeling. Strong and Weak Entity Types Strong entity: Each object is uniquely identifiable using primary key of that entity.
Advanced Data Modeling
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 6 Advanced Data Modeling.
Database Systems: Design, Implementation, and Management Tenth Edition Chapter 5 Advanced Data Modeling.
Database Systems: Design, Implementation, and Management Tenth Edition
Chapter 6 Advanced Data Modelling
BIS Database Systems School of Management, Business Information Systems, Assumption University A.Thanop Somprasong Chapter # 6 Advanced Data Modeling.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 6 Advanced Data Modeling.
CHAPTER 3: THE ENHANCED E-R MODEL © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey A. Hoffer,
1 Class Agenda – 09/20/2011  Answer questions about exam  Evaluate database design homework  Review database design homework for syntax and logic 
Chapter 4 © 2005 by Prentice Hall 1 Objectives Definition of terms Definition of terms Use of supertype/subtype relationships Use of supertype/subtype.
Fundamentals, Design, and Implementation, 9/e Chapter 5 Database Design.
Agenda for Week 1/31 & 2/2 Learn about database design
Information Resources Management February 13, 2001.
Entity Relationship Diagrams
Data Modeling Entity - Relationship Models. Models Used to represent unstructured problems A model is a representation of reality Logical models  show.
Enhanced Entity-Relationship Modeling
Chapter 4 Entity Relationship (E-R) Modeling
CSCI 242 Relational Data Modeling Copyright 2011, David C. Roberts, all rights reserved.
Modern Systems Analysis and Design Third Edition
Michael F. Price College of Business Chapter 6: Logical database design and the relational model.
1 Chapter 4 Enhanced E-R Model. 2 Supertypes and Subtypes Subtype: A subgrouping of the entities in an entity type which has attributes that are distinct.
Chapter 3: The Enhanced E-R Model
 Keys are special fields that serve two main purposes: ◦ Primary keys are unique identifiers of the relation in question. Examples include employee numbers,
Class Agenda – 04/04/2006 Discuss database modeling issues
ER- and EER-to-Relational Mapping
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 4 The Relational Model.
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management Dave Salisbury ( )
1 ER Modeling BUAD/American University Entity Relationship (ER) Modeling.
4 1 Chapter 4 Entity Relationship (ER) Modeling Database Systems: Design, Implementation, and Management, Sixth Edition, Rob and Coronel.
Chapter 8 Data Modeling Advanced Concepts Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
EXAMPLE. Subclasses and Superclasses Entity type may have sub-grouping that need to be represented explicitly. –Example: Employee may grouped into.
CS 370 Database Systems Lecture 9 The Relational model.
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
Chapter 9: Logical Database Design and the Relational Model (ERD Mapping)
1 © Prentice Hall, 2002 Chapter 5: Logical Database Design and the Relational Model Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B.
1 The Enhanced Entity Relationship Diagrams (E-ERDs)
CHAPTER 3: THE ENHANCED E-R MODEL © 2013 Pearson Education, Inc. Publishing as Prentice Hall 1 Modern Database Management 11 th Edition Jeffrey A. Hoffer,
Database Systems Supertypes and Subtypes Lecture # 10.
Entity Relationship Modeling
DatabaseIM ISU1 Chapter 7 ER- and EER-to-Relational Mapping Fundamentals of Database Systems.
Database Systems: Design, Implementation, and Management Ninth Edition
1 Class Agenda (04/06/2006 and 04/11/2006)  Discuss use of Visio for ERDs  Learn concepts and ERD notation for data generalization  Introduce concepts.
1 © Prentice Hall, 2002 ITD1312 Database Principles Chapter 4B: Logical Design for Relational Systems -- Transforming ER Diagrams into Relations Modern.
Logical Database Design and the Relational Model.
© 2009 Pearson Education, Inc. Publishing as Prentice Hall 1 Chapter 4: The Enhanced E-R Model Modern Database Management 9 th Edition Jeffrey A. Hoffer,
Copyright © 2016 Pearson Education, Inc. Modern Database Management 12 th Edition Jeff Hoffer, Ramesh Venkataraman, Heikki Topi CHAPTER 3: THE ENHANCED.
Copyright 2002 Prentice-Hall, Inc. Modern Systems Analysis and Design Third Edition Jeffrey A. Hoffer Joey F. George Joseph S. Valacich Chapter 10 Structuring.
Ch 05. Basic Symbols ( manino ). Cardinalities Cardinality Notation.
Data Modeling Advanced Concepts Updated 20/4/2015 TMC2034 Database Concept and Design1.
BTM 382 Database Management Chapter 5: Advanced Data Modeling
COP Introduction to Database Structures
The Enhanced E-R Model and Business Rules
Chapter 5 Database Design
Chapter 4: Part B Logical Database Design and the Relational Model
Entity Relationship (E-R) Modeling
Database Management System 1 (ITED123A)
מודל הנתונים.
Overview of Entity‐Relationship Model
CHAPTER 4: LOGICAL DATABASE DESIGN AND THE RELATIONAL MODEL
Chapter 5 Advanced Data Modeling
MIS 385/MBA 664 Systems Implementation with DBMS/ Database Management
Database Management system
Entity Relationship (ER) Modeling
Presentation transcript:

IS 475/675 - Introduction to Database Design Agenda: 02/06/2014 Review concepts of design relationships. Learn more about relationships. Heuristics of a good ERD. Demonstrate MS Visio. Practice creating more ERD’s (if time…)

Relationship review We are purposely dividing data into entities to have less data redundancy. Entities do not usually exist in isolation. Entities are related because the data are related. A relationship is a business association between two or more entities. A relationship is a business rule. An ERD is a simple modeling tool – it is not possible to depict every “real life” relationship with an ERD.

Example: Binary M:N Relationship

Example: 1:M Binary Relationships with Intersection Entity

Example: 1:M Binary Relationships with Intersection Entity Depicts a Ternary Relationship

Example: 1:1 Binary Relationship

Example: 1:M Unary Relationship

Examples of Unary Relationships

A many-to-many (M:N) unary relationship must also be intersected

Another type of relationship: Generalization (Enhanced ERD) Generalization is the concept that some entities are very similar and have some attributes in common, but other attributes that are distinct. An entity “supertype” contains those attributes that are in common. An entity “subtype” contains those attributes that are distinct. An entity “subtype” adds other attributes to those inherited from the supertype. Generalization allows an analyst to understand more fully the relationships between entities.

Let’s go back to the consulting ERD…

Depict the generalization hierarchy

Generalization constraints Constraints are limitations depicted on a data model. The most common types of constraints are: Completeness. Addresses the question of whether an instance of a supertype must also be a member of at least one subtype. Result is either required or not required. Indicated by a double line in Visio. Disjointness. Addresses the question of whether an instance of a supertype may simultaneously be a member of two or more subtypes. Result is specified as disjoint or overlap. Indicated with either an “o” or a “d”.

Heuristics: Redundant Data Avoid redundant data that is composed of long alphanumeric data types. Examples are names, addresses, comments, notes. Standardize any “descriptive” attributes such as categories or types. Put sample data in a few rows of each entity so that you can determine whether or not the data will be redundant. If you don’t know what data will be stored, ask your client.

Heuristics: Relationships Do not include M:N relationships. M:N relationships always produce data redundancy. Divide M:N relationships with an intersection entity that will create at least two 1:M relationships. A single intersection entity can be used to intersect more than two strong entities. In a 1:M relationship, the foreign key is placed in the entity on the “many” side of the relationship.

Heuristics for 1:1 Relationships Examine all 1:1 relationships. Determine whether the attributes could all be placed in just one of the two entities eliminating the need for the relationship. In a 1:1 relationship, the foreign key can be placed in either entity. Put the foreign key in the entity that seems most “reasonable” and also will result in the fewest number of null values.

Heuristics: Primary Key A “natural” primary key is composed of attributes that are already part of the application specification. A “surrogate” primary key is created by the database designer for the explicit purpose of being a primary key. A surrogate primary key should NEVER be concatenated. For logical database design, try and find a natural primary key.

Heuristics: More Primary Key Never add more attributes than are absolutely necessary to create a primary key value unique. Use the primary key of the related strong entity as part of the primary key for the associative entity, if the relationship with the associative entity is mandatory. Use the primary keys of the strong entities as part or all of the primary key for the related intersection entity.