q1
Explore the concept of domains in SQL databases and their significance in enforcing data integrity constraints. Describe the steps involved in creating and utilizing domain constraints using the CHECK clause. Provide real-world examples where domain constraints are essential for ensuring the validity and consistency of data. Additionally, discuss the benefits and limitations of using domains compared to traditional CHECK constraints.
q2
The following is a Student Table from a database. Write your
SQL queries to answer the following questions:
Retrieve the Name and Age of students with a Grade greater than 89.
Retrieve the count of Male students in the student table.
Retrieve the average Grade of all students.
Update the Grade of the student with Student_ID 3 to 90.
Delete the record of the student named “Ahmed”.
Insert a new student into the table.
q3
Consider a database schema with
the following tables:
Solve the following SQL
problems by nesting queries.
Place this order or similar order and get an amazing discount. USE Discount code “GET20” for 20% discount