1. Consider the following tables: Book Publisher ISBN Author Title Year 949 A.Gr
ID: 3738324 • Letter: 1
Question
1. Consider the following tables: Book Publisher ISBN Author Title Year 949 A.Green Memoirs 2001 287 B.Black Biology 2002 PublisherName ISBN 949 287 Thompson Elsevier (a) Give a table returned by (1 marks) SELECT FROM Book, Publisher (b) Give a table returned by (1 marks) SELECT FROM Book CROSS JOIN Publisher (c) Give a table returned by (2 marks) SELECT FROM Book NATURAL JOIN Publisher (d) Give a table returned by (2 marks) SELECT FROM Book INNER JOIN Publisher USING (ISBN) (e) Rewrite the previous INNER JOIN query with ON (2 marks) (f) What are FULL OUTER JOIN, LEFT OUTER JOIN and RIGHT OUTER JOIN? Give an example of the three kinds of outer joins on two (3 marks) (8) What does it mean for two relations to be union-compatible? (2 marks) instead of USING(ISBN) tables both of which contain dangles. (h) List relational algebra operators and explain what they do. (6 marks) (i) Translate the following relational algebra expression into SQL (3 marks) ? Title ? Year>2001 (Book × Publisher) G) Translate the following SQL query into relational algebra: (3 marks) SELECT Author, Title FROM Book, Publisher WHERE Book, ISBN Publisher. ISBN AND PublisherName 'Elsevier,Explanation / Answer
Solution:
The first four subparts have been answered as per Chegg guidelines, please repost others.?
1)
a)
b)
c)
d)
I hope this helps if you find any problem. Please comment below. Don't forget to give a thumbs up if you liked it. :)
ISBN Author Title Year PublisherName ISBN 949 A.Green Memoirs 2001 Thompson 949 287 B.black Biology 2002 Elsevier 287Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.