Why Choose Us?
0% AI Guarantee
Human-written only.
24/7 Support
Anytime, anywhere.
Plagiarism Free
100% Original.
Expert Tutors
Masters & PhDs.
100% Confidential
Your privacy matters.
On-Time Delivery
Never miss a deadline.
Calculate the points from the ORD_PMT entity
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 |
- Please implement the ERD in DB2 including all associated tablespaces, tables, and indices.
- 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)
- 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!!
Expert Solution
PFA
Archived Solution
You have full access to this solution. To save a copy with all formatting and attachments, use the button below.
For ready-to-submit work, please order a fresh solution below.





