Labreport_DBMS
Labreport_DBMS
LAB REPORT
RELATIONAL ALGEBRA
-----------------------------------
SUPERVISIOR
Output:
Output:
output:
Projection (π)
Output:
Output:
Output:
Union (∪)
a. Find the union of courses taught by 'Dr. Smith' and 'Prof. Johnson'.
Relational Algebra:
π CourseID, CourseName, Instructor (σ Instructor='Dr. Smith' (Course)) ∪ π CourseID,
CourseName, Instructor (σ Instructor='Prof. Johnson' (Course))
Output:
Output:
Intersection (∩)
Output:
Output:
Output:
Set Difference (−)
Output:
b. Set difference between enrollments with Grade 'A' and Grade 'B'.
Relational Algebra: σ Grade='A' (Enrollment) - σ Grade='B' (Enrollment)
Output:
Join Operations
Output:
b. Perform a left outer join between Course and Enrollment tables.
Relational Algebra: Course ⟕ Enrollment
Output:
Output:
Division (÷)
Rename (ρ)
Output:
Output:
c. Rename the Department table to DeptDetails.
Relational Algebra: ρ DeptDetails (Department)
Output:
Duplicate Elimination
Output:
Output: