Consider the following schema of the relational database.
- Publisher(pid, name, location)
- Book(bid, title, author, page, price)
- Publish(bid, pid, publish_date)
Write Relational Algebra expressions for the following:
- Find title of book published by Addison_wisely.
- Update the author name to "MNP" of book "introduction database".
- Find the publish date of book "Database Management".
A: Relational Algebra Expressions for Relations Publisher, Book and Publish: 59
i. Find title of book published by Addison_wisely.
π Book.title ( σ Publisher.name = "Addison_wisely" ( Book ⨝ Publish ⨝ Publisher))
For explanation, visit this link to a similar question.
ii. Update the author name to "MNP" of book "Introduction to Programming".
Temp1 ← π bid, title, author = "MNP", page, price ( σ title = "introduction database" ( Book ) )
Temp2 ← σ title ≠ "introduction database" ( Book )
Book ← Temp1 ∪ Temp2
OR
Book ← π bid, title, author = "MNP", page, price ( σ title = "introduction database" ( Book ) ) ∪ σ title ≠ "introduction database" ( Book )
For explanation, visit this link to a similar question.
iii. Find the publish date of book "Database Management".
π Publish.publish_date ( σ Book.title = "Database Management" ( Book ⨝ Publish ) )
For explanation, visit this link to a similar question.