Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

This project will utilize SQL to create user views for the provided set of queries. EXAMPLES: 1. List all libraries with the library name, address,

This project will utilize SQL to create user views for the provided set of queries.

EXAMPLES:

1. List all libraries with the library name, address, and telephone number.

CREATE VIEW LibraryNames (Number, Name, Address, Phone) AS

SELECT Library#, LibraryName, Address, Phone

FROM LIBRARY

2. Retrieve the name, city, and grade point average of students with a high GPA) greater than or equal to 3.7) SELECT stu_lname, stu-fname, stu_GPA FROM student

WHERE stu_GPA >= 3.7 ORDER BY stu_lname, stu_fname;

3. List the name and hiring date of faculty hired in 1994 or 1995 SELECT fac_lname, fac_fname, fac_hire_date FROM faculty

WHERE fac_hire_date BETWEEN 1-JAN-1994 AND 31-DEC-1995

ORDER BY fac_lname, fac_fname;

COUNTY LIBRARY SYSTEM

Use the following relations for the SQL queries for this project.

LIBRARY (LIBRARY_ID, LIBRARY_NAME, STREET_ADDRESS, CITY, STATE, ZIPCODE, PHONE, MANAGER_NAME)

BRANCH (BRANCH_ID, BRANCH_NAME, STREET_ADDRESS, CITY, STATE, ZIPCODE, PHONE, BRANCH_MANAGER, LIBRARY_ID)

FK LIBRARY_ID -> LIBRARY

PUBLISHER (PUBLISHER_ID, PUBLISHER_NAME, STREET_ADDRESS, CITY, STATE, ZIPCODE, PHONE)

BOOK (BOOK_ID, BOOK_TITLE, PUBLICATION_DATE, PUBLISHER_ID, PRECIS)

FK PUBLISHER_ID -> PUBLISHER

AUTHOR (AUTHOR_ID, FIRST_NAME, LAST_NAME, DATE_OF_BIRTH, DATE_OF_DEATH)

BOOKAUTHOR (BOOK_ID, AUTHOR_ID)

FK BOOK_ID -> BOOK

FK AUTHOR_ID -> AUTHOR

COPY (COPY_ID, BOOK_ID, COST, BRANCH_ID)

FK BOOK_ID -> BOOK

FK BRANCH_ID -> BRANCH

CATEGORY (CATEGORY_ID, CATEGORY_NAME)

BOOK_CATEGORY (BOOK_ID, CATEGORY_ID)

FK BOOK_ID -> BOOK

FK CATEGORY_ID -> CATEGORY

REVIEWER (REVIEWER_ID, FIRST_NAME, LAST_NAME)

REVIEW (REVIEW_ID, BOOK_ID, REVIEWER_ID, REVIEW_DATE, REVIEW)

FK BOOK_ID -> BOOK

FK REVIEWER_ID -> REVIEWER

PATRON (PATRON_ID, FIRST_NAME, LAST_NAME, STREET_ADDRESS, CITY, STATE, ZIPCODE, PHONE, FEE_BALANCE)

CHECKOUT (CHECKOUT_ID, COPY_ID, PATRON_ID, OUT_DATE, DUE_DATE, RETURN_DATE)

FK COPY_ID -> COPY

FK PATRON_ID -> PATRON

WAITLIST (BOOK_ID, PATRON_ID, BRANCH_ID, ON_DATE, OFF_DATE,)

FK BOOK_ID -> BOOK

FK PATRON_ID -> PATRON

FK BRANCH_ID -> BRANCH

QUERIES REQUIRED

6. List all books along with their publishers by book number, title, publisher number, name, and address.

7. List all books from each publisher with the publisher number, name, book number, title, and publication date.

8. List the branches associated with each city library with the library number, name, branch number, branch name, and branch address.

9. List the books owned by each branch with the library number, name, book number, and title.

10. List the books owned by each city library with the library number, name, book number, and title.

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

Modern Database Management

Authors: Jeffrey A. Hoffer Fred R. McFadden

4th Edition

0805360476, 978-0805360479

More Books

Students also viewed these Databases questions

Question

Write the difference between sexual and asexual reproduction.

Answered: 1 week ago

Question

What your favourite topic in mathematics?

Answered: 1 week ago