Answered step by step
Verified Expert Solution
Link Copied!

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

image text in transcribed

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design And Implementation

Authors: KROENKE DAVID M.

1st Edition

8120322258, 978-8120322257

More Books

Students also viewed these Databases questions