Question: give me full sollution for this in my sql all parts Exercise Create a database that contain following tables. Student: Attendance: ClassVenue: Teacher: Q1: Create


give me full sollution for this in my sql all parts
Exercise Create a database that contain following tables. Student: Attendance: ClassVenue: Teacher: Q1: Create all the tables and add all the rows. (format for date yyyy-mm-dd e.g, '2023-01-22') Q2: Identify one PK from each table and add the constraints using alter. Q3: Identify all the FK constraints, and add those constraints, such that: a) If the Student table or ClassVenue Table or Teacher table is updated the referencing columns should also reflect the changes. b) Student should not be deleted if the details of that order is present. Q4: Alter table Student by adding new column "warning count" and deleting "Phone" Column Q5: Perform the following DML actions on your database, identify whether these operations are valid or not, also state how can we make the invalid queries valid? (Your answers should be written in comments along with your queries). i. Add new row into Student table, values ii. Add new row into ClassVenue table, values iii. Update Teacher table Change "Kashif" name to "Dr. Kashif Zafar". iv. Delete Student with rollnum "P16443" v. Delete Student with rollnum "P16444" Q6: Alter table teacher and add unique constraint on column "Name". Q7: Remove the data from the table "students" in a single go. Q8: Write a query to change a name of table from "Teacher" to "Faculty". Q9: Add another column of "AGE" in table "FACULTY". Insert "AGES" of faculty by yourself. Write a query to display only the name and department of faculty ordered by their age in ascending as well as descending order
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
