0% found this document useful (0 votes)
729 views8 pages

ICT285 2022 TJ Assignment 1

This document provides instructions for Assignment 1 for the ICT285 Databases course. It outlines the submission requirements, marking breakdown by question, and details of 5 questions assessing skills in relational algebra, SQL queries, and database design. Students are asked to answer questions involving relational operations, SELECT queries on sample tables, SQL statements for data insertion and modification, and normalization of a database design. Late submissions will be penalized and plagiarism detection software may be used to check for original work.

Uploaded by

Alex Leow
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)
729 views8 pages

ICT285 2022 TJ Assignment 1

This document provides instructions for Assignment 1 for the ICT285 Databases course. It outlines the submission requirements, marking breakdown by question, and details of 5 questions assessing skills in relational algebra, SQL queries, and database design. Students are asked to answer questions involving relational operations, SELECT queries on sample tables, SQL statements for data insertion and modification, and normalization of a database design. Late submissions will be penalized and plagiarism detection software may be used to check for original work.

Uploaded by

Alex Leow
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/ 8

ICT285 Databases

January Trimester, 2022


Assignment 1

Individual Assignment (20% of the final mark for the unit)


Please check LMS for the due date

Submission Instructions:
Please submit a single word document using the link in Moodle. The due date is on LMS. You do
not need to include a separate cover sheet, but you should include your name and student number
as part of your document filename. Your name and student number should also be included within
the assignment document.

From the Unit Information Guide:


- It is your responsibility to keep a copy of any assignment handed in for assessment. Make
sure you keep a copy of the final (submitted) version as well as the backups you make as you
create the assignment. It is recommended that you also keep a hard copy of any written
assignments.
- It is especially important to maintain regular backups of all your practical work. You should
ensure you keep a separate backup on a thumb drive, cloud or similar. It is recommended
that you keep both a hard copy and an electronic copy.
- Late submission will be penalised at a rate of five marks (out of a possible 100) per day (or
part thereof). The deadline for submission will be specified in LMS and on the assignment.
Each assignment will have a final date by which the assignment will be accepted for marking.
Assignments not received by the final date WILL NOT BE MARKED and will be recorded as a
0.
- Under exceptional circumstances an extension can be provided. Extensions for assignment
submissions can only be granted if requested in advance of the due date for submission, and
with a good reason. Applications for extensions should be made to the Unit Coordinator, not
to the student's lecturer/tutor who is unable to grant extensions. If an extension is granted,
the Unit Coordinator will tell you at the time of granting it whether any penalty in marks will
apply to the submitted work.
- This unit uses software called Ouriginal when viewing work that you submit. Ouriginal is a
pattern-matching system designed to compare work submitted by students with other
sources from the internet, journals/periodicals, and previous submissions. Its primary
purpose is to detect any submitted work that is not original and provide a thorough
comparison between the submitted document and the original sources.
- The University takes academic integrity very seriously. More information about academic
integrity is contained within the Murdoch Academic Passport (MAP) unit
https://www.murdoch.edu.au/mymurdoch/support-advice/learning-study/murdoch-
academic-passport
This assignment requires you to answer several questions on relational database principles and SQL,
and to design a database based on a case study.
The assignment addresses the following learning outcomes for the unit:
1. Apply your knowledge of relational database principles and theory to create effective and
efficient database designs
2. Define, create and manage relational database systems using SQL

Marks are distributed as follows:

Question 1: Relational algebra 20


Question 2: SQL Select queries 20
Question 3: Further SQL 15
Question 4: Normalisation 20
Question 5: Conceptual design 25
Total 100
Question 1: Relational algebra (20 marks)
You are working with a database that stores information about suppliers, parts and projects. The
Supply relation records instances of a Supplier supplying a Part for a Project.
The schema for the database used in this question is as follows: (note that primary keys are shown
underlined, foreign keys in bold).
SUPPLIER (SNo, SupplierName, City)
PART (PNo, PartName, Weight)
PROJECT (JobNo, JobName, StartYear, Country)
SUPPLY (SNo, PNo, JobNo, Quantity)
Provide relational algebra (NOT SQL) queries to find the following information. Each question is
worth 2 marks.
NOTE:
 You can use the symbols , , etc or the words ‘PROJECT’, ‘RESTRICT’ etc as you prefer.
 You do not need to try to make efficient queries – just correct ones.
 Where you use a join, always show the join condition.

a. List the quantity of parts supplied on JobNo 4745.


