Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

There is a Foreign Key (FK) in BOOK for AuthorID to the Primary Key of Author NOTE : Assume this is sample data and the

image text in transcribed

There is a Foreign Key (FK) in BOOK for AuthorID to the Primary Key of Author NOTE : Assume this is sample data and the real state of the database may have different values. (2 pts each )

  1. Create the Relational Algebra to return the ISBN, Bookname and AuthorID for all fiction books.

  2. Write the Tuple Relational Calculus to return ISBN, Bookname and AuthorID for all fiction books.

  3. What is the resulting relation of ( ) h,h h=

  4. Write the relational algebra to return the count and type of all the books. ( How many Fiction, non-Fiction etc )

  1. Write the relational algebra to return the book name, and author that wrote the book.

  2. Write the relational algebra to return the author and books they wrote, if they didnt write any books then a null should be returned for the book name.

  3. Write the tuple relational calculus to return the names of authors who have not written any books.

BOOK ISBN : int BookName : varchar(50) AuthorID : int Type : varchar(20) 10 Fiction Pride and Prejudice The Call of the Wild 12 White Fang 12 12 13 Fiction Fiction Non-Fiction 4 In Cold Blood AUTHOR AuthorID : int AuthorName : varchar(50) 10 Jane Austin Jack London Truman Capote Charlotte Bronte BOOK ISBN : int BookName : varchar(50) AuthorID : int Type : varchar(20) 10 Fiction Pride and Prejudice The Call of the Wild 12 White Fang 12 12 13 Fiction Fiction Non-Fiction 4 In Cold Blood AUTHOR AuthorID : int AuthorName : varchar(50) 10 Jane Austin Jack London Truman Capote Charlotte Bronte

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Systems For Advanced Applications 18th International Conference Dasfaa 2013 Wuhan China April 22 25 2013 Proceedings Part 2 Lncs 7826

Authors: Weiyi Meng ,Ling Feng ,Stephane Bressan ,Werner Winiwarter ,Wei Song

2013th Edition

3642374492, 978-3642374494

More Books

Students also viewed these Databases questions