0% found this document useful (0 votes)
2 views6 pages

Module 2 Case Study

This document outlines a case study for a module focused on relational mapping based on an Entity Relationship diagram. It includes tasks for analyzing mistakes in a relational schema, creating a relational mapping from an EER diagram, and addressing issues with a payroll system's backend. Correspondence between students and a company illustrates the context and requirements for the project.

Uploaded by

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

Module 2 Case Study

This document outlines a case study for a module focused on relational mapping based on an Entity Relationship diagram. It includes tasks for analyzing mistakes in a relational schema, creating a relational mapping from an EER diagram, and addressing issues with a payroll system's backend. Correspondence between students and a company illustrates the context and requirements for the project.

Uploaded by

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

INFS1200/7900

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.

Section A – Analysis and Discussion


Please read Correspondence 1 and Correspondence 2 before attempting this section.
The incomplete relational schema mapping produced by the junior system administrator contains
several mistakes which could impact the functionality of this database system. Please find the five
mistakes in the schema provided and for each:
1) Identify the mistake
2) Provide the correct mapping/foreign key constraint
3) Explain briefly how this error would negatively impact useability of the database (this must
not exceed 125 words)

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

Mistake User [id, dob, firstName, middleName, lastName]

Correction User [id, dob, firstName, middleName, lastName]

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.

Section B – EER Diagram to Relational Mapping


Please read Correspondence 1 before attempting this section.
Using the EER diagram provided in Correspondence 1, please provide the relational mapping for
the entire database system. Note: You do not need to show each step in the mapping process,
just providing the final database schema and foreign keys is sufficient.

The University of Queensland ABN: 63 942 912 684


Brisbane QLD 4072 Australia CRICOS PROVIDER NUMBER 00025B
Section C – Relational Model and Database Systems
Please read Correspondence 3 before attempting this section.
In Correspondence 3, Peter introduced the relational schema for the backend system being used to
manage Dirt Road Driving’s payroll. Using the schema and sample data provided in that email
please answer the following questions.

1) Give an example of:


a. a superkey
b. a minimal key
c. a foreign key

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)

3) Give an example of a database operations which:


a. Would result in a domain constraint violation
b. Would result in a referential integrity constraint violation
Note: You must provide original examples, not copied identically from the case
study.

CRICOS Provider No: 00025B 2


Correspondence
Correspondence 1:
From: [email protected]
To: [email protected]
Date: 5/4/2020 02:58 PM
Subject: RE: Student Support for Industry Project

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

CRICOS Provider No: 00025B 3


Correspondence 2:
From: [email protected]
To: [email protected]
Date: 11/4/2020 09:12 AM
Subject: RE: Student Support for Industry Project

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

Thank you and I look forward to your response.

Kind regards,
Peter Thompson
Director of Innovation | Dirt Road Driving

CRICOS Provider No: 00025B 4


Correspondence 3:
From: [email protected]
To: [email protected]
Date: 15/4/2020 08:09 PM
Subject: RE: Student Support for Industry Project

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]


Project [name, description, funding, projectLeader]
TimeLog [employeeID, projectName, date, hoursWorked, approved]

Project.projectLeader references Employee.id


TimeLog.employeeID references Employee.id
TimeLog.projectName references Project.name

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

SEE NEXT PAGE FOR CONTINUED CORRESPONDENCE

CRICOS Provider No: 00025B 5


We have recently been having some issues with our UI system which allows us to interact with the
database. The following commands have been returning errors; however, we are unsure whether
the issue exists with the UI system or if the commands themselves are incorrect.

• 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”

• Insert the tuple (, “Test”, “Test”, “Test”) in the relation “Employee”

• 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

CRICOS Provider No: 00025B 6

You might also like