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

In your Oracle APEX workspace: 1. Create BOOK, PUBLISHER, AUTHOR, ZIPCODE, and B

ID: 3814544 • Letter: I

Question

In your Oracle APEX workspace:
1. Create BOOK, PUBLISHER, AUTHOR, ZIPCODE, and BOOK_AUTHORS tables based on attributes listed above. You can assume any appropriate and meaningful data type, domain and constraint for each attribute. (30 points)
2. In all created tables insert 4 different rows with random variables. (20 points)
3. Use AlTER TABLE command to rename PB_PHONE column in PUBLISHER table. The new name should be PB_PHONE_NUMBER. (10 points)
Develop queries for problem 5, 8,11 and 12 and run them one by one. For number 11 and 12 you can use IN, NOT IN and sub queries. Show the results and queries with screenshots. Screenshots should include your username in workspace. (40 points)

Relational Database Schema for a Library Database: o BOOKCBKID, BK TITLE, BK LIST PRICE, PBID) o PUBLISHER PBID, PB NAME, PB STREET, PIB ZIPCODE, PB PHONE) o AUTHOR CA UID, AU NAME, AU DOB) O LIBRARY BRANCHOL BID, LB NAME, LB-STREET, LB ZIP CODE) o BORROWEROCRID, CR-NAME, CR DOB, CR STREET, CR-ZIP CODE) o ZIPCODE ZIPCODE, CITY, STATE) o BOOK COPIES CBKID, LBID, NO OF COPIES) o BOOK AUTH ORS CBKID, AUID For each of the following, write the SQL query: 1. List all the attributes for each Author born after January 18, 1976. 2. List the Name and Date-of Birth for each Author. 3. List the Name and Date-of-Birth for each Author born after January 18, 1976 4. List the Title, List Price and Publisher's Name for each Book. 5. List the Title, List Price and Publisher's Name for each Book whose List Price is more than $2OO.OO. 6. List the Title, List Price, Author's Name and Publisher's Name for each Book whose List Price is more than $200.00 7. List the ID, Name, City, State & Zipcode of each Publisher who has published at least one Book whose List Price was more than $2OO.OO 8. List the number of books, and the minimum, average & maximum List Price for all books. 9. List the Name, and average and maximum book List Price of each Publisher. 10. List number of Publishers who have published at least one Book whose List Price is more than $200.00 11.List the ID & Name of each Publisher who has never published a Book whose List Price was more than $200.00 12 List the ID & Name of each Publisher who only publishes Books whose List Price is more than $200.00

Explanation / Answer

1. select AUID, AU_Name, AU_DOB from AUTHOR where AU_DOB>'Jan 18,1976'
2. select AU_NAME, AU_DOB from AUTHOR

3. select AU_NAME, AU_DOB from AUTHOR where AU_DOB>'Jan 18,1976'

4. select BK_TITLE, BK_LIST_PRICE from BOOK where PBID IN (select PBID, PB_NAME from PUBLISHER)