diff_months: 11

COIT20247 Database Design and Development (T1 2022)

Download Solution Now
Added on: 2024-11-13 02:30:09
Order Code: SA Student Ritik IT Computer Science Assignment(4_24_41689_649)
Question Task Id: 505513

COIT20247 Database Design and Development (T1 2022)

Assessment item 2Assignment 2

Due date 11:59pm on Friday of Week 10

Weighting 35%

Length Not applicable

Objectives

This assessment item relates to the unit learning outcomes numbers 1, 2 and 3 as stated in the unit profile.

Introduction

The sample solution of assignment 1 will be released on the unit website approximately two(2) weeks after the assignment 1 due date. You must use that sample solution of assignment 1 only for the following tasks:

Assessment task

ER Mapping and Normalization

Map the ER diagram, from the sample solution, into a set of relations in at least Third Normal Form (3NF). You must ensure that your relations meet 3NF. There is no need to show your working. (Microsoft Word Document submission)

Select any two of your relations from the previous step (1a), and perform the following for each of those two relations: (Microsoft Word Document submission)

List all the functional dependencies exist in both the relations.

Demonstrate that the relation meets Third Normal Form (3NF) for both your selected relations.

For your help, an example for a Student relation in 3NF along with the justification has been provided below. You can choose to use this format.

STUDENT (StudentID, Name, Address, DateOfBirth)

The primary key is StudentID which identifies a student. There will be one student name per Student ID because only one name is recorded for each student. Even though a student may have multiple addresses (e.g. a home address and a work address), the case study states that there is a need to record the home address only and hence there will be only one address for each student. There will be only one date of birth for each student. Thus, there are no repeating groups. Hence, this relation is in 1NF.

The primary key is StudentID. This is the only candidate key since Name is not guaranteed to be unique (two different students may have the same name). Address is also not guaranteed to be unique. This means that Student ID functionally determines every other attribute in the table. There is a single valued simple candidate key (StudentId) and therefore no partial dependencies are possible. Hence, the relation is in 2NF.

Name cannot be used to functionally determine any other attribute in the table since two different students may have the same name: likewise for address and date of birth. Therefore, there are no transitive dependencies in the table. Therefore, it meets the requirements of first, second and third normal form.

Use MySQL Workbench to create the logical database modelBased on the solution of assignment 1 released on the unit website on Monday, April 22, 2024, use MySQL Workbench 8.0 CE to create a logical database model with the relations as per the previous section-1 (E-R mapping and normalization). You need to specify the primary keys, foreign keys, and create relationships as appropriate in the E-R diagram. Save the file as CQPC_ERD.mwbYou should use the model solution of Assignment 1 to build the physical implementation.

Relational database implementation using MySQL Server

Use MySQL Server to perform the physical implementation of the designed database from the above logical model and export the database file as CQPC_db.sql. In implementing the ER model provided, you must complete the following tasks:

Create all the relations in a MySQL database. Consider each attribute in every table and make appropriate choices regarding data types & sizes, Not Null, Indexing, Auto Increment, Primary Keys and Foreign Key settings. Your choices should be appropriate for each attribute and should support data integrity.

Indexing can speed up search for particular tables or queries. Review the guideline given in the textbook regarding set-up of index. You should at least ensure the last name and phone number attributes in the Customer table to be indexed.

Populate the database with sample data of your own. You must include sufficient sample data to test your queries and report. Please note that the expected result of query questions as below should depend on the actual sample data populated.

You can also implement your database using MySQL Workbench or via Command Line Client. Either option is ok. (Note: Week 6 lecture and tutorial provide the instructions how to export a MySQL database file)

Stored procedures

You are required to write two stored procedures as mentioned below:

Write a stored procedure that can be used to show the details of customer whose name, either in full or in part, is passed into the procedure through a parameter.

Write a stored procedure that has two parameters. The first parameter is used to receive the ParcelID value. When the stored procedure is called, the value for the first parameter will be passed to the procedure. The procedure will find out the relevant delivery date of the parcel and assign it to the second parameter so that the second parameter can be used to display the Employee that delivered the parcel after the completion of the procedure.

