Repeat Laboratory Exercises 8.34 through 8.38 in domain relational calculus (DRC) by using the DRC interpreter. Exercises

Question:

Repeat Laboratory Exercises 8.34 through 8.38 in domain relational calculus (DRC) by using the DRC interpreter.


Exercises 8.34

Specify and execute the following queries in relational algebra (RA) using the RA interpreter on the COMPANY database schema in Figure 5.5.
a. List the names of all employees in department 5 who work more than 10 hours per week on the ProductX project.
b. List the names of all employees who have a dependent with the same first name as themselves.
c. List the names of employees who are directly supervised by Franklin Wong.
d. List the names of employees who work on every project.
e. List the names of employees who do not work on any project.
f. List the names and addresses of employees who work on at least one project located in Houston but whose department has no location in Houston.
g. List the names of department managers who have no dependents.


Figure 5.5


Exercises 8.38

Specify and execute the following queries for the database in Exercise 5.16  using the RA interpreter.

a. Retrieve the names of students who have enrolled in a course that uses a textbook published by Addison-Wesley-Longman.
b. Retrieve the names of courses in which the textbook has been changed at least once.
c. Retrieve the names of departments that adopt textbooks published by Addison-Wesley only.
d. Retrieve the names of departments that adopt textbooks written by Navathe and published by Addison-Wesley.
e. Retrieve the names of students who have never used a book (in a course) written by Navathe and published by Addison-Wesley.


Exercise 5.16

Consider the following relations for a database that keeps track of student  enrollment in courses and the books adopted for each course:

STUDENT(Ssn, Name, Major, Bdate)

COURSE(Course#, Cname, Dept)

ENROLL(Ssn, Course#, Quarter, Grade)

BOOK_ADOPTION(Course#, Quarter, Book_isbn)

TEXT(Book_isbn, Book_title, Publisher, Author)

Specify the foreign keys for this schema, stating any assumptions you make.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

Fundamentals Of Database Systems

ISBN: 9780133970777

7th Edition

Authors: Ramez Elmasri, Shamkant Navathe

Question Posted: