Case Study: Shermac Engineering
Total Page:16
File Type:pdf, Size:1020Kb

CASE STUDY: SHERMAC ENGINEERING. PRACTICAL
TASKS
The following Case Study
a. Derive an Entity Relationship Diagram (ERD) showing the entities of interest and associated attributes, relationships, dependency and indicate primary and foreign keys b. Implement the tables in MS SQL Server 2005 by draw the ERD in MS SQL Server 2005 c. Populate the tables with the sample data. d. Provide sample SQL code to demonstrate and understanding of DDL and DML SQL statements.
You may decide to modify the data requirements or generate additional data attributes to assist in your design of the database. Write down details of any assumptions you have made that you feel are important.
You may decide to follow the ERD’s in Answer Points.
CASE STUDY: SHERMAC ENGINEERING.
Shermac Engineering Ltd is a company, which manufactures parts for a chemical plant. The company has many manufacturing sites and a main office. Workers and Junior Managers must be based at a manufacturing site. The company has about 200 employees and each employee belongs to a department. The company is organised into many departments and are based at a manufacturing site. An employee is classified as managers, junior manager or workers. Managers are based at the main office whilst the rest of the employees are based at a manufacturing site. A manager is responsible for one project and has several junior managers and workers to assist him. In a chemical plant project, each junior manager has his or her own major technical field such as electrical, chemical, engineering, etc. Each worker has a speciality such as welding, construction or drilling. Each project has only one manager and has a start and finish dates for manufacturing. The project belongs to one client and the manufacturing costs are decided between the company and client.
In a project, more than one supplier can supply a given part. Suppliers can supply parts to different projects. A supplier may produce the parts it supplies or may buy the parts from wholesalers. Each manufacturing sites stores the parts it is supplied until the date they are required.
The company would also like the record an employee qualifications (in particular any degrees they hold) and personal details of marital status and next of kin details.
Sample Documentation from the company manual record keeping system (tables are un-normalised).
CASE STUDY: SHERMAC ENGINEERING. 1 CASE STUDY: SHERMAC ENGINEERING.
Prefix codes : p - parts s - supplier pj - project c - client d - department e -employee
PARTS pno pname sno sname slocation p1 coil s2 Victor Ltd Newcastle p2 tubing s2 Victor Ltd Newcastle p1 coil s3 Poly Ltd Kent p2 tubing s1 Parts Ltd Middlesbrough p3 outlet s2 Victor Ltd Newcastle p3 outlet s3 Parts Ltd Newcastle p4 tube s5 Snd Ltd Belfast p4 tube s6 Ingram Manchester p5 pipe s1 Parts Ltd Middlesbrough p5 pipe s2 Victor Ltd Newcastle p6 nut s4 Parts Ltd Newcastle p6 nut s5 Snd Ltd Belfast p7 bolt s2 Victor Ltd Newcastle p8 shaft s2 Victor Ltd Newcastle p7 bolt s3 Poly Ltd Kent
PROJECT pjno pjname pjsite pjstart_date & finish_date cno cname clocation emanager pj1 turbine 1 22/7/91 12/8/91 c1 ICI Billingham Smith pj2 vessel 3 12/7/91 29/7/91 c1 ICI Billingham Jones pj3 drum 1 22/9/94 12/8/95 c2 BS South Bank Brown pj4 cooler 2 12/8/94 29/7/95 c3 Tees Middlesbrough Green pj5 rig 1 22/5/94 22/8/95 c2 BS South Bank Brown
PROJECT-PARTS pjno pjname pno pj1 turbine p1, p2, p6, p10, p15, p19, p21 pj2 vessel p1, p1, p2, p4, p5, p6, p6 pj3 drum p1, p2, p6, p8 pj4 cooler p1, p5, p6, p6, p7 pj5 rig p5, p6, p6, p7, p8
EMPLOYER eno ename esalary dno dname estatus espouce edegree eclass eposition eexperties e1 Smith 12k d1 comp S - Comp 2(1) manager computing e2 Jones 12k d1 comp M Edwina - - manager computing e3 Brown 7k d2 electr S - - - worker painting e4 Green 10k d2 electr S - - - Jworker electrical
CASE STUDY: SHERMAC ENGINEERING. 2 CASE STUDY: SHERMAC ENGINEERING.
AnswerAnswer pointers Pointers
The following model and schema does not cover every aspect of the case study.
1. ASCENT DIAGRAM : ER Model for SHERMAC ER shermac.asc
d#, dname, site# site#, sname, site-t# site-t#, site-type department dept-site site site-type sites
emp-dept e#, ename, esal, d# q#, qual-title emp-qual (e#, q#, class) employees qualifications dept-man
emp-nok emp-work emp-man emp-jun e#, nokdetails,... m#, d# next-of-kin managers juniors workers
j#, etechnical, m#w#, especial, m# man-jun proj-man note : m#, j# & w# all aliases of e#
man-work p#, pname, c# part#, part-desc s#, sname, saddress projects parts suppliers proj-parts (p#, qty, part#) parts-supp (part#, s#)
client-proj
clients c#, cname, clocation SHERMAC ERD
CASE STUDY: SHERMAC ENGINEERING. 3