Question
It's urgent ! , I need its answer now please. III . SQL and relational algebra ( 3 points for each , total 18 points
It's urgent ! , I need its answer now please.
III . SQL and relational algebra ( 3 points for each , total 18 points ) CUSTOMER ( CustID , name , address , zip , phone , isContractor )
CSZ ( zip , city , state )
INVOICE ( invID , custID , dateOfInv , finalTotalBill , amountDue , credit CardNo )
ITEMTYPES ( typeID , description , quantityOnHand , totalOwned , dailyRentRate )
ITEM ( itemID , typeID , condition , dateManufactured , purchase Price )
RENTED ( invID , itemID , dateReturned )
PAYMENT ( invID , pmtType , CrCardOrCheckNo , amount , date )
For a rental company database .
Primary keys are underlined . Customers may rent several items at a time .
All items are listed under one invoice .
Payment is due upon return of the items .
Credit cards are used for in lieu of a deposit and the hold is released on return of the items .
III. SQL and relational algebra( 3 points for each, total 18 points) 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 or the items. Credit cards are used for in lieu of a deposit and the hold is released on returr 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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started