Question
For the following university database (Figure 2), write SQL queries of the use cases below: classroom(room_number, building, capacity) department(dept_name, building, budget) course(course_id, title, dept_name, credits)
For the following university database (Figure 2), write SQL queries of the use cases below: classroom(room_number, building, capacity) department(dept_name, building, budget) course(course_id, title, dept_name, credits) instructor(inst_id, name, dept_name, salary) section(sec_id, course_id, room_number, semester, year, building, time_slot_id) teaches(inst_id, course_id, sec_id, semester, year) student(stud_id, name, dept_name, tot_cred) takes(stud_id, course_id, sec_id, semester, year, grade) Figure 2 Schema of the university database. The underlined attributes are primary and/or foreign keys. Display a list of students (showing their id, name) Display a list of students (showing their id, name) and courses they take (showing their course id) Display a list of students (showing their id, name) and sections they take (showing their course id) Display a list of students and courses they take. (showing their id, name, course id, course name) For the student with ID 12345 (or any other value), show all course_id and title of all courses registered for by the student. Find the names of courses in Computer science department which have 3 credits. Find the names of all students who have taken any Comp. Sci. course ever (there should be no duplicate names). For the Computer Programming course (course id: comp_4001, sec_id:1), the department changes the classroom from A456 to B123 during the semester. Modify the student database accordingly. In the middle of the semester, a student whose id is 1234567 drops the course Database Systems and Design (course id:comp_3115, sec id:1). Modify the student database accordingly.
Step 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