Module 2 Case Study
Module 2 Case Study
COMP2714 Module
Module 2 Case
2 Case Study
Study
Focus
The purpose of this task is to develop experience in producing and analysing Relational Mapping
based on an Entity Relationship diagram from a real-world scenario. This case study will also focus
on the ability to critique and analyse relational mapping and its effect on database implementation.
Task
Using the correspondence on the pages below, complete the following tasks. Please ask your tutors
for help if you require clarification on any aspects of the brief.
Note: Do NOT provide “missing a table” as a mistake. You must only identify mistakes in the
schema from the correspondence below. An example has been provided below, do not use this
example as one of your identified mistakes.
Example
Explanation If dob was included as part of the primary key for the User table, then two users
with the same id but a different dob could potentially exist in the database system.
This would then make it impossible to distinguish which user is allocated to a
specific trip.
2) Peter indicated they have been experiencing some issues with the backend of the payroll
system. However, they are unsure whether the issue exists with the UI system or if the
operations themselves are incorrect. For each database operation please answer the
following:
a. Does this operation violate an integrity constraint? (Y / N)
b. If yes, state the type of constraint violated
c. If yes, briefly describe how the constraint was violated (this must not exceed 100
words)
Hi Peter,
I hope you are having a nice weekend. I just wanted to update you regarding some progress which
has been made by our student teams for the Dirt Road Driving Industry project.
After analysing several students’ responses, I have attached the solution we feel would best suit
your current situation.
Please feel free to pass on any questions you or your team may have regarding the EER diagram.
We really hope this solution will work well for your business!
Your sincerely,
Elaine Smith
INFS1200 Student Representative
Hi Elaine,
On behalf of the Dirt Road Driving team we’d like to thank you and your students so much for your
help with this project. We really appreciate it!
If it’s alright, would we be able to run another thing by your student team? One of our junior system
administrators has begun to map the EER diagram into a relational schema for future
implementation. We’d love it if you or your team would be able to provide some feedback on the
work he has done so far. Please find below his relational mapping so far:
Tables:
User [id, dob, firstName, middleName, lastName]
Staff [id, dob, firstName, middleName, lastName]
Vehicles [vin, make, model]
EmergencyContact [name, userID, email, phone]
Trip [userID, driverID, vin, bookingTime, startTime, endTime]
UserRatesDriver [userID, driverID, rating]
Driver [id, licence]
4WD [vin, make, model, rideHeight, wheelType]
StaffPhone [id, phone]
Foreign Keys:
EmergencyContact.userID references User.id
Trip.userID references User.id
Trip.driverID references Staff.id
Trip.vin references Vehicles.vin
UserRatesDriver.userID references User.id
UserRatesDriver.driverID references Driver.id
Driver.id references Staff.id
StaffPhone.id references Staff.id
4WD.vin references Vehicles.vin
Kind regards,
Peter Thompson
Director of Innovation | Dirt Road Driving
Hi Elaine,
I hope you are having a nice week! I just wanted to discuss the possibility of receiving some student
support for another database related project our company is undertaking.
In order to streamline our payroll system, last year we hired an external developer to produce an
independent payroll system for our company. Recently, however, we have been experiencing issues
with the backend of the system and would like some help. Below is a basic schema of the system
and a sample of some of the data. In addition to this, I thought I’d just mention that in accordance
with company policy, the system does not allow administration staff to be project leaders.
Employee
id firstName lastName role
1919 Diluen Smith Developer
2014 Daniel Johnson Administration
2019 Annie Fang Developer
2020 Russell Turner Manager
Project
name description funding projectLeader
Website Setup Get a functional website setup 12000 2019
2020 Marketing Develop a marketing plan for 2020 40000 2020
TimeLog
employeeID projectName date hoursWorked approved
1919 Website Setup 2/1/2020 5 true
2014 Website Setup 1/1/2020 1 true
1919 Website Setup 2/2/2020 8 true
2019 Website Setup 2/2/2020 6 false
2020 2020 Marketing 2/1/2020 5 true
• Update the tuple (“Website Setup”, “Get a functional website setup”, 12000, 2019) to
(“Website Setup”, “Get a functional website setup”, 20000, 1919) in the relation “Project”
• Insert the tuple (2014, “Rebecca”, “Zhang”, “Administration”) in the relation “Employee”
• Update the tuple (2020, “2020 Marketing”, 2/1/2020, 5, true) to (1919, “Overall Marketing”,
2/1/2020, 5, true) in the relation “TimeLog”
• Delete the tuple (2014, “Daniel”, “Johnson”, “Administration”) in the relation “Employee”
• Insert the tuple (“Talent Recruitment Initiative”, “Get the best and brightest UQ graduates to
work for us!”, 10000, 2014) in the relation “Project”
Would you please be able to help us determine if these operations should be being processed by
the backend system and if not, what the error is?
Thank you again for your help on this project! We really appreciate it!
Kind regards,
Peter Thompson
Director of Innovation | Dirt Road Driving