Based on the structure and the contents of the tables in Figure 1 of Appendix 1, you are requested to list all the infor
Posted: Sun Jul 03, 2022 11:59 am
Based on the structure and the contents of the tables in Figure 1 of Appendix 1, you are requested to list all the information about department identity, department name, town and the number of staff within each department. Based on the stated requirement: a) Write the SQL statement to display the result of the given requirement. (5 marks) b) Construct the Relational Algebra based on the SQL statement written in the answer for question 4(a). (5 marks) c) Display the result of this requirement in the form of a data table (rows and column). (5 marks)
EMPLOYEE TABLE EMP ID F NAME L_NAME 100 King 101 Kochhar 102 Lex De Haan 200 Jennifer Whalen 205 Shelley Higgins 206 William Gietz 149 Eleni Zlotkey 174 Ellen Abel 176 Jonathon Taylor Kimberely Grant Steven Neena 178 124 Kevin 141 Trenna Rajs 142 Curtis Davies Matos 143 Randall 144 Peter Vargas 103 Alexander Hunold 104 107 Ernst Lorentz Hartstein 201 Michael 202 Pat Fay Bruce Diana Mourgos HIRE DATE 06/17/1987 09/21/1989 01/13/1993 09/17/1987 06/07/1994 06/07/1994 01/29/2000 05/11/1996 03/24/1998 05/24/1999 11/16/1999 10/17/1995 01/29/1997 03/15/1998 07/09/1998 01/03/1990 05/21/1991 02/07/1999 02/17/1996 08/17/1997 JOB ID AD PRES AD VP AD VP AD ASST AC MGR AC ACCOUNT SA MAN SA REP SA REP SA REP ST MAN ST CLERK ST CLERK ST CLERK ST CLERK IT PROG IT PROG IT PROG MK MAN MK REP SALARY COM PCT MGR ID DPT ID 24000 17000 17000 4400 12000 8300 10500 11000 8600 7000 5800 3500 3100 2600 2500 9000 6000 4200 13000 6000 0.2 0.3 0.2 0.15 100 100 101 101 205 100 149 149 149 100 124 124 124 124 102 103 103 100 201 8888888888888888 90 110 110 50
JOB TABLE JOB ID AD PRES AD VP AD ASST AC_MGR AC ACCOUNT SA MAN SA REP ST MAN ST CLERK IT PROG MK MAN MK REP LOC ID 1800 2500 1400 JOB TITLE 1500 1700 President Administration Vice President Administration Assistant Accounting Manager Public Accountant Sales Manager LOCATION TABLE Sales Representative Stock Manager Stock Clerk Programmer Marketing Manager Marketing Representative STREET ADDRESS 460 Bloor St. W MIN SALARY 20000 15000 3000 8200 4200 10000 6000 5500 2000 4000 9000 4000 Magdalen Centre, The Oxford Science Park 2014 Jabberwocky Rd 2011 Interiors Blvd 2004 Charade Rd MAX_SALARY 40000 30000 6000 16000 9000 20000 12000 8500 5000 10000 15000 9000 POSTAL CODE ON M5S 1X8 OX9 928 26192 99236 98199 DEPARTMENT TABLE DPT NAME Administration Marketing Shipping DPT ID 10 20 50 60 80 90 110 190 CITY Toronto IT Sales Executive Accounting Contracting Oxford Southlake South San Francisco Seattle Figure 1: EMPLOYEE database. MGR ID LOC ID 200 1700 201 1800 1500 1400 STATE PROVINCE Ontario Oxford Texas California Washington 124 103 149 100 205 2500 1700 1700 1700 COUNTRY CANADA UNITED KINGDOM UNITED STATES UNITED STATES UNITED STATES