in Databases edited by
715 views
0 votes
0 votes

BOOK (acc_no, year, title)
USER  (card_no, name, address)
SUPPLIER  (s_name, address)
BORROWED_BY (acc_no, card_no, date of issue)
SUPPLIED_BY (acc_no, date of supply, price, s_name)

In the above relation, find out all the books which are either issued, or have been supplied by a supplier.

Give your answer in the following forms: 
(a) Relational Algebra
(b) SQL
(c) Tuple Calculus

in Databases edited by
715 views

1 Answer

0 votes
0 votes

SQL Form:

select *
from book
where book.acc_no IN  (select acc_no
                        from borrowed_by)
    OR book.acc_no IN (select acc_no
                        from supplied_by
                        where s_name LIKE "%%");
by

Related questions