A question I once found on a test was worded as such:

Report the book information for the book with ISBN=43221

The relational schema for a book is depicted below:

πISBN, title, type, NumPages, edition, sequel, nameISBN=43221(Book))

This is essentially the equivalent of


I wrote out all the attributes in the Projection statement on the test, but I had the feeling there was a quicker way to do it.


Is there a shortcut way of displaying all the information of one tuple in Relational Algebra, or must all attributes be written out in the Project statement?



In relational algebra the relation


corresponds to

select * from Book

If you want to restrict to some rows you apply a selection σ:


In SQL this is a where-clause like

select * from Book where ISBN=43221

If you want to reduce the columns you need a projection π:

πISBN, title, typeISBN=43221(Book))

In SQL this is a select-list different from *:

select ISBN, title from Book where ISBN=43221
| improve this answer | |
  • In order to get a projection, you may need to use SELECT DISTINCT in some cases. In this case the results are already distinct, because ISBN is distinct. But, in other cases, you might get multiple rows with the same value – Walter Mitty Jan 27 '18 at 12:46

In relational algebra you can write query in this way:

Select ISBN = 43221 (Book)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.