Information requests

Create queries to answer the following information requests. You should type the query codes manually using SQL view/editor under MySQL Server.

The marking process of the queries for information requests may also consider the effectiveness of your SQL statements that have been used in the queries. It is important that your SQL statement must reflect the correct business logic & SQL syntax. (Use enough sample data so that the output is produced by each and every query. The expected result is under each question. Your result should be in a similar format but may have a different content, depending on the data you populated in your database). Under MySQL Server, save each query question SQL statement as a file such as q1.sql, q2.sql, , q5.sql

Query 1:

Who are the non-standard contract customers? List the customers that include their First name, Last name, Contract start date, Contract end date and Discount percentage.

Query 2:

How many parcels have been delivered by each employee? Show their Full Name, the number of delivery attempts. Order the list so that the delivery employee who has delivered the most parcels appears first.

Query 3:

List the details of deliveries attempted by employees for the same parcel more than once for the last 2 months and if delivered in the second attempt. The details should include the employees name, delivery date, receiver name, receiver address.

Query 4:

Which parcels were lost or damaged and not able to be delivered second time (first time was attempted) in the last 6 months? Show the parcel ID, employee name, sender (or customer) last name, receiver name, receiver addressQuery 5:

Find the details of the customer that have received discounts along with the number of parcels and display the details ordered by the of number of parcels in ascending order.

Implementation Report

You must also submit a short implementation report describing the following:

any interesting or difficult aspect that you faced during the implementation of this database.

methodologies used to solve the super type and sub type relationship to form appropriate relations.

methodology used for solving query 2 or query 3.

Copy and paste the screen shots showing the outputs produced by each of the queries (q1 to q5) along with the respective SQL query.

What you should submit

Create a zip file named COIT20247_Ass2.zip and submit via moodle assignment 2 links. The zip file should contain the following:

MySQL Workbench logical database model file CQPC_ERD.mwbMySQL database script file CQPC_DB.sql containing:

Creation of the database

Create table SQL statements (together with all required attributes)

Tables with sample data with insert SQL statements

Create indexes.

The 2 requested stored procedures.

The files of answering five information request questions (q1.sql, q2.sql, ., q5.sql)

A Microsoft Word document containing:

A set of relations mapped from E-R diagram (3NF)

Two relations with functional dependencies and demonstration of normalization

Implementation report

Your document should contain appropriate identification information (your student number, name, unit number, etc.) and should contain the relevant headings for each section.

Important points

You must work individually on this assignment.

The model solution to this assignment will be released approximately two (2) weeks after the due date.

Assignments that are submitted after the release of the model solution will receive zero marks.

You must state in your word document the details of all materials and sources that you used to complete this assignment. This may be as simple as 'This assignment was completed using only the COIT 20247-unit materials'.

Extension requests (by filling in an online form) should be submitted before the assignment due date.

Before submitting your assignment, review the marking criteria provided on the last page of this document. Ensure that all the criteria are addressed in your submission.

Penalties related to late submission and plagiarism will be applied as per university policy.

COIT20247 Assignment 2 Marking Criteria

  • Uploaded By : Pooja Dhaka
  • Posted on : November 13th, 2024
  • Downloads : 0
  • Views : 153

Download Solution Now

Can't find what you're looking for?

Whatsapp Tap to ChatGet instant assistance

Choose a Plan

Premium

80 USD
  • All in Gold, plus:
  • 30-minute live one-to-one session with an expert
    • Understanding Marking Rubric
    • Understanding task requirements
    • Structuring & Formatting
    • Referencing & Citing
Most
Popular

Gold

30 50 USD
  • Get the Full Used Solution
    (Solution is already submitted and 100% plagiarised.
    Can only be used for reference purposes)
Save 33%

Silver

20 USD
  • Journals
  • Peer-Reviewed Articles
  • Books
  • Various other Data Sources – ProQuest, Informit, Scopus, Academic Search Complete, EBSCO, Exerpta Medica Database, and more