Fill This Form To Receive Instant Help

Help in Homework
trustpilot ratings
google ratings


Homework answers / question archive / Calculate the points from the ORD_PMT entity

Calculate the points from the ORD_PMT entity

Computer Science

Calculate the points from the ORD_PMT entity.  If you need to, you can add an OP_POINTS attribute to the table to keep track of points.  

The payment table needs to have the following data.

PMT_ID

PMT_TYPE

PMT_DESC

1

CA

CASH PAYMENT

2

CC

CREDIT CARD PAYMENT

3

SC

5 STORE CREDIT

4

SC

10 STORE CREDIT

5

SC

20 STORE CREDIT

  1. Please implement the ERD in DB2 including all associated tablespaces, tables, and indices. 
  2. You will need to add 1 customer, 2 items, and have at least 5 orders that are paid for using each of the PMT_IDs.  Make sure that your cash and credit payments generate enough points to allow you to use all of the store credit types.  Make sure you choose appropriate data types (i.e. if you need to do math on something, don't make it varchar)
  3. Create a view (named C_PTS) that returns the customer name and calculates the total number of points for a given customer.

You get bonus points if you:

  • Don't need to use the points attribute. +10
  • Use a case statement to determine the negative point values instead of hard coding them. +10

You will be graded on your ability to implement the table structure (150 pts) and the functionality of your view (50 points).  Points will be deducted if you deviate from the names of the items in the ERD, so make sure you are naming things correctly.

You will need to submit:

  • A screenshot of the output from when you created your view showing your UNTP# in the picture.
  • A screenshot of the output of you running the query SELECT * FROM C_PTS; showing your UNTP# in the picture.

Please paste both screenshots into a Word doc and submit it to Canvas.

Good luck!!

 

Option 1

Low Cost Option
Download this past answer in few clicks

18.99 USD

PURCHASE SOLUTION

Already member?


Option 2

Custom new solution created by our subject matter experts

GET A QUOTE