Question

please I need help with 1 through 5.

do BOOK(BKID, BK TITLE, BK LIST PRICE, PBID) o BORROWER (CRID, CR NAME, CFR DOB, PUBLISHER(PBID, PB NAME, PB STREET, CR STREET, CR ZIPCODE) PB ZIPCODE, PB PHONE) ZIPCODE(ZIPCODE, CITY, STATE) AUTHOR(AUID, AU NAME, AU DOB) do BOOK COPIES(BKID, BID, NO OF COPIES) BOOK AUTHORS(BKID, AUID) LIBRARY BRANCH (LBID, LB NAME, LB STREET, LB ZIPCODE) o BOOK LOANS (BK ID, LBID, CRID, DATE OUT DUE DATE) 1. Grant the user Kwame the privilege to display (i.e. SELECT) all data for any book in the BOOK table and the privilege to UPDATE the BK LIST PRICE only for any book in the BOOK table. 2. Grant the user Kwame the privilege to display (i.e. SELECT) all data for any book in the BOOK table where the PBID 217 and the privilege to UPDATE the BK LIST PRICE only for any book in the BOOK table where the PBID 217 3. Create a view Author 2K13 that includes the Name and Date-of-Birth only for each Author born after January 1, 2O13 4. Create a view PUBLISHER Z 5 that includes the PBID. PB NAMME. PB STREET. PB ZIPCODE & PB PHONE for each Publisher whose PB ZIPCODE is 23284 or 23285 5. Create a view PUBLISHER BK Z23284 5 that includes the BKID, BK TITLE, BK LIST PRICE, PB ID, PB NAME for those Books whose List Price is less than $250.00 and the corresponding PB ZIPCODE is 23284 or 23285 6. Write a SQL query against the view Author 2K13 that includes the Name and Date-of-Birth only for each Author born after June 30, 2014 7. Grant the user Abena the privilege to display (i.e. SELECT) the PBID, PB NAME, PB STREET, PB ZIPCODE & PB PHONE for each Publisher whose PB ZIPCODE is 23284 or 23285 only. Also grant her the privileges to INSERT and DELETE records for each Publisher whose PB ZIPCODE is 23284 or 23285 only 8. write a SQL query that will list the BK TITLE, BK LIST PRICE, PB NAME for those Books whose BK LIST PRICE is less than $250.00 and the corresponding PB ZIPCODE is 23284 or 23285 Grant the user Abena the privilege to display (i.e. SELECT) the BK TITLE, BK LIST PRICE, PB NAME for those Books whose BK LIST PRICE e is less than $250.00 and corresponding PB ZIPCODE is 23284 or

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

Answer:

1.

a) To select from BOOK:

GRANT SELECT ON BOOK TO Kwame

b) To update in BOOK:

GRANT UPDATE (BK_LIST_PRICE) ON BOOK TO Kwame

2. In this case, we will first need to create a view as below:

CREATE VIEW BOOK_PBID_217 AS SELECT * FROM BOOK WHERE PBID = 217

a) To select where PBID = 217:

GRANT SELECT ON BOOK_PBID_217 TO Kwame

b) To update in BOOK:

GRANT UPDATE (BK_LIST_PRICE) ON BOOK_PBID_217 TO Kwame

3.

CREATE VIEW AUTHOR_2K13 AS SELECT AU_NAME,AU_DOB FROM AUTHOR WHERE AU_DOB < DATE '2013-01-01'

4.

CREATE VIEW PUBLISHER_Z23285_5 AS SELECT PBID,PB_NAME,PB_STREET,PB_ZIPCODE,PB_PHONE FROM PUBLISHER WHERE PB_ZIPCODE = 23284 OR PB_ZIPCODE = 23285

5.

