Documente Academic
Documente Profesional
Documente Cultură
Contents
Introduction: .................................................................................................................................... 2
Task-1 ............................................................................................................................................. 3
Part-1 ........................................................................................................................................... 3
List of Entity- .......................................................................................................................... 3
The Entity Relationship Diagram ........................................................................................... 3
Part-2 ........................................................................................................................................... 4
Data Dictionary ....................................................................................................................... 4
Task-2 ............................................................................................................................................. 5
Creating, Inserting and Showing Table-(Implementation and Data) .......................................... 6
All Queries shown below-(Queries) ......................................................................................... 12
Task-3 ........................................................................................................................................... 15
Derived Data- ............................................................................................................................ 15
Task-4 ........................................................................................................................................... 19
Evaluation- ................................................................................................................................ 19
Requirements on Assignment- .............................................................................................. 19
Solution on Requirement ...................................................................................................... 19
Solutions steps ...................................................................................................................... 20
Conclusion: ................................................................................................................................... 21
Introduction:
This assignment is on Hanwell Pest Control Company. They are special to the people for
controlling and extermination of pests. This assignment has four parts- design, data and queries
and derived data and evaluation. The whole parts are essential to complete the full job.
Task-1
Part-1
List of Entity-
1. Job
2. Customer
3. Equipment
4. Staff
5. Job_Type
6. Job_Equipment
7. Staff_Job
Part-2
Data Dictionary
Figure-Data Dictionary
Task-2
Creating, Inserting and Showing Table-(Implementation and Data)
Output of Job_Equipment-
Q7-Code
Q7-Result
Q8-Code
Q8-Result
Q9-Code
Q9-Result
Q10 code-
Q10 result-
Q11 Code-
Q11 result-
Q12 code-
Q12 result-
Task-3
Derived Data-
Firstly, I have altered the table on job_equipment. Here I added a column name Costing.
Alter table-
Then I have updated the job_equipment table on costing column. I have done this 5 times for
5 values inserting. Here is the only 1 example-
Update-1
Now I have shown here the latest charging system. Thats why I have calculated the equipment
number and costing of that equipment. Now all charged will be counted via piece of equipment.
There is the sql code of charging of staffs-
Task-4
Evaluation-
Requirements on Assignment-
1. To produce an entity relationship model for Hanwell Pest Control.
2. It should be normalized model to 3rd normal form.
3. A data dictionary for the entity relationship model.
4. Creating all tables using SQL
5. Input data on jobs.
6. Input data on members of staff.
7. Input data on equipment and materials that are used on job.
8. Query on Selects all the jobs and which staff have worked on them.
9. Query on Selects equipment and materials that are used on jobs of type Wasp Nest.
10. Query on Selects all the jobs that Muhammad Ya has worked on.
11. Query on Shows all jobs in Essex.
12. Query on counting the number of jobs that have used Wainscot Seals.
13. Query on Prepare an invoice including vat charge.
14. I have to show the altered table code in Sql.
15. Change the charging systems for staffs and to show the sql code.
16. Evaluate the whole assignment how I have done it. And how I have standardized the
companys data.
Solution on Requirement
1. I have tried to identify the requirements.
IDENTIFY
2. I analysis on the entire requirements on assignment.
3. I made some rough on entity model and finding entity.
4. I have made all the tables using mySql. EXPLORE
5. After that I run query on them.
6. I was made some wrong whenever I was making tables
SET GOAL
and queries.
7. But I was successful to show all the queries which were
required. IMPLEMENT
8. I was able to change the charging system by altering table.
EVALUATE
Solution Method
Solutions steps
Task-1:
1. I have shown an entity relationship model with entity.
2. I have also made a data dictionary for this Model.
Task-2:
Data-
1. All tables were created by mySql. I have also shown created scripts and finished tables.
2. I have entered data for all jobs and provided a list.
3. I have entered data for all staffs and provided a list.
4. I have entered data on equipment and provided a list.
Queries-
1. I have shown a query that shows all the jobs and which staff have worked on them.
2. I have shown query that selects the equipments and materials that are used on jobs of type
Wasp Nest.
3. I have shown a query that selects all the jobs that Muhammad Ya has worked on.
4. I have shown query that all jobs have taken in place named Essex.
5. I have shown query that counts the number of jobs that have used by Wainscot Seals.
6. I have made an output of an invoice including vat.
Task-3:
Deriving Data-
Company would like to change their charge systems for jobs. I have shown here how to change
the charge systems on particular piece of equipment they use. Thats why I have altered the table
with new column. Then I have calculated the equipment number with costing of equipments.
Task-4:
Standardizing Companys Data-
Previously they had charged on the per day job type. I have shown them a way altering table into
charging on equipment. By this way, they are now standardized company on charging system.
All data storage and applications are attached in file and CD.
Conclusion:
I have tried to fulfill all the requirements on assignments. There may have some wrong by
myself. But I will try to recover all my faults. I have learnt a huge knowledge by completing this
assignment. Now I hope so that I can perform part time job in a company on database.