Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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 orderStep 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