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.
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.