Database Answers Working on the Bayou
Printer Slide show

Home Ask a Question Best Practice Careers Contact Us Data Models Search Site Map
5-Minute Tutorial on Feeding-Time at the Zoo   
Real Life Situation

Real Life Situation
Step-by-Step Commentary
Step 1 : Getting Started

We can see a staff member feeding the animals
(in this case a group of Llamas from South America)

When we plan our Data Model, we realise that what brings
all the participants is the Event of "Feeding the Animals".

Therefore our Approach is to think firstly about the Event
and then how the people and animals are related to
each other in the context of Feeding-Time.
Real Life Situation

Real Life Situation
Step-by-Step Commentary

Step 2 : Our first Model consists simply of the Event Entity.

Event
Real Life Situation

Real Life Situation
Step-by-Step Commentary

Step 3 : Now we add the Animals Entity with a line between Animals and the Event to show they are related.


Animals and Events
Real Life Situation

Real Life Situation
Step-by-Step Commentary

Step 4 : We can see a staff member feeding the animals so we add a Staff Entity with a line to the Event to show their Relationship.
Animals, Events and Staff
Real Life Situation

Real Life Situation
Step-by-Step Commentary

Step 5 : Now we add Food with a line to the Event Entity.
Animals, Events, Staff and Food
Real Life Situation

Real Life Situation
Step-by-Step Commentary

Step 6 : Review our Data Model
Now is a good time to review our Data Model. First we realise that there will usually be more than one Animal participating in a Feeding-Time Event.
So we change the relationships to show that.
Food
Real Life Situation

Real Life Situation
Step-by-Step Commentary

Step 7 : Food in an Event
We have assumed that there will be only one type of Food provided at the Feeding-Time Event.
However, it is more reslistic to create a Data Model which
we can use in a situation where there is more than one type of food provided.
So we add an Entity called 'Food in an Event'.
It is very clear that there is only one member of Staff so
that part of our Model is correct.
Food at an Event
Real Life Situation

Real Life Situation
Step-by-Step Commentary

Step 8 : An Entity-Relationship Diagram (ERD)
The Model that we have created is a 'Conceptual Model'
which is very good for talking to business Users.
But for talking to technical people, such as developers,
it is useful to have an ERD for the basis of communication.

We have added some Attributes in each Entity or Table
to provide a foundation for future detailed work.
Data Model


© Database Answers Ltd. 2015