Question
Coursework 1 The Global Motoring and Driving School was established in a makeshift kiosk at Lapaz in 2007. The School has since then grown steadily
Coursework 1
The Global Motoring and Driving School was established in a makeshift kiosk at Lapaz in 2007. The School has since then grown steadily and now has several plush offices in most of the major towns in Accra. The School is now so large that the communication and sharing of information between offices is poor, hence more administrative staff are being employed to cope with the ever- increasing amount of paperwork. The Director of the School, Dr. Kofi Nkansah, feels that too many mistakes are being made and that the success of the School will be short-lived if nothing is done to remedy the situation. Understanding that a database could help in part solve the problem of increased paperwork; he has approached you to draw up the logical design of his intended database to support the running of the Global Motoring and Driving School.
To help understand the workings of the school, Dr. Kofi Nkansah has provided you with the following brief description of how the Global Motoring and Driving School operates.
Each office has a Manager [who tends to also be a Senior Instructor], several Senior Instructors, Instructors, and administrative staff. The Manager is responsible for the day- to-day running of the office. Clients must first register at an office and this requires that they complete an application form, which records their personal details. Before the first lesson, a client is requested to attend an interview with an Instructor to assess the needs of the client and to ensure that the client holds a valid provisional driving license. A client is free to ask for a particular Instructor or to request that an Instructor to be changed at any stage throughout the process of learning to drive. After the interview, the first lesson is booked. A client may request individual lessons or book a block of lessons for a reduced fee. An individual lesson is for one hour, which begins and ends at the office. A lesson is with a particular Instructor in a particular car at a given time. Lessons can start as early
Page | 1
as 8am and as late as 6:30pm. After each lesson, the Instructor records the progress made by the client and notes the mileage used during the lesson. The School has a pool of cars, which are adapted for the purposes of teaching. Each Instructor is allocated to a particular car. As well as teaching, the Instructors are free to use the cars for personal use. The cars are inspected at regular intervals for faults. Once ready, a client applies for a driving test date. To obtain a full driving license the client must pass both the practical and theoretical parts of the test. It is the responsibility of the Instructor to ensure that the client is best prepared for all parts of the test. The Instructor is not responsible for testing the client and is not in the car during the test but should be available to drop off and pick up the client before and after the test at the DVLA Testing Centre. If a client fails to pass, the Instructor must record the reasons for the failure.
REQUIREMENTS:
(i) Using an appropriate CASE tool (e.g. Erwin data modeler, Microsoft Visio or ER Assistant) create an ERD using crow’s foot notation for The Global Motoring and Driving School specifying the key attributes of each entity, and the structural constraints on each association. (You may note any unspecified requirements from the scenario, and make appropriate assumptions to make the specification complete). [30 marks]
(ii) Describe the entity integrity & referential integrity rules in your data model. [10 marks]
(iii) At a car garage, a customer can place an order for a car in three modes, via telephone, web page or in person. Before an order can be accepted and processed, sales staff must verify all information to be accurate. Based on the scenario, the necessary data requirement has been organized below. Select a primary key and translate the data below to the third normal form explaining each form. [10 marks]
Order (orderNumber, orderDate, customerName, orderCreationMethodName, verifyingEmployeeName, totalSalesAmount, carSerialNumber, carColourNames, carMakeModelYearNote)
Coursework 2
Question 2
(A) (i)Using an SQL data definition language, write a query to transform all entities in
your ERD in coursework 1 into relational database tables.
(ii) Create a view that lists students with their corresponding department names.
(iii) Modify client class and add a new attribute JOB.
(iv) Modify staff class, add a new attribute salary. Specify a constraint on staff salary
to ensure it is always positive
(B) Implement a database application for the driving school using MySQL RDBMS and answer the following queries.
(i)Create a Cartesian product by using two tables. How many turples are in individual tables and how many turples are in the result set respectively
(ii)How many staff is hired currently and what is their average salary. What is the smallest and biggest monthly salary? How much must be paid each month for the salaries?
(iii)List staff with the vehicles they inspect or vehicles they manage under their offices.
(iv)List all client that took driving test in Accra center but came from Tema
(v)Generate a table that lists all vehicles that has been assigned to a lesson and all clients who have enrolled for that lesson.
(vi)Create a readable view that contains all data.
(vii)Select the first 10 toyota avensis vehicles for inspection.
(viii)Select all clients who have their first name as the first name of the staff who interviewed them
Step by Step Solution
There are 3 Steps involved in it
Step: 1
local conceptual data model for the one user view is as follows A local logical data model from the ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started