Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

CUSTOMER(custID, name, address, zip, phone, isContractor) CSZ(zip, city, state) INVOICE(invID , custID, dateOfInv, finalTotalBill, amountDue, creditCardNo) ITEMTYPES(typeID, description, quantityOnHand, totalOwned, dailyRentRate) ITEM(itemID, typeID, condition, dateManufactured,

image text in transcribed

CUSTOMER(custID, name, address, zip, phone, isContractor) CSZ(zip, city, state) INVOICE(invID , custID, dateOfInv, finalTotalBill, amountDue, creditCardNo) ITEMTYPES(typeID, description, quantityOnHand, totalOwned, dailyRentRate) ITEM(itemID, typeID, condition, dateManufactured, purchasePrice) RENTED(invID, itemID, dateReturned) PAYMENT(invID, pmtType, CrCardOrCheckNo, amount, date) For a rental company database. Primary keys are underlined. Customers may rent severa items at a time. All items are listed under one invoice. Payment is due upon return the items. Credit cards are used for in lieu of a deposit and the hold is released on retur of the items. 1. Give an expression in the relational algebra for each of the following queries: 1) List all names and phone number of contractors. 2) List item customers who have not rented anything since Jan 12008. 3) list all the customer names who live in Xi'an have rent some items after 2019 2. Write correct SQL statements for the following queries: 1)List names of customers from zip 16652 who have made single payments of at least $500. 2)A recall of our brand of chainsaws made before 2005 has occurred. List names and phone numbers of customers who are still renting such an item. 3)List all customers who have made at least two payments on their invoices and, for each, the sum of their invoices

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Data Management Databases And Organizations

Authors: Richard T. Watson

3rd Edition

0471418455, 978-0471418450

More Books

Students also viewed these Databases questions