Presentation is loading. Please wait.

Presentation is loading. Please wait.

CSIS 115 Database Design and Applications for Business

Similar presentations


Presentation on theme: "CSIS 115 Database Design and Applications for Business"— Presentation transcript:

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

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

3 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

4 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

5 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

6 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

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

8 When practical make identifiers unique!
Makes translation to database

9 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

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

11 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

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

13 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

14 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

15 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

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

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

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

19 What does this mean? EMPLOYEE SKILL QUALIFICATION

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

21 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

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

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

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

25 Weak vs. Strong Entities

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

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

28 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

29 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

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

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


Download ppt "CSIS 115 Database Design and Applications for Business"

Similar presentations


Ads by Google