CSIS 115 Database Design and Applications for Business

Slides:



Advertisements
Similar presentations
Data Modeling and the Entity-Relationship Model
Advertisements

Data Modeling and the Entity-Relationship Model
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE and DAVID J. AUER DATABASE CONCEPTS, 3 rd Edition.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
IT420: Database Management and Organization
Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
Data Modeling and the Entity-Relationship Model
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 3 The Entity- Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke’s Chapter Five: Data Modeling with the ER Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 David M. Kroenke Database Processing Tenth Edition Chapter 5 Data.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 7.
Chapter Five Data Modeling with the Entity-Relationship Model.
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
© 2002 by Prentice Hall 1 David M. Kroenke Database Processing Eighth Edition Chapter 3 The Entity- Relationship Model.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 8.
DAVID M. KROENKE’S DATABASE PROCESSING, 10th Edition © 2006 Pearson Prentice Hall 5-1 COS 346 Day 6.
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.
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.
Chapter 4 Entity Relationship (ER) Modeling
Database Systems: Design, Implementation, and Management Tenth Edition
Entity-Relationship Model
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 7.
Slide 1 Chapter 05 – Part 1 Data Modeling with the Entity-Relationship Model.
Data Modeling and the Entity-Relationship Model Chapter Four DAVID M. KROENKE’S DATABASE CONCEPTS, 2 nd Edition.
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 © Prentice Hall, 2002 Chapter 3: Modeling Data in the Organization Modern Database Management 6 th Edition Jeffrey A. Hoffer, Mary B. Prescott, Fred.
Chapter 7 Data Modeling with Entity Relationship Diagrams Database Principles: Fundamentals of Design, Implementation, and Management Tenth Edition.
Copyright (c) 2014 Pearson Education, Inc. Introduction to Databases.
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.
Database Systems: Design, Implementation, and Management Eighth Edition Chapter 4 Entity Relationship (ER) Modeling.
Chapter 4 Entity Relationship (ER) Modeling.  ER model forms the basis of an ER diagram  ERD represents conceptual database as viewed by end user 
Data Modeling IST210 Class Lecture.
Database Design – Lecture 5 Conceptual Data Modeling – adding attributes.
3 & 4 1 Chapters 3 and 4 Drawing ERDs October 16, 2006 Week 3.
Database Systems: Design, Implementation, and Management Ninth Edition Chapter 4 Entity Relationship (ER) Modeling.
The Entity-Relationship Model, P. I R. Nakatsu. Data Modeling A data model is the relatively simple representation, usually graphic, of the structure.
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.
Slide 1 Chapter 05 – Part 2 Data Modeling with the 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.
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.
David M. Kroenke and David J. Auer Database Processing Fundamentals, Design, and Implementation Chapter Five: Data Modeling with the Entity-Relationship.
CSIS 115 Database Design and Applications for Business
Database Processing: David M. Kroenke’s Chapter Five:
CSIS 115 Database Design and Applications for Business
TMC2034 Database Concept and Design
CSIS 115 Database Design and Applications for Business
CSIS 115 Database Design and Applications for Business
CSIS 115 Database Design and Applications for Business
Requirements Become the E-R Data Model
CSIS 115 Database Design and Applications for Business
Database Design – Lecture 4
CSIS 115 Database Design and Applications for Business
CSIS 115 Database Design and Applications for Business
Data Modeling with the Entity-Relationship Model
Database Processing: David M. Kroenke’s Chapter Five:
Database Systems: Design, Implementation, and Management Tenth Edition
Database Systems Instructor Name: Lecture-9.
Chapter 3: Modeling Data in the Organization
Database Processing: David M. Kroenke’s Chapter Five:
Chapter 4 Entity Relationship (ER) Modeling
Database Processing: David M. Kroenke’s Chapter Five:
ER MODELING Instructor: SAMIA ARSHAD
Entity Relationship (ER) Modeling
Chapter # 4 Entity Relationship (ER) Modeling.
Data Modeling and the Entity-Relationship Model
© 2008 Pearson Prentice Hall, Experiencing MIS, David Kroenke
Presentation transcript:

CSIS 115 Database Design and Applications for Business Dr. Meg Fryling “Dr. Meg” Fall 2012 @SienaDrMeg #csis115

Agenda Homework (see next slide) Chapter 3 (100-105 only) & 5 – Data Modeling Data Modeling the Hockey League database

Homework Start Chapter 3 (skip 127-130) Start Chapter 6 Homework 3 Posted on Blackboard Due Weds, 10/10 by start of class Project – Part II Due Weds, 10/17 by start of class Notice: Next Quiz is Mon, 10/15

If a given customer can place only one order and a given order can be placed by at most one customer, which of the following should be indicated as the maximum cardinality between the two entities? A) 0:1 B) 1:1 C) 1:N D) N:1 E) N:M Answer: B

If a given customer can place many orders and a given order can be by one or more customers, which of the following should be indicated as the maximum cardinality between the two entities? A) 0:1 B) 1:1 C) 1:N D) N:1 E) N:M Answer: E

What does the symbol next to the ORDER entity indicate? A) A maximum cardinality of "zero" B) A maximum cardinality of "one" C) A minimum cardinality of "optional" D) A minimum cardinality of "required" E) None of the above Answer: C

An identifier may be ________. A) composite B) a single attribute C) a relationship D) unique E) nonunique All are true except C

When practical make identifiers unique! Makes translation to database

Cardinality Cardinality means “count,” and is expressed as a number. Maximum cardinality is the maximum number of entity instances that can participate in a relationship. Minimum cardinality is the minimum number of entity instances that must participate in a relationship. KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall

Conceptual Database Design Data Modeling In-Class Activity Open Hockey League Activity Word doc from Blackboard Part I b Only Relationships with Maximum Cardinality

Minimum Cardinality Minimum cardinality is the minimum number of entity instances that must participate in a relationship. Minimums are generally stated as either zero or one: IF zero [0] THEN participation in the relationship by the entity is optional, and no entity instance must participate in the relationship. IF one [1] THEN participation in the relationship by the entity is mandatory, and at least one entity instance must participate in the relationship. KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall

“Web for Students” Example What are some mandatory relationships? What are some optional relationships?

Indicating Minimum Cardinality Minimum cardinality of zero [0] indicating optional participation is indicated by placing an oval next to the optional entity. Minimum cardinality of one [1] indicating mandatory (required) participation is indicated by placing a vertical hash mark next to the required entity. KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall

Minimum Cardinality Types “Web for Students” Example Mandatory-to-Mandatory (M-M) Relationship Optional-to-Optional (O-O) Relationship Optional-to-Mandatory (O-M or M-O) Relationship

Reading Minimum Cardinality Look toward the entity in question: IF you see an oval THEN that entity is optional minimum cardinality of zero [0] IF you see a vertical hash mark THEN that entity is mandatory (required) minimum cardinality of one [1] KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall

Data Modeling Notation: IE Crow’s Foot I KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall

Data Modeling Notation: IE Crow’s Foot 1:N KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall

Data Modeling Notation: IE Crow’s Foot N:M KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall

What does this mean? EMPLOYEE SKILL QUALIFICATION

Cardinality: Explicit maximum in relationship diamond 4 EMPLOYEE COMPUTER COMPUTER-ASSIGNMENT

Optional and Mandatory Participation Now you do it: STUDENT must declare a MAJOR Maximum of TWO majors. A major may no students majoring in it

Optional and Mandatory Participation Now you do it: STUDENT may declare a MINOR Maximum of TWO minors

Conceptual Database Design Data Modeling In-Class Activity Open Hockey League Activity Word doc from Blackboard Part I c Only Minimum Cardinality

Recursive Relationships It is possible for an entity to have a relationship to itself—this is called a recursive relationship. More about this later!

Weak vs. Strong Entities

Strong Entities Any entity whose existence does not depend on any other entity Can exist on its own ER Assistant calls these “Regular”

Weak Entities A weak entity cannot exist without the existence of another entity

Weak Entities An entity (child) whose identifier includes the identifier of another entity (parent). Is a logical extension or subunit of the parent: BUILDING : APARTMENT COURSE: CLASS_SECTION The minimum cardinality from the weak entity to the parent is always required. The parent record MUST exist in order for the child record to exist KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall

Weak Entities Strong Entities Weak Entities What do the identifiers of the weak entities look like? Weak Entities KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall

Weak Entities See the mistake? Page 154 (11th Edition) Weak Entities KROENKE AND AUER - DATABASE PROCESSING, 11th Edition © 2010 Pearson Prentice Hall

Weak Entities This one is correct! KROENKE AND AUER - DATABASE PROCESSING, 12th Edition © 2012 Pearson Prentice Hall