To Homework

IT 240 -- Homework H1

Relational Algebra

Due date: Wednesday, Apr 9, 2008

Use the Premiere Products tables in Figure 2.1 to answer these questions.


Create an MS Word document to contain your answers to the five questions in this assignment. All questions come from Chapter 2 of our textbook.
Name your Word file smith-H1.doc, where smith is your last name.

For the first two questions just write out your answers in your Word document.

  1. List the number and name of all customers that are represented by sales rep 35.
  2. List the number and name of all customers that are represented by sales rep 35 or that have a credit limit of $10,000.

For the next three questions, indicate how to use relational algebra to obtain the desired result.

  1. List all information from the Part table for part FD21.
  2. List the order number, order date, customer number, and customer name for each order.
  3. List the number and date of all orders that were placed on 10/20/2010 or that were placed by a customer whose rep number is 20.

Here's an example of what I'm looking for as answers to 3, 4, and 5.
Example:
List the order number, order date, customer number, and customer name for each order placed by any customer represented by the sales
rep whose last name is Kaiser.
Answer:
JOIN Orders Customer WHERE Orders.CustomerNum = Customer.CustomerNum
               GIVING Temp1
JOIN Temp1 Rep WHERE Temp1.RepNum = Rep.RepNum GIVING Temp2
SELECT Temp2 WHERE Rep.LastName = "Kaiser" GIVING Temp3
PROJECT Temp3 OVER (OrderNum, OrderDate, CustomerNum, CustomerName)
                GIVING Answer  

For another example, see Using the JOIN operator