Question

Given the following 7 relations: MIScompany (name, address, phone, email, FedTaxId, StaTaxId) branch (branchId, name, address,...

Given the following 7 relations:

MIScompany (name, address, phone, email, FedTaxId, StaTaxId)

branch (branchId, name, address, phone, email, FedTaxId, StaTaxId)

employee (empId, driverId, ssno, name, branchId)

customer (custId, name, address, driverId, ssno, FedTaxId, StaTaxId)

equipment (equipId, name, type, upc, purchaseDate, year, manufacturId, cost, rentFee, branchId )

manufacturer (manufacturId, name, FedTaxId, StaTaxId, phone, email)

rental (rentalId, equipId, custId, rentDate&time, returnDate&time, empId)

1)

Use relational algebra to list every equipment name with more than three quantities and the name of customer who have rented them. The report should contain equipment name and customer name.

Homework Answers

Answer #1

1)Use relational algebra to list every equipment name with more than three quantities and the name of customer who have rented them. The report should contain equipment name and customer name.

Solution:-

Here hint is :-

  • E means Employee Table
  • C means Customer Table
  • R means Rental Table  

The INNER JOIN keyword selects records that have matching values in both tables

  • Here the Employee name and Customer name is matching values only Consider and
  • like same as before EmplyeeID and rentalID matching values Considered
  • like same as before rentalID and CustomerID matching values considered

Here is the Command:-

SELECT E.name,C.name FROM equipment E INNER JOIN rental R ON E.equipid= R.equipid

INNER JOIN customer C ON R R.empid = C.empid Group BY E.name HAVING COUNT(*)>3;

Know the answer?
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
Similar Questions
Given the following 7 relations: MIScompany (name, address, phone, email, FedTaxId, StaTaxId) branch (branchId, name, address,...
Given the following 7 relations: MIScompany (name, address, phone, email, FedTaxId, StaTaxId) branch (branchId, name, address, phone, email, FedTaxId, StaTaxId) employee (empId, driverId, ssno, name, branchId) customer (custId, name, address, driverId, ssno, FedTaxId, StaTaxId) equipment (equipId, name, type, upc, purchaseDate, year, manufacturId, cost, rentFee, branchId ) manufacturer (manufacturId, name, FedTaxId, StaTaxId, phone, email) rental (rentalId, equipId, custId, rentDate&time, returnDate&time, empId) 1) Use relational algebra to list all equipment in detail, including the name of the customer if the equipment is...
Consider the following relations: Student(sID, surName, firstName, campus, email) Course(dept, cNum, name) 
Offering(oID, dept, cNum, term,...
Consider the following relations: Student(sID, surName, firstName, campus, email) Course(dept, cNum, name) 
Offering(oID, dept, cNum, term, instructor)
 Took(sID, oID, grade) Such as: Offering[dept, cNum] ⊆ Course[dept, cNum] Took[sID] ⊆ Student[sID]
 Took[oID] ⊆ Offering[oID] Answer the following query using relational algebra: Give the Student number of all students who have taken the course number “343” by the department “CS”. Find sID of all students who have earned some grade over 80 and some grade below 50. Find the Terms when the...
Requirements: Based on the following information, draw an E-R diagram and a set of relations in...
Requirements: Based on the following information, draw an E-R diagram and a set of relations in 3rd normal form. Please indicate any assumptions that you have made. Wally Los Gatos, owner of Wally’s Wonderful World of Wallcoverings, has hired you as a consultant to design a database management system for his chain of three stores that sell wallpaper and accessories. He would like to track sales, customers, and employees. After an initial meeting with Wally, you have developed a list...
PYTHON : Create a Email Address Parser (* Please do make comments*) Often times, you may...
PYTHON : Create a Email Address Parser (* Please do make comments*) Often times, you may be given a list of raw email addresses and be asked to generate meaningful information from such a list. This project involves parsing such a list and generating names and summary information from that list. The script, eparser.py, should: Open the file specified as the first argument to the script (see below) Read the file one line at a time (i.e., for line in...
Space X Bank CREATE TABLE Branch(BranchIDNumber VARCHAR(15) PRIMARY KEY NOT NULL, BranchName VARCHAR(6) NOT NULL, Address...
Space X Bank CREATE TABLE Branch(BranchIDNumber VARCHAR(15) PRIMARY KEY NOT NULL, BranchName VARCHAR(6) NOT NULL, Address VARCHAR(50) NOT NULL, City TEXT NULL, State CHAR(2) NULL, ZipCode INT(11) NOT NULL, OfficeNum VARCHAR(15) NOT NULL, FaxNum VARCHAR(15) NOT NULL); CREATE TABLE Employee(EmployeeIDNumber VARCHAR(15) NOT NULL,FirstName VARCHAR(35) NOT NULL, LastName VARCHAR(35) NOT NULL, Email VARCHAR(100) NOT NULL, BranchIDNumber VARCHAR(11) NOT NULL, FOREIGN KEY(BranchIDNumber) REFERENCES Branch(BranchIDNumber), JobTitle ENUM("Manager","Staff") NOT NULL, Salary DECIMAL(8, 2) NOT NULL, HomeNumber VARCHAR(13) NULL, CellNumber VARCHAR(13) NOT NULL); CREATE TABLE...
Please submit SQL statements as a plain text file (.txt). If blackboard rejects txt file you...
Please submit SQL statements as a plain text file (.txt). If blackboard rejects txt file you can submit a zipped file containing the text file. Word, PDF, or Image format are not accepted. You do not need to show screen shot. Make sure you have tested your SQL statements in Oracle 11g. Assumptions: Each tool belongs to a category. Each category may have a parent category but the parent category should not have parent category (so at most two levels)....
Following is the whole proposal and for that I need a logical design (ERD), Q. Map...
Following is the whole proposal and for that I need a logical design (ERD), Q. Map all different types of entities and relationships, provide definitions of entities and relationships. Zameen.com is Pakistan's first and biggest property portal and is amongst the world's top five property portals. It was founded in 2006 and has since revolutionized Pakistan's real estate industry by linking online buyers and sellers in a very convenient way, making it a worldwide household name among Pakistanis. This is...
Instructions: Step 1: Create UNF Relation from a User View. The goal here is to create...
Instructions: Step 1: Create UNF Relation from a User View. The goal here is to create a single relation for the data found in the user view. The method used is: •   Examine the user view •   Identify all attributes •   Describe the user view using DBDL Here is an example of a user view. This reports lists the customers of the Premiere Corporation. Premiere Corporation Customer List CustNo   Name   Street   City   State   ZipCode   SalesRepNo 124    Sally Adams   482...
You are a database consultant with Ace Software, Inc., and have been assigned to develop a...
You are a database consultant with Ace Software, Inc., and have been assigned to develop a database for the Mom and Pop Johnson video store in town. Mom and Pop have been keeping their records of videos and DVDs purchased from distributors and rented to customers in stacks of invoices and piles of rental forms for years. They have finally decided to automate their record keeping with a relational database. You sit down with Mom and Pop to discuss their...
Directions: Develop an E-R (or EER depending upon need) Diagram. List all assumptions. Show the version...
Directions: Develop an E-R (or EER depending upon need) Diagram. List all assumptions. Show the version 1 (entities and data only) and version 3 (entities, attributes and relationships with cardinalities and participation constraints). 20 points of the grade will be based on evaluating your assumptions - you must give a detailed list of your assumptions identifying anchor concepts, data associated with the anchor and data that has more than one anchor participating in it. Remember, we are not talking out...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT