edited by
1,098 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

edited by

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 "%%");

Related questions

0 votes
0 votes
1 answer
1
Hardik Vagadia asked Nov 17, 2015
302 views
Book_schema(Acc.no,yr_pub,title)B.by_schema(Acc.no,Doi,Card.no)Where, Acc.no is accession numberyr_pub is the year of publicationB.by_schema is the borrowed by schemaand ...
3 votes
3 votes
2 answers
4
im.raj asked Jun 16, 2016
20,937 views
A. [(00(0+1)* 11] + [11( 0 + 1)* 00]B. [(00+11) (0+1)+] + [( 0 + 1)+ (00+11)].C. [(00+11) (0+1)*] + [( 0 + 1)* (00+11)]D. (00+11) (0+1)* (00+11).