Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

1. What happens to the data displayed by a view if the view is deleted? The foll

ID: 3904213 • Letter: 1

Question

1. What happens to the data displayed by a view if the view is deleted?

The following tables form a Library database held in an RDBMS: Borrower (card_no , last_name, first_name , address, city , state , zip Books (ISBN, title, pub-date , pub-id , ?1st-price, category_id, pub_id) Categories (category_id, category_desc) Author (author_id , last_name, first_name) Bookauthor (ISBN, author_id) Publisher (pub_id, name, contact, phone) Bookloans (ISBN, branch_id, card_no , date_out, due_date) Bookcopies (ISBN, branch.id , no_of_copies) Branch (branch_id, branch_name, city) Write SQL statements to perform the following queries: 1. Create a view that lists the name and phone number of the contact person at each publisher. Don't include the publisher's ID in the view. Name the view CONTACT. 2. Create a view that lists the ISBN and title for each book along with the name and phone number of the person to contact.

Explanation / Answer

If you have any doubts, please give me comment...

1)

CREATE VIEW CONTACT AS

SELECT name, contact, phone

FROM Publisher;

2)

CREATE VIEW BOOK_CONTACTS AS

SELECT ISBN, title, name, phone

FROM Books B, Publisher P

WHERE B.pub_id = P.pub_id;

If view is deleted, nothing will be happened. Data doesn't effected, just View only deleted...