COMP 1845 Coursework Brief Part1 and Part2 2023-24 Term 1
COMP 1845 Coursework Brief Part1 and Part2 2023-24 Term 1
Plagiarism
Is presenting somebody else’s work as your own. It includes copying information directly from the Web
or books without referencing the material; submitting joint coursework as an individual effort; copying
another student’s coursework; stealing or buying coursework from someone else and submitting it as
your own work. Suspected plagiarism will be investigated and if found to have occurred will be dealt
with according to the procedures set down by the University. All material copied or amended from any
source (e.g., internet, books) must be referenced correctly according to the reference style you are using.
Your work will be submitted for electronic plagiarism checking. Any attempt to bypass our plagiarism
detection systems will be treated as a severe Assessment Offence.
The A1 rating of this assignment is 2.
1
• Your work will be marked online and comments on your work and a provisional grade will be available
from the Coursework page. The grade will be made available in the portal.
• You must NOT submit or mail any coursework to your or any tutor.
• All coursework must be submitted on the COMP1845 Moodle page.
Detailed Specification.
This coursework is worth 100% of the total marks for this course. This coursework must be completed
individually. Please read this entire specification very carefully so that you are fully aware of the
requirements.
The University website has details of the current Coursework Regulations, including penalties for late
submission, procedures for Extenuating Circumstances, and penalties for Assessment Offences.
This coursework must be completed individually and made up of two parts, Part 1 and Part 2.
1
a. Demonstrate evidence of requirements elicitations to obtain some of the relevant
requirements, you should show clearly the scenario analysis and identify entities from the
scenario for the database design. [15 marks]
From this scenario, I decided to create a survey and do an interview to collect information.
For example, I am going to interview a random customer to get an information about them
we can analysis and identify entities and their attribute for designing the database:
Entity: Car
Attributes:
• Car ID
• Supplier ID
• Car name
• Model number
• Description
• Make
• Manufacturing date
• Type (new or used)
• Quantity
• Price
Entity: Supplier
• Attributes:
• Supplier ID
• Supplier Name
• Contact Number
• Email
• Address
1
• Supplier Type (customer supplier or dealer supplier)
• Company Name
• Additional notes (e.g., reputation, duration of cooperation, pricing policy...)
b. Draw and design a full-fledged ER diagram from the above scenario with the physical
properties of the entities like relationships, datatypes, cardinality etc from the scenario. [10
marks]
c. Demonstrating evidence of normalization to 3rd Normal from the above scenario. [10 marks]
d. Demonstrating the implementations by creating tables and other necessary database objects
[10 marks]
e. Demonstrate the insertion of more than ten data into each table in the database
[5 marks]
f. To show that your database is functional, you must state two SQL queries that involved
joining two or more of your tables and execute them.
[10 marks]
The answers to Part 1 (a to g) must be evidenced with clear screenshots annotation and explanations of
each answer where necessary.
You have been provided with a database called “AdventureWorks ”. Please attach this database on the
MySQL (DBMS) and use it to answer the following questions.
a. write a query in SQL to return all rows and columns from the employee table in the
Adventureworks database. Sort the result set in ascending order on jobtitle.
1
b. write a query in SQL to return all rows and columns from the person table using table aliasing in
the Adventureworks database. Sort the output in ascending order on lastname.
1
c. write a query in SQL to return all rows and a subset of the columns (FirstName, LastName,
businessentityid) from the person table in the AdventureWorks database. The third column
heading is renamed to Employee_id. Arranged the output in ascending order by lastname.
1
d. write a query in SQL to return only the rows for product that have a sellstartdate that is not NULL
and a productline of 'T'. Return productid, productnumber, and name. Arranged the output in
ascending order on name.
1
e. write a query in SQL to return all rows from the salesorderheader table in Adventureworks
database and calculate the percentage of tax on the subtotal have decided. Return salesorderid,
customerid, orderdate, subtotal, percentage of tax column. Arranged the result set in ascending
order on subtotal.
1
f. write a query in SQL to create a list of unique jobtitles in the employee table in Adventureworks
database. Return jobtitle column and arranged the resultset in ascending order.
1
g. write a query in SQL to calculate the total freight paid by each customer. Return customerid and
total freight. Sort the output in ascending order on customerid.
h. write a query in SQL to find the average and the sum of the subtotal for every customer. Return
customerid, average and sum of the subtotal. Grouped the result on customerid and salespersonid.
Sort the result on customerid column in descending order.
1
For each answer in Part 2 (a to h), you must show the screenshot of each query and the result of executing
the queries.
End: