Question
Consider the following schema: employee (emp_id, first_name, last_name, department), book (isbn, title, publisher, genre), book_author (isbn, author_id), book_loan (emp_id, isbn, loan_date, return_date) This is a
Consider the following schema:
employee(emp_id, first_name, last_name, department), book(isbn, title, publisher, genre), book_author(isbn, author_id), book_loan(emp_id, isbn, loan_date, return_date)
This is a database that keeps track of books borrowed by employees. The employee relation describes an employee. The book relation describes the books the company has. The book_author relation specifies the authors of the book. The book_loan relation describes the books an employee has borrowed.
Write the following queries in relational algebra.
1.Find publishers who publish both theory books and machine learning books.
2.Find the names of the employees that currently have a book checked out.
3.Find the ids of the employees who have borrowed a database book, but not a security book.
4.Find the department of each employee.
5.Find the titles of the books that are either about databases or data mining
6.Find the departments that have checked out books.
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started