Friday, September 16, 2016

Identifying Relationships

  • ·         Identify the vocabulary word for each definition below.
  • ·         A property of an end of a relationship between X and Y that describes how many of X is related to Y. Cardinality
  • ·         A connection or association between objects. Relationship
  • ·         A property of an end of a relationship between X and Y that describes whether X must be or may be related to Y. Optionality

1. Read the given business scenario. Name the relationships between EMPLOYEE and JOB. Include appropriate optionality and cardinality.
“We have a lot of employees who handle one or more different jobs. We’d like to keep track of who is working on which job. Although employees can help each other, a job is assigned to one employee and is the ultimate responsibility of that employee. All of our employees have at least one job. However, jobs exist that are not yet assigned to anyone.”
  • ·         Single toe on employee side [cardinality]
  • ·         Crow foot on job side [cardinality]
  • ·         Dotted line on job side [optionality]
  • ·         Solid line on Employee side [optionality]

Notation: 1. dotted line means may, solid line means must 2. Single toe means one and only one, crow foot means many
Edit:
Each Employee must be [optionality] assigned one or more [cardinality] Job. Each Job may be [optionality] assigned to one and only one [cardinality] employee.

2. Read the given business scenario. Name the relationships between ORDER and WAITER. Include the appropriate optionality and cardinality.
“We assign our waiters to certain areas, except for our trainees who just observe and are not responsible for taking any orders yet. A waiter takes the orders for the tables in his area. All areas have one assigned waiter. A customer places an order with a waiter. If the customer has a question or wants to make a change to the order, he needs to request this with the assigned waiter.”
  • ·         One WAITER can take multiple orders. So crow foot on ORDER side [cardinality]
  • ·         An order can be taken by/further taken care of by one waiter for single tow on WAITER side [cardinality]
  • ·         A WAITER may also be a trainee, who need not cater order, or say there is no customer to cater, So, dotted line on waiter side [Optionality]
  • ·         An ORDER cannot be catered without a waiter, so solid line on ORDER side. [OPTIONALITY]


3. Read the given business scenario. Name the relationships between PARENT and CHILD. Include the appropriate optionality and cardinality.
“At the end of each day, parents need to pick up their children at our day-care center. All children must be picked up by 6 p.m. A child may have two parents, but we need only one of them to come and pick up the child. We cannot release a child to anyone but that child’s parent.”
·         Parent picks child, but any parent may pick child. Dotted line on parent side [Optionality]
·         A Child must be picked up by Parent, so solid line on Child side. [Optionality]
·         One Child cannot be picked up by multiple parents, so single toe on Parent side [Cardinality]
·         One Parent may pick up multiple children, so Crow foot on Child side. [Cardinality]
Edit:
Each Parent may be [optionality] picking one or more [cardinality] child. Each Child must be [optionality] picked by one and only one [cardinality] parent.

4. Read the given business scenario. Name the relationships between TEACHER and STUDENT. Include the appropriate optionality and cardinality.
“Some students request remedial help in certain subjects, such as math. We can assign a tutor who can work with the student after class. Some of our teachers agree to be tutors. If several students need tutoring in one subject, then we assign them to the same teacher. If a student needs tutoring in several subjects, then he will probably be assigned to several different tutors.”
M:M
  • ·         A Student can be assigned to multiple teachers. Crow foot [Cardinality]
  • ·         A teacher can be assigned multiple teachers. Crow foot [Cardinality]
  • ·         Since Student needs tutoring that’s why he is here, so he must be assigned to at least one teacher, so solid line on student side. [Optionality]
  • ·         All teachers who agree to help are here, they are in second collection, one of them is teaching philosophy, quite possible that this teacher don’t get any student. So dotted line on teacher side. [Optionality]

5. Draw two entities that you are familiar with from your own experience (use colored pens and markers on hand). Write down the relationships between these two entities, including cardinality and optionality. Share your entities with the class.



  • ·         Patient may raise multiple health claim so dotted line. [Optionality]
  • ·         Healthcare claim must be raised by patient, so solid line. [Optionality]
  • ·         Patient may raise multiple health claim so single toe on patient side and Crow foot on Claim side. [Cardinality]







No comments:

Post a Comment