Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Library Management System Database - Prof. Albano, Lab Reports of Web Design and Development

The document provided appears to be a set of sql queries related to a library management system database. The queries cover various aspects of the database, such as retrieving information about books, publishers, borrowers, and borrowed books. The queries demonstrate how to perform basic database operations like selecting, joining, and aggregating data. This document could be useful for students or professionals who are learning or working with database management systems, particularly in the context of library management applications. The queries cover a range of topics, including book availability, author and publisher information, isbn lookup, book title and publisher display, borrower access, book pricing, and database schema modifications. By studying this document, users can gain insights into database design, sql syntax, and practical applications of database management in a library setting.

Typology: Lab Reports

2021/2022

Uploaded on 12/19/2022

ma-jessabel-azurin
ma-jessabel-azurin 🇵🇭

4 documents

1 / 4

Toggle sidebar

This page cannot be seen from the preview

Don't miss anything!

bg1
JERWIN M. BURAGA
NOLIE Z. CELIS
JAN LIANZ B. APOSTOL
JOMARI A. PINEDA
JHON MARK C. PAGULAYAN
1. How many books on “The Killing Zone” is available? Name the column as
Total_Number_of_Book_Available.
SELECTbookidASTotal_Number_of_Book_AvailableFROM`tblbook`WHEREtitle
='The Killing Zone';
2. Who are the author and publisher of the killing zone book?
SELECTtblbook.title,tblpublisher.publisherFROMtblbook,tblpublisherWHE
REtblbook.bookid=1ANDtblpublisher.publisherid=2;
3. ISBN 444 belongs to what publisher?
SELECTtblbook.title,tblbook.isbn,tblpublisher.publisherFROMtblbook,tbl
publisherWHEREtblbook.isbn='866-844-444-3'ANDtblpublisher.publisherid
=2;
4. Display the title of the book and publisher in one column and name as the column in Library.
SELECTtitleASLibraryFROMtblbookUNIONSELECTpublisherFROMtblpublish
er;
pf3
pf4

Partial preview of the text

Download Library Management System Database - Prof. Albano and more Lab Reports Web Design and Development in PDF only on Docsity!

JERWIN M. BURAGA

NOLIE Z. CELIS

JAN LIANZ B. APOSTOL

JOMARI A. PINEDA

JHON MARK C. PAGULAYAN

1. How many books on “The Killing Zone” is available? Name the column as

Total_Number_of_Book_Available.

SELECT bookid AS Total_Number_of_Book_Available FROM tblbook WHERE title = 'The Killing Zone';

2. Who are the author and publisher of the killing zone book?

SELECT tblbook.title, tblpublisher.publisher FROM tblbook, tblpublisher WHE RE tblbook.bookid = 1 AND tblpublisher.publisherid = 2 ;

3. ISBN 444 belongs to what publisher?

SELECT tblbook.title,tblbook.isbn, tblpublisher.publisher FROM tblbook, tbl publisher WHERE tblbook.isbn = '866-844-444-3' AND tblpublisher.publisherid = 2 ;

4. Display the title of the book and publisher in one column and name as the column in Library.

SELECT title AS Library FROM tblbook UNION SELECT publisher FROM tblpublish er;

5. Who are the borrowers who have the access to the “The Killing Zone” book?

SELECT tblborrower.borrower, tblbook.title FROM tblborrower, tblbook WHERE tblborrower.borrowerid = 2 AND tblbook.bookid = 1 ;

6. What is the total price of “Man of Steel” book? And name as the total price.

SELECT title, quantity, price, SUM(price) * quantity AS Total_Price FROM tb lbook WHERE title = 'Man Of Steel';

7. Show list of borrowers on 2022-10-10 and name as date_issued.

SELECT tblborrower.borrower AS date_issued FROM tblborrower, tblborrowed_bo oks WHERE tblborrower.borrowerid = tblborrowed_books.borroweid AND tblborro wed_books.issuedate = '2022-10-10';

8. Create an additional province field for publisher?

ALTER TABLE tblpublisher ADD province VARCHAR( 50 ) AFTER address;