Description

Return to the tables created in the previous SQL Data Definition Assignment 1. Expand the definition of the Customer, Order and OrderItem tables by defining domains and check constraints. The check constraints necessary to validate the input in the existing tables are as follows:

The year of an Album must be between greater than 1900.

The price of an Album Item must be greater than or equal to $0.99 but less than $100.00.

The quality of the Album Item is coded between 1 and 4 whose labels correspond to Poor, Fair, Good, Excellent.

The date of each Order must either today's date or before (Hint: Check out CURRENT_DATE).

The quantity of OrderItem must be a positive integer greater than zero.

Instructions

Define check constraints for any relevant attributes described above to limit the values to within the attribute domain. Use the ALTER TABLE command to add the constraints to the relevant tables.

Create domains for the Album and AlbumItem tables. Include each of the data types and any check constraints defined from the previous step.

Choose three (3) queries from either SQL Data Manipulation assignment. Create Write a statement that executes each view.

Academic Honesty!
It is not our intention to break the school's academic policy. Posted solutions are meant to be used as a reference and should not be submitted as is. We are not held liable for any misuse of the solutions. Please see the frequently asked questions page for further questions and inquiries.
Kindly complete the form. Please provide a valid email address and we will get back to you within 24 hours. Payment is through PayPal, Buy me a Coffee or Cryptocurrency. We are a nonprofit organization however we need funds to keep this organization operating and to be able to complete our research and development projects.