Intro To DBS Assignment No2
Intro To DBS Assignment No2
1. First, execute the SQL create and insert statements on MySQL Workbench.
2. After creating the database structure and tables, generate ERD and attach it to your
solution file.
1. Retrieving Data
Scenario A: Retrieve all courses offered by HarvardX.
Scenario B: Retrieve the names of instructors teaching the course "Introduction to
Computer Science"
Scenario C: List courses along with the number of participants for each session in
2013
Scenario D: Get the average percentage of students who earned certificates across
all course sessions for "MITx"
2. Inserting Data
Scenario A: Insert a new course offered by "MITx"
Scenario B: Add a new instructor and assign them to a course ("Introduction to
Algorithms")
Scenario C: Add a new session for an existing course
3. Updating Data
Scenario A: Update the course title for course 6.002x to “Advanced Circuits and
Electronics”
Scenario B: Increase the number of participants in a specific session by 200
4. Deleting Data
Scenario A: Delete a course and its associated sessions
Scenario B: Remove an instructor from teaching a specific course
Scenario C: Delete all course sessions for courses in a given year (e.g., 2012)
Scenario D: Remove an instructor who no longer teaches any courses
-- Q.no.1
-- Task 1 Retrieving data :
FROM Courses c
FROM Courses c
FROM Course_Sessions cs
VALUES (
);
UPDATE Courses
UPDATE Course_Sessions
WHERE year = 1;
);