Question: Additional Constraints for the Projects Tables Categories Table o Add a new column CategoryCode NUMBER ( 6 , 0 ) Unique Constraint o CategoryName NOT
Additional Constraints for the Projects Tables
Categories Table
o Add a new column CategoryCode NUMBER
Unique Constraint
o CategoryName NOT NULL
o You can just add the columns to your existing script, in the real world
we would use the ALTER TABLE command we saw last week to add the
new column
infty ReportsTo
Product Table
o Check constraints
UnitPrice column greater than or equal to
ReorderLevel greater than or equal to
UnitsInStock greater than or equal to
UnitsOnOrder greater than or equal to
o ProductName NOT NULL
OrderDetails
o Check constraints
Discount greater than or equal to and less than or equal used
as a percentage,
Quantity greater than
UnitPrice greater than or equal to
o ProductID NOT NULL
o UnitPrice NOT NULL
o Quantity NOT NULL
o Discount NOT NULL
Customers
o CompanyName NOT NULL
o Add a new column called Email VARCHAR
Unique Constraint
Employees
o Add a new columns SIN CHAR
Unique Constraint
o LastName NOT NULL
o FirstName NOT NULL
Suppliers
o CompanyName NOT NULL
Shippers
o CompanyName NOT NULL
By adding these to your script you should end up with constraints does not include
the NOT NULL constraints on your tables:
o Primary Key
o Foreign Key
o Unique Key
o Check
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
