Presentation is loading. Please wait.

Presentation is loading. Please wait.

Microsoft Enterprise Consortium Prepared by Jennifer Kreie, New Mexico State UniversityHosted by the University of Arkansas Database Fundamentals Defining.

Similar presentations


Presentation on theme: "Microsoft Enterprise Consortium Prepared by Jennifer Kreie, New Mexico State UniversityHosted by the University of Arkansas Database Fundamentals Defining."— Presentation transcript:

1 Microsoft Enterprise Consortium Prepared by Jennifer Kreie, New Mexico State UniversityHosted by the University of Arkansas Database Fundamentals Defining Relationships in the Data Model 1 Microsoft Enterprise Consortium: Microsoft Faculty Connection/Faculty Resource Center

2 Microsoft Enterprise Consortium Prepared by Jennifer Kreie, New Mexico State UniversityHosted by the University of Arkansas Things you should know… This presentation assumes that you are familiar with these terms: ◦Entity, attribute, identifier, multivalued attribute, relationship, cardinality ◦One-to-many, many-to-many, one-to-one ◦Degree of the relationship: unary, binary, ternary 2

3 Microsoft Enterprise Consortium Prepared by Jennifer Kreie, New Mexico State UniversityHosted by the University of Arkansas Cardinality: Define a relationship In a relationship between two entities (or an entity related to itself), the minimum and maximum cardinalities are defined by asking two questions from each end of the relationship. In the example below you must determine the minimum and maximum cardinality from the “customer” side for its relationship to order. Next, you must determine the minimum and maximum cardinality from the “order” side for its relationship to customer. 3 CUSTOMERORDER Q1 Q2 Q4Q3

4 Microsoft Enterprise Consortium Prepared by Jennifer Kreie, New Mexico State UniversityHosted by the University of Arkansas Define a relationship: 2 questions Let’s walk through a detailed example of defining the relationship. Defining CUSTOMER’s relationship to ORDER. ◦Q1 Minimum cardinality: For any one customer—Sylvia Sanchez, for example—what is the minimum number of orders allowed? ◦Q2 Maximum cardinality: For any one customer— Sylvia Sanchez, for example—what is the maximum number of orders allowed? 4 CUSTOMERORDER

5 Microsoft Enterprise Consortium Prepared by Jennifer Kreie, New Mexico State UniversityHosted by the University of Arkansas Define a relationship: 2 more questions Defining ORDER’s relationship to CUSTOMER. ◦Q3 Minimum cardinality: For any one order—order # 2573, for example—what is the minimum number of customers allowed? ◦Q4 Maximum cardinality: For any one order—order # 2573, for example—what is the maximum number of customers allowed? 5 CUSTOMERORDER

6 Microsoft Enterprise Consortium Prepared by Jennifer Kreie, New Mexico State UniversityHosted by the University of Arkansas Reading the relationship How would you read the relationship shown below? You can interpret the relationship based on the way you know it was defined. ◦Any one department, such as marketing, can have a minimum of zero employees. ◦Any one department, such as marketing, can have a maximum of many employees. ◦Any one employee, such as Jack Jenkins, can have a minimum of one departments. ◦Any one employee, such as Jack Jenkins, can have a maximum of one departments. 6 DEPARTMENTEMPLOYEE

7 Microsoft Enterprise Consortium Prepared by Jennifer Kreie, New Mexico State UniversityHosted by the University of Arkansas What was covered … This presentation has shown how you define the relationship between two entities. There are two questions to ask from each side of the relationship—a total of 4 questions. 7

8 Microsoft Enterprise Consortium Prepared by Jennifer Kreie, New Mexico State UniversityHosted by the University of Arkansas Resources Microsoft Enterprise Consortium: ◦The consortium provides teaching material and large databases donated by some major corporations. Microsoft Faculty Connection—Faculty Resource Center ◦A wide range of teaching resources are available. 8


Download ppt "Microsoft Enterprise Consortium Prepared by Jennifer Kreie, New Mexico State UniversityHosted by the University of Arkansas Database Fundamentals Defining."

Similar presentations


Ads by Google