Question: P 0 7 0 2 Royal Products Using the P 0 7 0 2 . docx document in the student folder, create P 0 7

P0702 Royal Products
Using the P0702.docx document in the student folder, create P0702.sql and build the Royal Products
database:
The DROP and CREATE statements to build the database.
Prefix table names with rp_.
Determine the data types and lengths.
Add constraints:
o Add NOT NULL (column optionality) constraints at the column level.
o Add DEFAULT constraints at the column level.
o Create ALTER TABLE statements for PKs, FKs, and UKs.
o Add CHECK constrains as follows:
The default customer credit limit is 5000.00.
The default rep commission rate is 4.0%.
Customer state must be MI, IL, ON.
The rep rate must be in the range 3% to 7% inclusive.
Customer credit limit must not exceed $18,000.00.
Customer balance must be less than customer credit limit.
Order date must be greater than 01/01/2021.
Quantity on hand for Products must be in the range 0 to 150 inclusive.
The products class must be HW, SG, AP.
The product price must be in the range 20.00-2000.00 inclusive.
Submit P0702.sql.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!