- Selection ($\sigma$)
- Projection ($\pi$)
- Union ($\cup$)
- Intersection ($\cap$)
- Set-difference ($-$)
- Rename ($\rho$)
- Cross-product ($\times$)
- Join ($\bowtie$)
Where
Roll Name Department Fees Team 1 Bikash CSE 22000 A 2 Josh CSE 34000 A 3 Kevin ECE 36000 C 4 Ben ECE 56000 D Select all the student of Team A.
$$\sigma_\text{Team = 'A'} (\text{Student})$$ Select all the students of department ECE whose fees is greater than equal to 10000 and belongs to Team other than A.
$$\sigma_\text{Fees >= 10000} (\sigma_\text{Class != 'A'} (\text{Student}))$$
Where
Class Dept Position 5 CSE Assistant Professor 5 CSE Assistant Professor 6 EE Assistant Professor 6 EE Assistant Professor Project class and Dept from Faculty.
$$\pi_\text{Class, Dept} (\text{Faculty})$$ Project position from Faculty.
$$\pi_\text{Position} (\text{Faculty})$$
Where
Student Faculty
First Last Aisha Arora Bikash Dutta Makku Singh Raju Chopra
FirstN LastN Raj Kumar Honey Chand Makku Singh Karan Rao Student UNION Faculty.
$$\text{Student} \cup \text{Faculty}$$
Where
Where
$$A - B \ne B - A \$$
Where the symbol
Sno Name 2600 Ronny 2655 Raja Query to rename the relation Student as Male Student and the attributes of Student – RollNo, SName as (Sno, Name).
$$\rho_\text{MaleStudent(Sno, Name)} \ \pi_\text{RollNo, SName} (\sigma_\text{Condition} (\text{Student}))$$
Where
Student Faculty
SNO FNAME LNAME 1 Albert Singh 2 Nora Fatehi
ROLLNO AGE 5 18 9 21 On applying Cross-product on Student and Detail.
$$\text{Student} \times \text{Details}$$
Employee Dept
Name EmpId DeptName Harry 3415 Finance Sally 2241 Sales George 3401 Finance Harriet 2202 Sales
DeptName Manager Finance George Sales Harriet Production Charles On applying Cross-product on Student and Detail.
$$\text{Employee} \bowtie \text{Dept}$$