Question: database name: database= db507653 Tables in lab 4= {tables in db507653}= 507653_course 507653_enrolment 507653_lecturer 507653_students students_with_pk (courseID, courseName, lectID, EnrolmentID, stdID, stdName, intakeYear,stdEmail) Insert three

database name: database= db507653

Tables in lab 4= {tables in db507653}= 507653_course 507653_enrolment 507653_lecturer 507653_students students_with_pk (courseID, courseName, lectID, EnrolmentID, stdID, stdName, intakeYear,stdEmail)

  1. Insert three (3) data to each of the table in the tables created in lab 4.
    1. Fill in the lecturer table using the details of your favorite lecturers.
    2. Fill in the course table using the details of your favorite courses.
    3. Fill in the students table using your own details and two of your course mates beside you in the lab.
    4. Fill in the appropriate information in the enrollment table using your data and your course mates data.
  2. Select and display all the data in table course.
  3. Select and display your own data from students table using your student ID.
  4. Update your own year of intake in the students table to 2021.
  5. Delete one lecturer from your lecturer table.
  6. Delete all lecturers from your lecturer table.
  7. Update the information in Figure 1 into your students table using the SQL command you learnt previously.

Figure 1: Table Students.

  1. Perform the operation below:
    1. Retrieve the distinct list of intake year from the table students.
    2. Sort the distinct list of intake year from the table in descending order.
    3. Retrieve a data from table students where the name of the student is Enson Liu and the year of intake is 2016.
    4. Retrieve the data from table students where the name of the student is Enson Liu or the year of intake is 2012.
    5. List all the student in table students that are not from the year 2018.
    6. Calculate the sum and average value for the student id in the table students.
    7. Show the largest year in the table students.
    8. Show the smallest student id in the table students.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!