CREATE VIEW PUBLISHER_BK_Z23285_5 AS SELECT BKID, BK_TITLE, BK_LIST_PRICE, PBID,PB_NAME FROM BOOK,PUBLISHER WHERE BOOK.PBID = PUBLISHER.PBID AND BK_LIST_PRICE < 250.00 AND (PB_ZIPCODE = 23284 OR PB_ZIPCODE = 23285)
Add a comment
Know the answer?
Add Answer to:
please I need help with 1 through 5. Grant the user Kwame the privilege to display...
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
  • MYSQL Questions: 1.For every author, display the number of books written by that author that is...

    MYSQL Questions: 1.For every author, display the number of books written by that author that is carried by Henry Books. Display the author number as ‘Author Number’, author name concatenated (first last) as ‘Author Name’, and the total number of books written by the author as ‘Number of Titles by Author’. List in descending order by author number. Limit the output to 10 rows. Insert your snip of the query and resultset together here. 2.Using a function, what are the...

  • 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...

  • 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...

  • Please help me on the SQL queries, thank you so much. Write a query to display the title and publisher as well as the p...

    Please help me on the SQL queries, thank you so much. Write a query to display the title and publisher as well as the publisher contact for each book using JOIN...USING clause. Write a query to show the first and last names of customers who have ordered cooking books. Use the WHERE clause to join the tables. Write a query to show the title, cost and ISBN of each book in the books table. If the book has been ordered,...

  • Need help with these scenarios Question 1 Write a JavaScript program to get the volume of...

    Need help with these scenarios Question 1 Write a JavaScript program to get the volume of a Cylinder with four decimal places using object classes. Volume of a cylinder : V = πr2h where r is the radius and h is the height of the cylinder. Your solution must include an HTML and a JavaScript file, with a button to create the cylinder, inputs for the cylinder's radius and height and an output to show the cyclinder's volume. Your solution...

  • Someone please answer all of these. I need these badly. The submission date is knocking at...

    Someone please answer all of these. I need these badly. The submission date is knocking at the door. Experiment 1: SQL data definition and data insertion 46 hours) 1. CREATE TABLE. The database schema consists of the three relations, whose schemas are: S (Spa, Sname. Sgender, Sage, Sdert? // students(SID, name, gender, age, department) SC (Spa, Cne. Grade) //Course(SID, CID, grade) C (One Cname Crno. Ceredit) l/courses (CID, course name, prerequisite courses, credit) 2. DROP TABLE, ALTER TABLE, CREATE INDEX,...

  • MYSQL: Question: 1.Using a function, what are the lowest price books found in paperback? Only return...

    MYSQL: Question: 1.Using a function, what are the lowest price books found in paperback? Only return the lowest price books. Display the book code as ‘Book Code’, the book title as ‘Title’, author name concatenated (first last) as ‘Author Name’ and price as ‘Price’. Insert your snip of the query and resultset together here. 2. Display the number of publishers by city.   Display the city as ‘City’ and the number of publishers in that city as ‘Number of Publishers’. Insert...

  • PL/SQL Auction Program 1. Create a user xyz, who is the owner of the auction. Create...

    PL/SQL Auction Program 1. Create a user xyz, who is the owner of the auction. Create the schema, and package. 2. Create users x1 and x2 who are the participants in the auction. They will need acces to the package. 3. Bid on the same item and record your observations. Verify all scenarios. Upload the files with the missing code and a detailed sample run. AUCTION OWNER.TXT SQL> conn / as sysdba Connected. SQL> drop user xyz cascade; User dropped....

  • Hi good day i need homework help fast please d32 1./What is the maximum length that...

    Hi good day i need homework help fast please d32 1./What is the maximum length that a VARCHAR data type can be: a. 65535 b. 1023 C. 255 d. 32767 2.) Why are alias' used for table and columns? a. to make the names easier to understand b. to hide the column or table c. to be able to remove them from the database d. to give the appearance that they are new- 3.)What does the FIELD function allow you...

  • I NEED TO WRITE THE FOLLOWING QUERIES IN MYSQL (13)Next, grant to a user admin the read privileges on the complete descr...

    I NEED TO WRITE THE FOLLOWING QUERIES IN MYSQL (13)Next, grant to a user admin the read privileges on the complete descriptions of the customers who submitted no orders. For example, these are the customers who registered themselves and submitted no orders so far. The granted privilege cannot be propagated to the other users. 0.3 (14)Next, grant to a user admin the read privileges on information about the total number of orders submitted by each customer. Note, that some customers...

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