0% found this document useful (0 votes)
111 views5 pages

Assessment COS20015

The document describes an entity to track appointments at a physiotherapy centre called LiveEasy, including 3 sample appointments with details like patient name, physiotherapist, date, time, and duration. It asks to create a table with appointment-specific attributes to store this data and define the data types of the attributes. A natural primary key for the table is suggested to be a combination of physiotherapist name, appointment date, and time since each appointment slot can only have one patient.

Uploaded by

mohammadiali360
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
111 views5 pages

Assessment COS20015

The document describes an entity to track appointments at a physiotherapy centre called LiveEasy, including 3 sample appointments with details like patient name, physiotherapist, date, time, and duration. It asks to create a table with appointment-specific attributes to store this data and define the data types of the attributes. A natural primary key for the table is suggested to be a combination of physiotherapist name, appointment date, and time since each appointment slot can only have one patient.

Uploaded by

mohammadiali360
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

Week 2

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:

Sam Huynh has an appointment with physiotherapist Bruno on Monday 17 April


2023 at 9am for 30 minutes. He is rehabilitating after a broken wrist.
Andrea Kostyanska has an appointment with physiotherapist Sylvia on Tuesday 18
April 2023 at 3:30pm for 30 minutes. She has a problem with her lumbar spine.
Philip Chen has an appointment with physiotherapist Bruno on Tuesday 18 April
2023 at 10:30pm for 40 minutes. He has a problem with his neck.

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:

Given_name str(6), Last_name str(10), Physio_name str(6), appnt_date Date

appnt_time Time, duration char(6)


Question 3

Make an appropriate natural primary key for this table. Justify your choice.

For example:

"We have to use attributes x, y and z as a composite key. If we use x and y,


appointments with ... (feature) cannot repeat. If we use x and z, appointments with ...
(feature) cannot repeat..."

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

We are still working on the scenario for EasyLife:

 Sam Huynh has an appointment with physiotherapist Bruno on Monday 17


April 2023 at 9am for 30 minutes. He is rehabilitating after a broken wrist.
 Andrea Kostyanska has an appointment with physiotherapist Sylvia on
Tuesday 18 April 2023 at 3:30pm for 30 minutes. She has a problem with her
lumbar spine.
 Philip Chen has an appointment with physiotherapist Bruno on Tuesday 18
April 2023 at 10:30pm for 40 minutes. He has a problem with his neck.
Create a UML diagram of your appointment table you made for last week's
tutorial, listing the attribute name in addition to the table name. There is no need
to add the types, but mark the primary key attributes. Upload both the data
table and the UML entity.

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:

A- is this one-to-one or one-to-many? 1:M

Are there mandatory relationships? No


 Define a suitable surrogate key for your new entity and make the necessary
adjustments to your appointment entity. Mark all primary and foreign keys in
all involved entities.

*******************************************************************
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.

The classes (or group sessions) have an instructor (physiotherapists Bruno or


Deepika), a start time, an end time and a focus (spine, lower leg, elbow, etc. that
determines the exercises).

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

You might also like