Question

The CIS Department at Tiny College maintains the Free Access to Current Technology (FACT) library of e- books. FACT is a collection of current technology e-books for use by faculty and students. Agreements with the publishers allow patrons to electronically check out a book, which gives them exclusive access to the book online through the FACT website, but only one patron at a time can have access to a book. A book must have at least one author but can have many. An author must have written at least one book to be included in the system but may have written many. A book may have never been checked out but can be checked out many times by the same patron or different patrons over time. Because all faculty and staff in the department are given accounts at the online library, a patron may have never checked out a book or they may have checked out many books over time. To simplify determining which patron currently has a given book checked out, a redundant relationship between BOOK and PATRON is maintained. The ERD for this system is shown below.

CHECKOUT Check Num PK PATRON PK Pat ID -----H FK1 FK2 Book_Num Pat_ID Check Out Date Check_Due_Date Check_In_Date Pat_FName P

1. Write a query to display checkout number, checkout date, due date, book number, and book title for every checked out that has ever occurred in the system. Sort the output by book title (ascending).

2. Write a query to display number of books that are currently checked out (not available).

3. Write a query to display book subject, the average cost of books within that subject, and the difference between average cost of book within that subject and average cost of all books. Sort the results by book subject (ascending).

4. Write a query to display book subject, maximum and minimum number of days a book is kept during a check out within that subject (group by book subject). Sort the results by book subject (ascending).  

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.

SELECT CHECK_NUM, CHECK_OUT_DATE, CHECK_DUE_DATE, BOOK_NUM, BOOK_TITLE

FROM CHECKOUT

ORDER BY BOOK_TITLE;

2.

SELECT Count(BOOK_NUM) AS "Unavailable Books"

FROM BOOK

WHERE PAT_ID IS NOT NULL;

Add a comment
Know the answer?
Add Answer to:
The CIS Department at Tiny College maintains the Free Access to Current Technology (FACT) library of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Write a query to display author ID, author first, last name, and the number of subjects...

    Write a query to display author ID, author first, last name, and the number of subjects (book subject count) for authors who have published books in more than one subject area (book subject). CHECKOUT PATRON PK Pat ID FK1 Book Num FK2 Pat ID Check Out Date Check Due Date Check In Date Pat FName Pat LName Pat Type BOOK AUTHOR PK Au ID Book Title Book Year Book Cost Book Subject Au FName Au LName Au BirthYear FK1 Pat...

  • Subject: Java Program You are writing a simple library checkout system to be used by a...

    Subject: Java Program You are writing a simple library checkout system to be used by a librarian. You will need the following classes: Patron - A patron has a first and last name, can borrow a book, return a book, and keeps track of the books they currently have checked out (an array or ArrayList of books). The first and last names can be updated and retrieved. However, a patron can only have up to 3 books checked out at...

  • Case Study:UniversityLibrarySystem This case is a simplified (initial draft) of a new system for the University...

    Case Study:UniversityLibrarySystem This case is a simplified (initial draft) of a new system for the University Library. Of course, the library system must keep track of books. Information is maintained about both book titles and the individual book copies. Book titles maintain information about title, author, publisher, and catalog number. Individual copies maintain copy number, edition, publication year, ISBN, book status (whether it is on the shelf or loaned out), and date due back in. The library also keeps track...

  • In this project, you will construct an Object-Oriented framework for a library system. The library must...

    In this project, you will construct an Object-Oriented framework for a library system. The library must have books, and it must have patrons. The patrons can check books out and check them back in. Patrons can have at most 3 books checked out at any given time, and can only check out at most one copy of a given book. Books are due to be checked back in by the fourth day after checking them out. For every 5 days...

  • The primary keys are underlined. The foreign keys are denoted by asterisks (*). Description of the...

    The primary keys are underlined. The foreign keys are denoted by asterisks (*). Description of the schema: • person — keeps track of the people who borrow books from the library. The attributes contain personal and contact information. • author — keeps track of personal information about authors. • publisher — keeps track of the publisher information. To keep it simple, most of the attributes have been truncated in the sample database. 1 trivial dependencies are things like X→X or...

  • Part I. Create a library check-out database using Microsoft SQL Server that stores data about books,...

    Part I. Create a library check-out database using Microsoft SQL Server that stores data about books, patrons, and the check-out process. Books (BookID, BookName, Author, YearPublished) Patrons (PatronsID, PatronsName, PatronsAddress, PatronsBirthday) CheckInOut (TransactionID, PatronID, BookID, CheckOutDate, NumDay, ReturnDate, Late, Fees, Paid) - the NumDay field contains the number of days patrons can keep the book, if the return date is over the number of day, then the Late field will have a Y value and a fee of $1.00 per...

  • ERD Diagram Based solely on the description of library operations below (without making up any additional...

    ERD Diagram Based solely on the description of library operations below (without making up any additional facts/requirements) design a data model that avoids update anomalies. You can use text to describe your model if you want. If so be clear as to what columns have primary and foreign keys, as well as what table a FK refers to. You can sketch it out on paper and scan it. You can use Visio. You can use some other tool if you...

  • // C programming Create a system managing a mini library system. Every book corresponds to a...

    // C programming Create a system managing a mini library system. Every book corresponds to a record (line) in a text file named "mylibrary.txt". Each record consists of 6 fields (Book ID, Title, Author, Possession, checked out Date, Due Date) separated by comma: No comma '', "in title or author name. This mini library keeps the record for each book in the library. Different books can share the book "Title". But the "Book ID" for each book is unique. One...

  • This assignment consists of a series of SQL questions. For each question, you will need to...

    This assignment consists of a series of SQL questions. For each question, you will need to include: • SQL query. • An explanation of the query. Please include explanations as a comment AFTER your query, e.g., enclosed within a /* comments block */ ). See the first example in the SQL tutorial for a comment. You don’t need to explain straightforward code in comments. Only the parts that are interesting or different, so that we understand what you did. Question-1...

  • Can somebody help me with the Use Case Diagram . I am confused of what I...

    Can somebody help me with the Use Case Diagram . I am confused of what I am suppose to do. Here are the instructions : Your team should produce a Use Case Diagram and the associated Use Case Descriptions/Narratives for all the use cases in the diagram. The resulting document should havethe “professional look” and produced by a word processor, graphics/presentation/drawing software, and/or a CASE tool (e.g., Microsoft Word, Microsoft PowerPoint, ArgoUML, Dia, Visual Paradigm, Visio, etc.). All project documentation...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT