State any justifications or assumptions you make.
The BusyBee Cleaning Company specializes in providing cleaning services for both domestic and commercial clients. Each type of client has a set of requirements. For example, The Cardboard Box Company requires cleaning services from Monday to Friday 7am until 9am and 5pm until 7pm each day, but P. Nuttall only requires cleaning services on a Wednesday from 10am until 1pm.
Whenever a new client is taken on, a BusyBee administrator assesses how many cleaning staff are required for the premises prior to assigning any staff to the job. Note that this is the ideal number, it may differ in practice. In addition, the administrator also assesses whether any specialist equipment is required and when. For example, three industrial floor cleaners may be needed on
two out of five occasions for one commercial client.
The cleaning staff work in groups of six, with a supervisor to oversee the work done. The other staff are administrative staff who manage the day-to-day office work including visiting new clients and ensuring the specialist equipment is properly maintained.
(a) Develop an Entity–Relationship model from the above information.
(b) Produce a set of tables from your Entity–Relationship model clearly identifying each primary key.
(c) Demonstrate that your model supports the following transactions and explain how they might influence physical database design:
(i) For a specific client, produce a schedule of the cleaning times together with the number of staff assigned, and details of any specialist equipment required.
(ii) For a specific supervisor, produce a list of staff on their team together with their assignment details.
Four main entities can be identified: Client, Requirement, Equipment, and Staff. Staff can form a superclass with Cleaner and Admin forming subclasses. There is a recursive relationship (1:*) on Cleaner. Cleaner to Requirement and Equipment to Requirement are both *:* relationships (Assigned and Booked), whereas Client to Requirement is 1:*. This represents the core of the problem.
![15248|704x302](upload://nDvemeIJPGgQRyxOFHBdz6zQHij.png)
In deriving the tables, the primary keys should be chosen judiciously, without separate attributes being devised for all of them. So, for example, Client, Cleaner, Admin, Staff, and Equipment will have a reference number each. Requirement will have the Client reference number with day and time from. Assigned will have Client reference number with day, time from and Cleaner reference number. Booked will have Client reference number with day, time from and equipment reference number.
Cleaner (staffNo, fName, lName, address, salary, taxCode, homeTelNo, supervisorStaffNo)
Primary Key staffNo
Foreign Key supervisorStaffNo references Cleaner(staffNo)
Admin (staffNo, fName, lName, address, salary, taxCode, homeTelNo)
Primary Key staffNo
Client (clientNo, name, address, telNo, faxNo)
Primary Key clientNo
Equipment (eqptNo, description, usage, cost)
Primary Key eqptNo
Requirement (reqtNo, startDate, startTime, duration, comments)
Primary Key reqtNo
Assigned (staffNo, reqtNo)
Primary Key staffNo, reqtNo
Foreign Key staffNo references Cleaner(staffNo)
Foreign Key reqtNo references Requirement(reqtNo)
Booked (reqtNo, eqptNo)
Primary Key reqtNo, eqptNo
Foreign Key reqtNo references Requirement(reqtNo)
Foreign Key eqptNo references Equipment(eqptNo)
(c) The transactions often demonstrate whether the data model is reasonable or incorrect. For the first transaction you could assume a reference number is used to access the client table, then each requirement can be accessed in turn. For each requirement, the assigned table will be accessed repeatedly, to count the number of staff assigned, and the booked table will be accessed repeatedly and linked to the equipment table using the equipment reference number.
For the second transaction, a similar procedure is carried out. The difference is that there is a recursive relationship involved, but if the table structures are correct, this should not pose a problem. In looking at the transactions refinements may be obvious, such as using derived attributes or posting in some non-key attributes from one table to another or creating secondary indexes.
You might also like to view...
Worksheets can be oriented to print on paper in one of ________ ways
A) two B) three C) four D) five
This attack exploits vulnerabilities in DNS and directs internet traffic away from the intended server to a fake server.
What will be an ideal response?