Consider the relation:
student(sid, sname, address, gender, age)
Write relational algebra(RA) for the following:
- To display name of student whose age is greater than 15.
- To remove the record of the student who are from Kathmandu.
- To update address of student to Kathmandu whose sid is 'S1101'.
A: Relational Algebra statements for Student (sid, sname, address, gender, age) : 89
a. To display name of student whose age is greater than 15.
π sname ( σ age > 15 ( student ) )
b. To remove the record of the student who are from Kathmandu.
student ← student - ( σ address = 'Kathmandu' ( student ) )
c. To update address of student to Kathmandu whose sid is 'S1101'.
student ← π sid, sname, address = 'Kathmandu', gender, age ( σ sid = 'S1101' ( student ) ) ∪ ( σ sid ≠ 'S1101' ( student ) )
Asked in Year
2022
Course
BBM
University
TU