Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI

Slides:



Advertisements
Similar presentations
Constraints in Entity-Relationship Models Zaki Malik September 18, 2008.
Advertisements

1–1 Students Entity/Relationship Model Diagrams to represent designs. Entity like object, = “thing.” Entity set like class = set of “similar” entities/objects.
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
1 Entity-Relationship Model Diagrams Class hierarchies Weak entity sets.
Entity-Relationship Model
Chapter 4 Notes. Entity-Relationship Model E/R Diagrams Weak Entity Sets Converting E/R Diagrams to Relations.
Design Principles: Faithfulness
Weak Entity Sets. Occasionally, entities of an entity set need “help” to identify them uniquely. Example. Crews might have a number and some description,
Weak Entity Sets. Occasionally, entities of an entity set need “help” to identify them uniquely. Entity set E is weak if in order to identify entities.
Design Principles: Faithfulness
Database Design and the E-R Model Chapter 7 [1 of 2]
1 Entity-Relationship Model Slides by Jeffrey Ullman Modified by J. Welch to replace beers with candies.
DATABASE APPLICATION DEVELOPMENT SAK 3408 Database Design II (week 3)
From ER Diagrams to the Relational Model Rose-Hulman Institute of Technology Curt Clifton.
A four-way Relationship
1 Conceptual Design with ER Model Lecture #2. 2 Lecture Outline Logistics Steps in building a database application Conceptual design with ER model.
1 Entity-Relationship Model Diagrams Class hierarchies Weak entity sets.
Winter 2002Arthur Keller – CS 1802–1 Schedule Today: Jan. 8 (T) u Weak Entity Sets, Entity-Relationship Design. u Read Sections Jan. 10 (TH) u.
CS411 Database Systems Kazuhiro Minami
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
1 Database Systems ( 資料庫系統 ) September 24, 2014 Lecture #2.
Database Management Systems Chapter 3 The Relational Data Model (III) Instructor: Li Ma Department of Computer Science Texas Southern University, Houston.
CPSC 603 Database Systems Lecturer: Laurie Webster II, M.S.S.E., M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 3 Introduction to a First Course in Database Systems.
1 Entity-Relationship Model E/R Diagrams Weak Entity Sets Converting E/R Diagrams to Relations.
Databases : Entity-Relationship Model 2007, Fall Pusan National University Ki-Joune Li These slides are made from the materials that Prof. Jeffrey D. Ullman.
Database Management Systems Chapter 2 The Entity-Relationship Data Model Instructor: Li Ma Department of Computer Science Texas Southern University, Houston.
ER Data Models Ctd. CSET 3300.
1 Entity-Relationship Model Chapter 2 Copyright : Jeff Ullman + Hank Korth.
1 Database Systems ( 資料庫系統 ) September 26, 2005 Lecture #2.
1 Database Systems ( 資料庫系統 ) September 27/28, 2006 Lecture #2.
1 Session 2 Welcome: The fifth learning sequence “ Entity-Relationship Model -2“ E-R Model Recap : In the previous learning sequence, we discussed the.
Tallahassee, Florida, 2015 COP4710 Database Systems E-R Model Fall 2015.
Entity-Relationship Model
Functional Dependencies. FarkasCSCE 5202 Reading and Exercises Database Systems- The Complete Book: Chapter 3.1, 3.2, 3.3., 3.4 Following lecture slides.
Data Modeling Translating E-R Diagrams to Relations
SAnta Clara UniversityHolliday – COEN 1782–1 Today’s Topic Today: u Constraints, Weak Entity Sets, Entity- Relationship Design. u Read Sections
IST 210 Normalization 2 Todd Bacastow IST 210. Normalization Methods Inspection Closure Functional dependencies are key.
Winter 2006Cushing Keller UllmanJudy Cushing2–1 Weak Entity Sets Sometimes an E.S. E ’s key comes not (completely) from its own attributes, but from the.
CPSC 603 Database Systems Lecturer: Laurie Webster II, M.S.S.E., M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 2 Introduction to a First Course in Database Systems.
Dale Roberts 11/26/ Department of Computer and Information Science, School of Science, IUPUI Fall 2003 Dale Roberts, Lecturer Computer Science, IUPUI.
Databases 1 Fifth lecture. Entity-Relationship Model Diagrams Class hierarchies Weak entity sets From E/R diagrams to Relations 2.
Entity-Relationship Modelling ER Diagrams and EER Diagrams Some design techniques Elements and process: text  diagram Slides by Jeff Ullman (infolab.stanford.edu/~ullman/dscb/pslides/er.ppt),
Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
CPSC 603 Database Systems Lecturer: Laurie Webster II, M.S.S.E., M.S.E.E., M.S.BME, Ph.D., P.E. Lecture 4 Introduction to a First Course in Database Systems.
Entity/Relationship Modelling. Entity Relationship Modelling In This Lecture Entity/Relationship models Entities and Attributes Relationships Attributes.
Entity-Relationship Model E/R Diagrams Converting E/R Diagrams to Relations.
Functional Dependencies Zaki Malik September 25, 2008.
Normalisation 1NF to 3NF Ashima Wadhwa. In This Lecture Normalisation to 3NF Data redundancy Functional dependencies Normal forms First, Second, and Third.
Winter 2002Arthur Keller – CS 1802–1 Weak Entity Sets Sometimes an E.S. E ’s key comes not (completely) from its own attributes, but from the keys of one.
Database Management COP4540, SCS, FIU Database Modeling Using the Entity- Relationship Model (Continued)
Dale Roberts Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI
1 Database Systems ( 資料庫系統 ) 9/23/2009 Lecture #2.
Logical Database Design and Relational Data Model Muhammad Nasir
CS 405G Introduction to Database Systems Lecture 3: ER Model Instructor: Chen Qian.
Computational Biology Dr. Jens Allmer Lecture Slides Week 5.
Normalisation Unit 6: Databases. Just to recap  What is an Entity  What is an Attribute?
CS422 Principles of Database Systems From ER to Relations Chengyu Sun California State University, Los Angeles Adapted from Jeffrey Ullman’s lecture notes.
Database Design and Programming Jan Baumbach Adopted from previous slides of Peter Schneider-Kamp.
CS422 Principles of Database Systems Entity-Relationship Model Chengyu Sun California State University, Los Angeles Adapted from Jeffrey Ullman’s lecture.
Introduction to Database Systems, CS420
Entity-Relationship Model
COP4710 Database Systems E-R Model.
Weak Entity Sets Sometimes an E.S. E ’s key comes not (completely) from its own attributes, but from the keys of one or more E.S.’s to which E is linked.
Constraints in Entity-Relationship Models
CPSC-310 Database Systems
Instructor: Zhe He Department of Computer Science
Database Systems (資料庫系統)
Session 2 Welcome: The fifth learning sequence
CS4433 Database Systems E-R Model.
CS 405G: Introduction to Database Systems
Presentation transcript:

Dale Roberts 1 Department of Computer and Information Science, School of Science, IUPUI Dale Roberts, Lecturer Computer Science, IUPUI Data Modeling Design Techniques

Dale Roberts 2 Design Techniques 1. Avoid redundancy. 2. Limit the use of weak entity sets. 3. Don’t use an entity set when an attribute will do.

Dale Roberts 3 Avoiding Redundancy Redundancy = saying the same thing in two (or more) different ways. Wastes space and (more importantly) encourages inconsistency. Two representations of the same fact become inconsistent if we change one and forget to change the other. Recall anomalies due to FD’s.

Dale Roberts 4 Example: Good BeersManfs ManfBy name This design gives the address of each manufacturer exactly once. nameaddr

Dale Roberts 5 Example: Bad BeersManfs ManfBy name This design states the manufacturer of a beer twice: as an attribute and as a related entity. name manf addr

Dale Roberts 6 Example: Bad Beers name This design repeats the manufacturer’s address once for each beer and loses the address if there are temporarily no beers for a manufacturer. manfmanfAddr

Dale Roberts 7 Entity Sets Versus Attributes An entity set should satisfy at least one of the following conditions: It is more than the name of something; it has at least one nonkey attribute. or It is the “many” in a many-one or many-many relationship.

Dale Roberts 8 Example: Good BeersManfs ManfBy name Manfs deserves to be an entity set because of the nonkey attribute addr. Beers deserves to be an entity set because it is the “many” of the many-one relationship ManfBy. nameaddr

Dale Roberts 9 Example: Good Beers name There is no need to make the manufacturer an entity set, because we record nothing about manufacturers besides their name. manf

Dale Roberts 10 Example: Bad BeersManfs ManfBy name Since the manufacturer is nothing but a name, and is not at the “many” end of any relationship, it should not be an entity set. name

Dale Roberts 11 Don’t Overuse Weak Entity Sets Beginning database designers often doubt that anything could be a key by itself. They make all entity sets weak, supported by all other entity sets to which they are linked. In reality, we usually create unique ID’s for entity sets. Examples include social-security numbers, automobile VIN’s etc.

Dale Roberts 12 When Do We Need Weak Entity Sets? The usual reason is that there is no global authority capable of creating unique ID’s. Example: it is unlikely that there could be an agreement to assign unique player numbers across all football teams in the world.

Dale Roberts 10/18/ Acknowledgements McFadden and Hoffer. Database Management Loney, Kevin. Oracle Database 10g The Complete Reference Ullman, Jeff. Database Systems The Complete Book. DatabaseAnswers.com