Galactic University Course Enrollment

Completed

Incomplete

Not Attended

Share

Galactic University is a futuristic institution where students explore diverse
programs across multiple disciplines. Each student has a unique student ID, and each course
has a unique course code. The university administration wants to ensure data integrity by
enforcing constraints: students can only enroll in valid courses, the total credits per course are
monitored, and duplicate enrollments are prevented. Your role is to create and manage SQL
tables with primary keys, foreign keys, and check constraints to maintain accurate course
registration records and uphold academic policies.

notAttendedQuestion - 1

Insert a new student while ensuring the email remains unique and display the inserted row

notAttendedQuestion - 2

Insert a new course ensuring the number of credits is between 1 and 5 and display the inserted row

notAttendedQuestion - 3

Enroll student 'Isha' into 'Operating Systems' ensuring foreign key validation and display the inserted row

Prev
View Questions
Next
Code Editor
Table Name: students
student_id student_name email
1 Kabir [email protected]
2 Nisha [email protected]
3 Rohan [email protected]
4 Isha [email protected]
5 Arjun [email protected]

Table Name: courses
course_id course_name credits
101 Database Systems 3
102 Algorithms 4
103 Operating Systems 4
104 Computer Networks 3
105 Web Development 2

>>> Submit Your Query to validate