EnrolmentID CourseID CourseName M Enrolment Has Course StdEmail Enrols in Intake Year StdName Teaches LetName Students Lecturer LctID StdID stdid | stdname 123456| Enson Liu 234567 Ahmad Samsul | 345678 | Vinesh ak Siva | 456789 John Sena | stdemail ahmad@gmail.com asmsul@gmail.com sivavinesh@gmail.com senaj@gmail.com | intakeyear | 2016 | 2018 2018 | 2012

New Perspectives on HTML5, CSS3, and JavaScript
6th Edition
ISBN:9781305503922
Author:Patrick M. Carey
Publisher:Patrick M. Carey
Chapter3: Designing A Page Layout: Creating A Website For A Chocolatier
Section3.2: Visual Overview: Page Layout Grids
Problem 6QC
icon
Related questions
Question

How would I go about creating this computer database in MariaDB with sql?

  1. Create a database name "dbXXXXXX" Select the database using the "use [database name]" command.
  2. Now you are in the database.
  3. Based on the above schema from Enrolment System database, create all the tables with the last 6 digits of  "123456", then the table name for table Lecturer should be "123456_Lecturer". Refer to basic SQL lecture note to create table that has primary keys and Foreign Keys. Provide the datatype of each attributes.
  4. Add a column called "Department" with datatype "VARCHAR(12)" to the table "Lecturer". Shows the metadata of the updated "Lecturer" table. (Use Describe command)
  5. Drop the "Department" column from the table "Lecturer", and show the metadata of the updated "Lecturer" table.
  6. Insert three (3) data to each of the table in the tables created. 
    1. Note: If you have foreign key issues, please disable foreign key constraints before inserting the data, see below

SET FOREIGN_KEY_CHECKS=0;

    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.
    4. Fill in the appropriate information in the enrollment table using your data and your course mates’ data.
    5. Set foreign key constraints back to 1 after you finish inserting your data
      SET FOREIGN_KEY_CHECKS=1;
  1. Select and display all the data in table course.
  2. Select and display your own data from students table using your student ID.
  3. Update your own year of intake in the students table to 2025.
  4. Delete one lecturer from your lecturer table.
  5. Delete all lecturers from your lecturer table.
  6. Update the information in Figure 1 into your students table using the SQL command UPDATE that 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.
EnrolmentID
CourseID
CourseName
M
Enrolment
Has
Course
StdEmail
Enrols in
Intake Year
StdName
Teaches
LetName
Students
Lecturer
LctID
StdID
Transcribed Image Text:EnrolmentID CourseID CourseName M Enrolment Has Course StdEmail Enrols in Intake Year StdName Teaches LetName Students Lecturer LctID StdID
stdid | stdname
123456| Enson Liu
234567 Ahmad Samsul
| 345678 | Vinesh ak Siva
| 456789
John Sena
| stdemail
ahmad@gmail.com
asmsul@gmail.com
sivavinesh@gmail.com
senaj@gmail.com
| intakeyear |
2016 |
2018
2018 |
2012
Transcribed Image Text:stdid | stdname 123456| Enson Liu 234567 Ahmad Samsul | 345678 | Vinesh ak Siva | 456789 John Sena | stdemail ahmad@gmail.com asmsul@gmail.com sivavinesh@gmail.com senaj@gmail.com | intakeyear | 2016 | 2018 2018 | 2012
AI-Generated Solution
AI-generated content may present inaccurate or offensive content that does not represent bartleby’s views.
steps

Unlock instant AI solutions

Tap the button
to generate a solution

Recommended textbooks for you
New Perspectives on HTML5, CSS3, and JavaScript
New Perspectives on HTML5, CSS3, and JavaScript
Computer Science
ISBN:
9781305503922
Author:
Patrick M. Carey
Publisher:
Cengage Learning
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Fundamentals of Information Systems
Fundamentals of Information Systems
Computer Science
ISBN:
9781305082168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Programming Logic & Design Comprehensive
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Fundamentals of Information Systems
Fundamentals of Information Systems
Computer Science
ISBN:
9781337097536
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning
Principles of Information Systems (MindTap Course…
Principles of Information Systems (MindTap Course…
Computer Science
ISBN:
9781285867168
Author:
Ralph Stair, George Reynolds
Publisher:
Cengage Learning