Question

In: Computer Science

The following tables form a Library database held in an RDBMS: Borrower (card_no , last_name ,...

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 , list_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)


Please use the standard join method, no implicit method allowed.


Write SQL statements to perform the following queries:
1. Display the title of each book and the name and phone number of the contact at the publisher’s office for reordering each book.

2. Which books were written by an author with the last name Steven? Perform the search using the author name.

3. Identify the authors of the books Leila Smith borrowed Perform the search using the borrower last name.

4. Display the most recent publication date of all books.

5. Display the list price of the least expensive book in the Computer Science category.

6. What’s the list price of the most expensive book written by Carlos Tim?

7. Display how many times each book title has been borrowed.

8. How many times has the book with ISBN “0401140733” been borrowed?

Solutions

Expert Solution


Related Solutions

The following tables form part of a database (Flights Database) held in a relational DBMS: employee...
The following tables form part of a database (Flights Database) held in a relational DBMS: employee (empNo, empName, empSalary, empPosition) aircraft (aircraftNo, acName, acModel, acFlyingRange) flight (flightNo, aircraftNo, fromAirport, toAirport, flightDistance, departTime, arriveTime) certified (empNo, aircraftNo) Where:  employee contains details of all employees (pilots and non-pilots) and empNo is the primary key;  aircraft contains details of aircraft and C is the primary key.  flight contains details of flights and (flightNo, aircraftNo) form the primary key.  certified...
The following tables form part of a database held in a relational DBMS: Hotel (hotelNo, hotelName,...
The following tables form part of a database held in a relational DBMS: Hotel (hotelNo, hotelName, hotelAddress, country) Room (roomNo, hotelNo, type, price) Guest (guestNo, guestName, guestAddress, country) Booking (hotelNo, guestNo, dateFrom, dateTo, roomNo) Write the SQL statements for the following questions: 1. List the rooms that are currently unoccupied at the Grosvenor Hotel, for: (a) Use 2019-10-01 as today's date. Include all 'Grosvenor' hotels. List in hotelNo, roomNo order. Use NOT IN to perform the difference operation (b) Use...
Draw the corresponding ERD for the following Employee Database: Employee (emp_id, first_name, middle_name, last_name, date_of_birth) Dept...
Draw the corresponding ERD for the following Employee Database: Employee (emp_id, first_name, middle_name, last_name, date_of_birth) Dept (Dept_id, Dept_name, Building) works (emp_id, dept_id, hours) Emp_phone (emp_id, phone_num) Note: Please I need a short answer only on paragraph and simple words.
In this normal form game, the players are a borrower and a bank. borrower \ bank...
In this normal form game, the players are a borrower and a bank. borrower \ bank [] lend at 5% [] not lend pay back [] 15,5 [] 0,0 default [] 120, -100 [] 0,0 The bank can lend at 5% or not lend, in which case neither is any better or worse off. If the bank lends, the borrower uses the money to get a benefit worth $120, and chooses between paying back $105 (for a net payoff of...
Database Design Design a database and show the relationship between each tables. I need multiple tables....
Database Design Design a database and show the relationship between each tables. I need multiple tables. *Must meet the requirements for Third Normal Form. These are the information for employee DB. Employee Number, First Name, Last Name, Date of birth, Address, city, state, zip, department, job title, supervisor, health insurance number, health insurance provider, dental insurance number, dental insurance provider, spouse/partner, children, children's ages.
Go to the WCU Library and search the database for the following article. Read the article,...
Go to the WCU Library and search the database for the following article. Read the article, and then answer the questions that follow: Soriano S., Alonso-Magdalena P., Garcıa-Arevalo M., Novials A., & Muhammed S. J. (2012). Rapid insulinotropic action of low doses of Bisphenol-A on mouse and human islets of langerhans: Role of estrogen receptor b. PLoS ONE 7(2): e31109. doi:10.1371/journal.pone.0031109 What are the causes of type 2 diabetes? What is the relationship between insulin resistance and hyperinsulinemia? What are...
mySQL database question.. I have a database that has the following tables: User (Id, Name, Gender)...
mySQL database question.. I have a database that has the following tables: User (Id, Name, Gender) Primary key = Id Friends (Id1, Id2, Startdate) Primary key = (Id1, Id2) Foreign keys are also Id1, Id2 pointing to User(Id) Comments (CommentId, Poster, Recipient, Text, PostDate) Primary key = (CommentId) Foreign Keys are Poster, Recipient pointing to User(Id) I need to answer the following queries: 5. List Users who have posted comments to all female users 6. List User(s) who have received...
QUESTION: The following tables describe the content of a relational database: a) Identify and classify the...
QUESTION: The following tables describe the content of a relational database: a) Identify and classify the tables as either entity or relationship The first step in building an E-R model is to identify the entities. Having identified the entities, the next step is to identify all the relationships that exist between these entities. Using the content of the relational database above: b) Using the relations in the relational database, explain how one can transform relationship in E-R model into a...
Use MYSQL to create the set of database tables of the relational database model and complete...
Use MYSQL to create the set of database tables of the relational database model and complete the associated queries given. Procedure: 1) Write all the SQL statements, necessary to create all tables and relationships, with Primary & Foreign keys. 2) Execute each statement in the correct order to create the relational database in MYSQL. 3)Insert some data into each table. 4) Use all your SQL create and Insert statements (from MS Word) to execute in the MYSQL WorkBench 5) Write...
Question 2. The following tables provide some example data that will be kept in the database....
Question 2. The following tables provide some example data that will be kept in the database. Write the INSERT commands necessary to place the following data in the tables that were created in Question 1. Alternatively provide the text files (copy and pasted into your final report) and the open/insert from file commands.. Table: actor act_id | act_fname | act_lname | act_gender 101 | James | Stewart | M 102 | Deborah | Kerr | F 103 | Peter |...
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT