How many bookings have been processed by each employee

Assignment Help Database Management System
Reference no: EM133508566

Database Design and Development

Assessment task

ER Mapping and Normalization

a) 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. You must specify the primary key, and foreign key (if any) for each relation.
b) Select any two of your relations from the previous step (1a), and perform the following for each of those two relations:
• List all the functional dependencies exist in the relation.
• Demonstrate that the relation meets Third Normal Form (3NF).
For your help, an example for a Student relation's 3NF justification has been provided below: STUDENT (StudentID, Name, Address, DateOfBirth)
i. 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.

ii. 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.

iii. 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.

2 Use MySQL Workbench to create the logical database model

Consider the E-R model on the QOH car hire activity as the solution of assignment 1 released, Use MySQL Workbench 8.0 CE to create a logical database model with the relations as in Part 1(E-R mapping and normalization), including specifying the primary keys, foreign keys, creating relationships as appropriate, and creating the E-R diagram. Save the file as qoh.mwb

3 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 qoh.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, null allowed or not. Your choices should be appropriate for each attribute and should support data integrity.
• Indexing can speed up the search for particular tables or queries. Review the guideline given in the textbook regarding the setup of the index. You should at least ensure the last name and phone attributes in the Customer table to be indexed, and the location name attribute in the Location table to be indexed.
• Populate the database with sample data of your own. You must include sufficient sample data to test your queries.

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

Data integrity
You are required to implement a constraint of data integrity to enforce the requirement that the rental end date is later than the rental start date. You can save this constraint as the file MyIntegrityConstraint.sql

Stored procedure
In databases, a stored procedure is a piece of prepared SQL code that you can save, execute and reuse at any time. You are required to write a stored procedure as specified below:

Write a stored procedure that can be used to show the rental details that the pick-up location is from Brisbane airport. When the procedure is executed, the details including the contents of the customer name, pick-up location, drop-off location, start date, end date, and cost are displayed. The following image is a sample result.

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 different content, depending on the data you populated in your database. Your result is not necessarily the same as below. Under MySQL Server, save each query question SQL statement as a file such as q1.sql,
..., q6.sql.

1. Which cars have never been rented out? List the details that include the car's registration number, make and model, number of seats, manufactured year, category as well as the daily hire rate.

2. How many bookings have been processed by each employee? Show the employee's name, working location, and the number of bookings processed. Order the list so that the employee who processed the most bookings appears first.

3. Find out the customers who made bookings for a minivan. This includes the customer's name, phone, and the booking date.

4. Find out the rental activities that have the most expensive cost. This includes the customer names, car registration numbers, make and models, start hire dates, end hire dates, and the cost.

5. Show details of all rental activities after 1 July 2023. These details include the customer name, pick-up location, drop-off location, start hire date, end hire date, and cost.

6. Which car(s) has/have the most rentals? Show the car's registration number, make and model, category, and the number of rentals.

Report (optional)
MySQL Server doesn't come with a native Reporting tool. But it is very easy to create a Report by exporting the data source of a MySQL database to a third-party utility program (such as phpMyAdmin, dbForgeStudio, and Navicat etc.) or Microsoft Excel. As an exercise, we ask you to export the data source to Excel to create a simple report object showing the details of each flight between Rockhampton and Brisbane. When the data source from MySQL exporting to Excel, simply call and execute the stored procedure (with a parameter as the pre-set input value) as defined in the relational database implementation section on a sheet of Excel, then import the data (due to the result of executing the stored procedure) to Excel. In addition, add a report header to the Excel sheet. (Note: when you install MySQL Server, if you have not installed the component named mysql-for-excel-1.3.8, you need to download and install it separately. The installer is also available on the moodle course website)
(Note: This task is optional. No mark allocated)

Implementation Report

You must also provide a short implementation report describing your experiences with this assignment. You may discuss any of the following:

1. Any two interesting things/procedures you learned by doing this assignment.

2. Anyone requirement of the assignment that was relatively difficult/complex to solve but successfully completed by you.
Use the implementation report to demonstrate that you have thought carefully about the issues that arise when implementing a relational database.

What you should submit
Place the following files in a zip file named Ass2.zip and submit via moodle assignment 2 link.
1. MySQL Workbench logical database model file - qoh.mwb
2. MySQL database file - qoh.sql containing:
• Create table SQL statements
• Tables with sample data with insert SQL statements
• Create indexes
• The required stored procedure
3. The files of answering six information request questions (q1.sql,...., q6.sql)
4. Data integrity implementation file - MyIntegrityConstraint.sql
5. A Microsoft Word document containing:
• A set of relations mapped from E-R diagram (3NF)
• Two relations with functional dependencies and demonstration of normalization
• Six SQL questions solutions (i.e. SQL statements for these 6 questions), and the stored procedure SQL code
• 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.

Reference no: EM133508566

Questions Cloud

What tools or applications can we implement or adopt to help : It is alarming that organizations are collecting your clicks and browsing history and running analytics on the probability of you buying from one
Discuss the revised learned helplessness theory : Discuss the revised learned helplessness theory and give examples of internal, global, and stable attributions that could contribute to depression.
Systems change quality improvement project : Lists the Demographics in a systems change Quality improvement project? university of south Alabama.
What are the drawbacks and benefits associated with moving : What are the drawbacks and benefits associated with moving business unit HQ and corporate HQ to another country?
How many bookings have been processed by each employee : COIT20247 Database Design and Development, Central Queensland University - How many bookings have been processed by each employee? Show the employee's name
Level flowchart for the process of picking-packing : Draft a high-level flowchart for the process of picking, packing, and shipping an order from an Amazon Fulfillment Centre. A
How to apply ethical perspectives, theories, concepts : How to apply ethical perspectives, theories, concepts, and ideas (such as utilitarianism, deontology, ethics of care, theories of rights, perspectives
How do you think we could measure success with respect : Select one of the business aims of the supermarket chain and address two of the questions outlined in the "Business Understanding" phase.
Explain what theemployer should do to comply with the law : The employer is concerned that the employee may bephysically unfit to perform the job and could injure himself further. Explain what theemployer should do

Reviews

Write a Review

Database Management System Questions & Answers

  Knowledge and data warehousing

Design a dimensional model for analysing Purchases for Adventure Works Cycles and implement it as cubes using SQL Server Analysis Services. The AdventureWorks OLTP sample database is the data source for you BI analysis.

  Design a database schema

Design a Database schema

  Entity-relationship diagram

Create an entity-relationship diagram and design accompanying table layout using sound relational modeling practices and concepts.

  Implement a database of courses and students for a school

Implement a database of courses and students for a school.

  Prepare the e-r diagram for the movie database

Energy in the home, personal energy use and home energy efficiency and Efficient use of ‘waste' heat and renewable heat sources

  Design relation schemas for the entire database

Design relation schemas for the entire database.

  Prepare the relational schema for database

Prepare the relational schema for database

  Data modeling and normalization

Data Modeling and Normalization

  Use cases perform a requirements analysis for the case study

Use Cases Perform a requirements analysis for the Case Study

  Knowledge and data warehousing

Knowledge and Data Warehousing

  Stack and queue data structure

Identify and explain the differences between a stack and a queue data structure

  Practice on topic of normalization

Practice on topic of Normalization

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd