Assessment COS20015
Assessment COS20015
Question 1
In this tutorial, we will create an entity that helps a physiotherapy centre, LiveEasy,
to keep track of their appointments. We have the following scenario that has to be
captured:
1. Create ONE entity for this scenario. Make a table with column headers (attribute
names), taking care that all of the attributes are APPOINTMENT-specific. Show the
data in the table.
Duration shows the average time a patient has an appointment with a physiotherapist
Question 2
Give a definition of the data types of your attributes. You can list the attributes one
on each line and define the data types, e.g.:
phone - CHAR(16),
Your answer:
Make an appropriate natural primary key for this table. Justify your choice.
For example:
A natural primary key is a key that naturally is part of the entity and as this question
asked us to use attributes x, y and z as a composite key, so we need to select some
attributes which will become the composite key and unrepeatable. Choosing the
physio_name, appnt_date, and appnt_time in combination is an option for a
composite key to the APPOINTMENT-specific table. Each physiotherapist in each
appointment date/time can accept just one patient.
***************************************************************************
Week 3
Question 1
Question 2
EasyLife have given us further requirements. They need to store more client-
specific data. For a start, the phone number and address of each client have to be
stored.
Add the additional entity with its attributes in UML notation and draw the
relationship between your new entity and the appointment entity. Mark the
cardinalities - is this one-to-one or one-to-many? Are there mandatory
relationships?
Answer:
*******************************************************************
Week 4
Question 1
They also run classes for their clients, where groups of people with a similar injury
do exercises together under the instruction of a physiotherapist. EasyLife need the
data structures to store these classes and their participants. The participants are
clients. Clients can have individual appointments - which we have already modelled
- and classes or group sessions.
You have to create a model that enables several clients to take the same class
and the same client to participate in several classes.
Model the entities you think are necessary for the datastore to be able to store this
scenario. Determine an appropriate primary key for all entities involved. You may
use a natural or surrogate key. Comment about the assumptions for your primary
key - e.g. can two spine classes run at the same time?
Task: Develop a UML diagram with attributes that show which of the attributes are
part of the primary key. Show the relationships between the entities you have
identified. Mark the attributes which are part of the foreign key. Upload your solution.
Question 2
For every UML entity you have created for Question 1, make a data table to test whether
your model works well. Make your own test data and check for problems of duplication
(except where allowed, i.e. the foreign keys). Upload your data tables.
You put feedback for this question “There is no data, just attribute names”
But you didn’t put exact data to put in the table too