Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Given the following relations of a Student Industry Attachment system and the database schema with sample data found in the Appendix on page 5 and
Given the following relations of a Student Industry Attachment system and the database schema with sample data found in the Appendix on page 5 and 6 : Student (StudentNo, StudentName, Gender, CourseNo, MobileNo) Course (CourseNo, CourseDesc, Courseleader, Campus) Employer (EmployerNo, EmployerName, Address, PhoneNo) Attachment (EmployerNo, StudentNo, Hours Worked, StartDate) where the underlined attributes are the primary key attributes. Write a SINGLE SQL statement for each of the following questions: (a) Add a new record to the Attachment table with the following information. (b) Change the course leader to 'Ada Wong' for the course with course number 'TT1423' [3 marks] (c) Remove the attachement record of the student who has student number 'S16101230' and had attached to the employer with employer number 'E0005'. [2 marks] (d) Display the employer number, student number and the hours worked for all attachements WITHOUT start date. [2 marks] (e) Display the names of the different employers who hired students for industry attachement. [3 marks] (f) Display the course description and the campus for all the courses whose leaders are 'Paul Lee' or "Tammy Gu'. [2 marks] (g) Display the employer numbers and the number of students the employers hired for industry attachment that started in the month of MAY. Sort the result in descending order of the number of students the employers hired. [5 marks] (h) For the employers who hired more than three students for industry attachment, display their employer numbers, start date of the industrial attachment, and the sum of hours that the hired students worked for them. [5 marks] (i) For all students not studying at the courses offered by TY campus, display their student numbers, names, description of the studying course and the names of the employers that hired them for industrial attachment. [6 marks]
Step by Step Solution
There are 3 Steps involved in it
Step: 1
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