b. List the weight of the Part named “Left-handed screwdriver”.
c. List the Project name and Part name of any Parts where fewer than 500 of the part has been
supplied to a particular project.
d. List the name of any Suppliers who have supplied Parts to the Project called “New Academic
Building” or to the Project called “Removal of Asbestos”.
e. List the name of any Suppliers who have supplied Parts to the Project called “New Academic
Building” and to the Project called “Removal of Asbestos”.
f. List the names of Suppliers who have supplied the Part with the name “Fufful Valve”.
g. List the names of Projects that have had Parts supplied by “Insightly Co#” or a Supplier located in
Dubai.
h. List the details of any supplier who has supplied parts to a project that stared in 2020 and (the
project is) located in Singapore.
i. List the name of any part that was not used on a project that commenced in 2020.
j. List the name of any part that has been supplied to all projects that commenced in 2020.
Question 2: SQL – SELECT queries (20 marks)
Provide SQL queries and the result tables for the following (20 marks):
Please ensure that you include the result table as well as your SQL; you can copy and paste this from
either your ssh client or SQL Developer. Each query is worth 2 marks. These tables exist in arion and
are owned by the user dtoohey. You may, if you wish, create your own copies of the tables under
your own account. If you do so, you should ensure that you copy the sample data in dtoohey’s tables.
These queries are based on the View Ridge Gallery database you have been using in the Lab sessions.
Please see Chapters 6 and 7 of Kroenke for background to the case and table structures.
Marks are allocated not only for correct answers, but also for best practice in the creation of the
queries.
a. List the details of any works of art (including the Artist who created the work) that have
more than three copies recorded in the database (i.e., a work that is listed in the database
three times).
b. List the details of any work of art (including the Artist who created the work) that has a
Surrealist style.
c. List the details of the works of art (including the Artist who created the work, and the
acquisition and asking price details) currently held in the gallery (i.e., works of art that have
not been sold).
d. List the sales for each customer (i.e., when a customer purchases a work of art from the
Gallery, a transaction line is created. For a purchase, there will be values in the DateSold and
SalesPrice columns). The query should include the details of the customer, the transaction
and the work of art purchased.
e. List the names of the deceased artists and the number of years of age they were when they
died (for example, an artist born in 1950 and deceased in 2001 has an age of 51).
f. The sum of the acquisition price of works of art for each year (for example, if there were two
works of art purchased for $1500 and $1000 in 2019, and one work of art purchased for
$500 in 2020, then the sums would be $2500 and $500, for 2019 and 2020 respectively).
g. Calculate the profit made on works of art that have been sold (i.e., the profit/loss on an
individual work of art is the difference between the acquisition price and the sales price).
h. Which artist has had the most works of art sold, and how many of the artist’s works have
been sold?
i. Sales of which artist’s works have resulted in the highest average profit (i.e., the average of
the profits made on each sale of works by an artist), and what is that amount?
j. Customer name of any customers who have an interest in ALL artists.
Question 3: Further SQL (15 marks)
a. Provide ALL of the SQL statements required to insert the details of the following: A
customer, John Smith, of 47 Moodle Street, Highwater, WA, 6709, Australia (email:
[email protected]) has sold a work of art called “Gorillas in the Mist” by the renowned
French artist, Gallic Symbol (b. 1972) to the Gallery (i.e., the Gallery purchased it from him).
It is a unique Watercolour on Paper and is 45 * 35cm signed by the Artist. The purchase price
was $4600 and the transaction took place on 27 th July 2020. (7 marks)

b. You have been given the following specifications of a simple database for a netball
association that keeps record of players, teams and matches.

Player Match
Team
PK PlayerID PK MatchID
PK TeamID
FirstName Date
LastName TeamName Result
DateOfBirth Grade FK1 HomeTeamID(FK)
FK1 TeamID AwayTeamID(FK)

Give the SQL to create the Match table. You may assume that the Player and Team tables
have already been created, and that the PlayerID and TeamID colums are of the data type
VARCHAR2(5). The result of the match refers to the result for the HomeTeam and can be
only W, L or D (win, lose or draw). (5 marks)
c. Your match table must also include record the scores of both teams in the match. Provide
the SQL to amend the original table design to allow for this change in requirement. It is
most unlikely (impossible) that a team would ever score more than 999 goals in a match. (3
marks)
Question 4: Normalisation (20 marks)
The following question is based upon the Patient-Treatment relation which records the details of
transactions occurring in a medical surgery. You may assume the data are representative.

PATIENT ID PATIENT PATIENT CONSULT ITEM ITEM FEE PROVIDER DOCTOR


NAME DOB DATE NUMBER DESCRIPTION NUMBER NAME
437 REARDO 4/08/1989 19/7/202 A012 Standard 56 S55768 Leahy
N 0
437 REARDO 4/08/1989 20/7/202 A012 Standard 56 D42433 Meuller
N 0
562 BILSTEIN 12/05/2001 20/7/202 A013 Short 35 S55768 Leahy
0
361 WILSON 13/08/1997 20/7/202 A014 Long 75 S55768 Leahy
0
895 LEMOS 13/10/1952 20/7/202 A013 Short 35 D42433 Meuller
0
895 LEMOS 13/10/1952 20/7/202 A014 Long 75 D42433 Meuller
0
678 MORTAL 27/02/1969 20/7/202 A014 Long 75 S55768 Leahy
0
432 SOAPIER 1/08/1976 21/7/202 A012 Standard 56 S55768 Leahy
0

You have been asked to design a relational database for this system. You know that there are
problems with the current design and that it will need to be modified in order to work effectively.
You need to write a 1-2 page report that addresses the following:
1. What are the specific problems associated with the current design and why do they arise?
2. How would you change the current design and how does your new design address the
problems you have identified with the current design.

In order to receive high marks for this question, you will need to demonstrate an understanding of
the theories discussed in Topics 1, 2 and 3, how they apply to this problem, and justify the changes
you are making to the system. Simply providing the amended design (even if it is correct) will only
attract a small percentage of the marks for this question.
Question 5: Conceptual Design (25 marks)
Terrific Airlines is a newly formed airline aimed at the burgeoning market of clandestine travellers
(fugitives, spies, confidence tricksters, scoundrels, deadbeats, cheating spouses, politicians, etc.).
Terrific Airlines needs a database to track flights, customers, fares, airplane performance, and
personnel assignment. Since Terrific Airlines is promoted as a “…fast way out of town,” individual
seats are not assigned, and flights of other carriers are not tracked. More specific notes about
Terrific Airlines are listed below:
 Information about a route includes its unique number, its origin, its destination, and estimated
departure and arrival times. To reduce costs, Terrific Airlines only has non-stop flights with a
single origin and destination.
 Flights are scheduled for a route on one or more dates with an airplane and a crew assigned to
each flight, and the remaining capacity (seats not taken) noted. In a crew assignment, the
employee number and the role are noted. It is a government requirement that the number of
hours that flight crew (i.e., pilots, co-pilots, engineers) are in flight must be recorded. There is
no such requirement for Non-flight crew (e.g., attendants).
 Airplanes have a unique serial number, a model, a capacity, and a next-scheduled-
maintenance date.
 The maintenance record of an airplane includes a unique maintenance number, a date, a
description, the serial number of the plane, and the employee responsible for the repairs.
 Employees have a unique employee number, a name, a phone, and a job title.
 Customers have a unique customer number, a phone number, and a name (it may or may not
be their own).
 A record is maintained of flight reservations including a unique reservation number, a flight
number, a customer number, a date, a fare, and the payment method (usually cash but
occasionally some else’s cheque or credit card). If the payment is by credit card, a credit card
number and an expiration date are part of the reservation record.
What you have to do:
1. Create an entity-relationship diagram showing the data requirements of the system. Your
ERD should be able to be implemented in a relational DBMS. You should use the ERD
notation we have been using in the lectures, and should include a legend to explain the
notation. You should include attributes in the ERD. The use of a drawing tool such as Visio
will make this task easier. However, whichever tool you use, you must copy and paste the
ERD into a word-processed document. This is because your tutor might not have access to
the tools you have used. Please note that hand-drawn ERDs are not acceptable.
2. List and explain any assumptions you have made in creating the data model.

Some important things to note:


1. Part of understanding a system at sufficient enough detail to model well, involves asking
appropriate questions. If you are not sure about some detail of the case study, you should
ask on the Discussion Forum in LMS.
2. The University email server strips out any Visio (.vsd) files that are sent; even if they are
included in a zip archive. So, if you want to send a draft of your design to your lecturer by
email, you will need to change the extension to something other than .vsd (.blah works well)
or paste the diagram into a word document.
3. Marks will be allocated to each of the following functional areas:
a. Legend
b. Entities
c. Have you included all required entities in the design?
d. Have you included specialisation hierarchies where appropriate?
e. Relationships
i. Have you designed relationships between the entities that will support the
functional requirements?
ii. Are your relationships correctly annotated?
f. Will the overall design support the enterprise requirements?
As Assignment 2 will require you to implement the Terrific Airlines database, you will need to take
into account the feedback you receive on your conceptual design when commencing your logical and
physical designs.

You might also like